2024-11-07 12:09:27 +00:00
|
|
|
#!/bin/bash
|
2021-10-12 19:24:31 +00:00
|
|
|
if [ $# -ne 2 ]; then
|
|
|
|
echo "Usage: $0 unit/N relation-name (e.g. $0 ceph-mon/0 client)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-11-07 12:09:27 +00:00
|
|
|
source functions.sh
|
|
|
|
check_juju_version
|
|
|
|
|
|
|
|
relation_ids=$(${juju_run} -u $1 -- relation-ids $2)
|
2021-10-12 19:24:31 +00:00
|
|
|
echo $relation_ids
|
|
|
|
|
|
|
|
for relation_id in $relation_ids; do
|
2024-11-07 12:09:27 +00:00
|
|
|
units=$(${juju_run} -u $1 -- relation-list -r $relation_id)
|
2021-10-12 19:24:31 +00:00
|
|
|
for unit in $units; do
|
|
|
|
echo -----
|
|
|
|
echo from $1 get $relation_id $unit
|
2024-11-07 12:09:27 +00:00
|
|
|
${juju_run} -u $1 -- relation-get -r $relation_id - $unit
|
2021-10-12 19:24:31 +00:00
|
|
|
done &
|
|
|
|
done
|
|
|
|
|
|
|
|
wait
|
|
|
|
|