summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/functional')
-rw-r--r--openstackclient/tests/functional/compute/v2/test_server.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/openstackclient/tests/functional/compute/v2/test_server.py b/openstackclient/tests/functional/compute/v2/test_server.py
index dd257e9a..76255c69 100644
--- a/openstackclient/tests/functional/compute/v2/test_server.py
+++ b/openstackclient/tests/functional/compute/v2/test_server.py
@@ -207,12 +207,20 @@ class ServerTests(common.ComputeTestCase):
'floating ip create -f json ' +
'public'
))
- floating_ip = cmd_output['floating_ip_address']
+
+ # Look for Neutron value first, then nova-net
+ floating_ip = cmd_output.get(
+ 'floating_ip_address',
+ cmd_output.get(
+ 'ip',
+ None,
+ ),
+ )
self.assertNotEqual('', cmd_output['id'])
self.assertNotEqual('', floating_ip)
self.addCleanup(
self.openstack,
- 'floating ip delete ' + cmd_output['id']
+ 'floating ip delete ' + str(cmd_output['id'])
)
raw_output = self.openstack(