Last active
May 23, 2019 15:15
-
-
Save freyes/9fe2ba1f25a111023e52159c6dd89811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Usage: | |
# ./read_relation.sh <RELATION> <UNIT> <UNIT_TO_READ_FROM> | |
# Example: | |
# ./read_relation.sh identity-service cinder/0 keystone/0 | |
# | |
# In this example we are reading the data contained in the identity-service | |
# relation between cinder/0 and keystone/0. | |
INTERFACE="$1" | |
UNIT1=$2 | |
UNIT2=$3 | |
set -x | |
RELATION_ID=$(juju run --unit $UNIT1 "relation-ids $INTERFACE") | |
juju run --unit $UNIT1 "relation-get -r $RELATION_ID - $UNIT2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment