summaryrefslogtreecommitdiffstats
path: root/heartbeat/openstack-info.in
diff options
context:
space:
mode:
Diffstat (limited to 'heartbeat/openstack-info.in')
-rwxr-xr-xheartbeat/openstack-info.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/heartbeat/openstack-info.in b/heartbeat/openstack-info.in
index 6502f1d..876e833 100755
--- a/heartbeat/openstack-info.in
+++ b/heartbeat/openstack-info.in
@@ -164,10 +164,12 @@ OSInfoStats() {
--format json \
--column fixed_ips \
${port_id}")
- subnet_id=$(echo "$subnet_result" |
+ subnet_ids=$(echo "$subnet_result" |
grep -P '\"subnet_id\": \".*\",$' |
grep -P -o '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}')
- value="${value}${subnet_id}:${port_id},"
+ for subnet_id in $subnet_ids; do
+ value="${value}${subnet_id}:${port_id},"
+ done
done
value=${value%,}