diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2017-04-28 12:41:57 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2017-04-28 14:40:45 -0500 |
| commit | 190711ecd71af2eff4683e570ef48f041fa8d91b (patch) | |
| tree | 8aed52cb833e497bee822fb4700759c532414f1d /openstackclient/tests/functional/compute/v2/test_server.py | |
| parent | efcf3b22ad22152331f7a42f0bfc4cc67205b8da (diff) | |
| download | python-openstackclient-190711ecd71af2eff4683e570ef48f041fa8d91b.tar.gz | |
Nova net functional tests round 3
* network segment
* network service
* port
* router
* security group
* security group rule
* subnet
* subnet pool
* extension
The extension tests were duplicated to have both compute and network
extensions tests so the nova-net case will still exercise the extension
commands.
Also clean up formatting from previous reviews to make the Network functional
tests look and act consistently.
Change-Id: I286c40572faa31ddcef595cec740da933b2defc1
Diffstat (limited to 'openstackclient/tests/functional/compute/v2/test_server.py')
| -rw-r--r-- | openstackclient/tests/functional/compute/v2/test_server.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/compute/v2/test_server.py b/openstackclient/tests/functional/compute/v2/test_server.py index 76255c69..a86c0c67 100644 --- a/openstackclient/tests/functional/compute/v2/test_server.py +++ b/openstackclient/tests/functional/compute/v2/test_server.py @@ -15,6 +15,7 @@ import uuid from tempest.lib import exceptions +from openstackclient.tests.functional import base from openstackclient.tests.functional.compute.v2 import common from openstackclient.tests.functional.volume.v2 import test_volume @@ -22,6 +23,10 @@ from openstackclient.tests.functional.volume.v2 import test_volume class ServerTests(common.ComputeTestCase): """Functional tests for openstack server commands""" + @classmethod + def setUpClass(cls): + cls.haz_network = base.is_service_enabled('network') + def test_server_list(self): """Test server list, set""" cmd_output = self.server_create() @@ -202,6 +207,15 @@ class ServerTests(common.ComputeTestCase): name = cmd_output['name'] self.wait_for_status(name, "ACTIVE") + if not self.haz_network: + # nova-net needs a public subnet + cmd_output = json.loads(self.openstack( + 'network create -f json ' + + '--subnet 8.6.7.5/28 ' + + 'public' + )) + self.addCleanup(self.openstack, 'network delete public') + # attach ip cmd_output = json.loads(self.openstack( 'floating ip create -f json ' + |
