From: Gary Wu Date: Fri, 5 Jan 2018 22:04:51 +0000 (-0800) Subject: Refactor script to retrieve instance floating IP X-Git-Tag: 1.0.1-Amsterdam~30 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=17fdc4fe3c3d064e5c1d1958abe7e82f28daec01;p=integration.git Refactor script to retrieve instance floating IP Change-Id: Iacfe44feb72456a78372422937645f8ecc92888b Issue-ID: INT-278 Signed-off-by: Gary Wu --- diff --git a/test/ete/scripts/get-floating-ip.sh b/test/ete/scripts/get-floating-ip.sh index 004025db2..196f6d244 100755 --- a/test/ete/scripts/get-floating-ip.sh +++ b/test/ete/scripts/get-floating-ip.sh @@ -1,6 +1,3 @@ -#!/bin/bash -x +#!/bin/bash # Get floating IP assigned to a server name - -PORT_ID=$(openstack server show -f json $1 | python -c 'import sys, json; print json.load(sys.stdin)["wrs-if:nics"][0]["nic1"]["port_id"]') -FLOATING_IP=$(openstack floating ip list -f json --port $PORT_ID | python -c 'import sys, json; print json.load(sys.stdin)[0]["Floating IP Address"]') -echo $FLOATING_IP +openstack server show -c addresses -f json $1 | jq -r '.addresses' | tr -d ' ' | cut -d ',' -f 2