summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-27 03:06:50 +0000
committerGerrit Code Review <review@openstack.org>2017-04-27 03:06:50 +0000
commit7b609ebd55b1ff38be4763b5122b4a48a05ef931 (patch)
tree6ca427d085704772379112b9e68868ca605539df /openstackclient/tests/functional
parent19a7081aa0dd7303e908969d65879ce13ef3cc27 (diff)
parentbffc98e4e526ffb9878a12db9a0d8b87cf73d082 (diff)
downloadpython-openstackclient-7b609ebd55b1ff38be4763b5122b4a48a05ef931.tar.gz
Merge "Fix server create with nova-net"
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(