diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-09-20 06:55:29 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-09-20 06:55:29 +0000 |
| commit | 43f6b95229cf1bd38a167401faab2b9f0319422d (patch) | |
| tree | a82e591d8a4bece331547292999e1425eb5b5bdb /openstackclient/tests | |
| parent | a83f3c8a71de1686b8b9140cadf21225897b5cbd (diff) | |
| parent | 88be7ddd388c440d3f80564c7f1f4f2aed1a8e36 (diff) | |
| download | python-openstackclient-43f6b95229cf1bd38a167401faab2b9f0319422d.tar.gz | |
Merge "Add --description to Create/Set Network"
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 1 | ||||
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_network.py | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index d4cef0a3..89b128ee 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -285,6 +285,7 @@ class FakeNetwork(object): 'id': 'network-id-' + uuid.uuid4().hex, 'name': 'network-name-' + uuid.uuid4().hex, 'status': 'ACTIVE', + 'description': 'network-description-' + uuid.uuid4().hex, 'tenant_id': 'project-id-' + uuid.uuid4().hex, 'admin_state_up': True, 'shared': False, diff --git a/openstackclient/tests/unit/network/v2/test_network.py b/openstackclient/tests/unit/network/v2/test_network.py index 84ead093..1094131e 100644 --- a/openstackclient/tests/unit/network/v2/test_network.py +++ b/openstackclient/tests/unit/network/v2/test_network.py @@ -57,6 +57,7 @@ class TestCreateNetworkIdentityV3(TestNetwork): 'admin_state_up', 'availability_zone_hints', 'availability_zones', + 'description', 'id', 'is_default', 'name', @@ -73,6 +74,7 @@ class TestCreateNetworkIdentityV3(TestNetwork): network._format_admin_state(_network.admin_state_up), utils.format_list(_network.availability_zone_hints), utils.format_list(_network.availability_zones), + _network.description, _network.id, _network.is_default, _network.name, @@ -129,6 +131,7 @@ class TestCreateNetworkIdentityV3(TestNetwork): arglist = [ "--disable", "--share", + "--description", self._network.description, "--project", self.project.name, "--project-domain", self.domain.name, "--availability-zone-hint", "nova", @@ -143,6 +146,7 @@ class TestCreateNetworkIdentityV3(TestNetwork): verifylist = [ ('disable', True), ('share', True), + ('description', self._network.description), ('project', self.project.name), ('project_domain', self.domain.name), ('availability_zone_hints', ["nova"]), @@ -164,6 +168,7 @@ class TestCreateNetworkIdentityV3(TestNetwork): 'availability_zone_hints': ["nova"], 'name': self._network.name, 'shared': True, + 'description': self._network.description, 'tenant_id': self.project.id, 'is_default': True, 'router:external': True, @@ -216,6 +221,7 @@ class TestCreateNetworkIdentityV2(TestNetwork): 'admin_state_up', 'availability_zone_hints', 'availability_zones', + 'description', 'id', 'is_default', 'name', @@ -232,6 +238,7 @@ class TestCreateNetworkIdentityV2(TestNetwork): network._format_admin_state(_network.admin_state_up), utils.format_list(_network.availability_zone_hints), utils.format_list(_network.availability_zones), + _network.description, _network.id, _network.is_default, _network.name, @@ -532,6 +539,7 @@ class TestSetNetwork(TestNetwork): '--enable', '--name', 'noob', '--share', + '--description', self._network.description, '--external', '--default', '--provider-network-type', 'vlan', @@ -543,6 +551,7 @@ class TestSetNetwork(TestNetwork): verifylist = [ ('network', self._network.name), ('enable', True), + ('description', self._network.description), ('name', 'noob'), ('share', True), ('external', True), @@ -560,6 +569,7 @@ class TestSetNetwork(TestNetwork): attrs = { 'name': 'noob', 'admin_state_up': True, + 'description': self._network.description, 'shared': True, 'router:external': True, 'is_default': True, @@ -624,6 +634,7 @@ class TestShowNetwork(TestNetwork): 'admin_state_up', 'availability_zone_hints', 'availability_zones', + 'description', 'id', 'is_default', 'name', @@ -640,6 +651,7 @@ class TestShowNetwork(TestNetwork): network._format_admin_state(_network.admin_state_up), utils.format_list(_network.availability_zone_hints), utils.format_list(_network.availability_zones), + _network.description, _network.id, _network.is_default, _network.name, |
