summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
diff options
context:
space:
mode:
authorM V P Nitesh <m.nitesh@nectechnologies.in>2017-06-22 12:56:26 +0530
committerM V P Nitesh <m.nitesh@nectechnologies.in>2017-06-22 12:58:18 +0530
commit4c2eb2bd8b9ba16dba1eb3707f64c0ea4f447e91 (patch)
tree1cf075b1d88bd055d6d7388146847c208608f25f /openstackclient/tests/unit
parent7653cff5e6f9592332a23e452ad6bf1549542b16 (diff)
downloadpython-openstackclient-4c2eb2bd8b9ba16dba1eb3707f64c0ea4f447e91.tar.gz
Show neutron tags in OSC network show
Now tag information of the network is displayed when the user tries to see the network details using the command openstack network show <net-id> Change-Id: I587d2bca37b8dbef4400db3d8ace3c81d87e2db3 Closes-Bug: #1695783
Diffstat (limited to 'openstackclient/tests/unit')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py2
-rw-r--r--openstackclient/tests/unit/network/v2/test_network.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index e736b0fd..69f28ee3 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -346,6 +346,7 @@ class FakeNetwork(object):
'availability_zone_hints': [],
'is_default': False,
'port_security_enabled': True,
+ 'tags': ['test'],
'qos_policy_id': 'qos-policy-id-' + uuid.uuid4().hex,
'ipv4_address_scope': 'ipv4' + uuid.uuid4().hex,
'ipv6_address_scope': 'ipv6' + uuid.uuid4().hex,
@@ -365,6 +366,7 @@ class FakeNetwork(object):
network_attrs['port_security_enabled']
network.subnet_ids = network_attrs['subnets']
network.is_shared = network_attrs['shared']
+ network.is_tags = network_attrs['tags']
network.provider_network_type = \
network_attrs['provider:network_type']
network.provider_physical_network = \
diff --git a/openstackclient/tests/unit/network/v2/test_network.py b/openstackclient/tests/unit/network/v2/test_network.py
index 1bd7bac6..af2d08ba 100644
--- a/openstackclient/tests/unit/network/v2/test_network.py
+++ b/openstackclient/tests/unit/network/v2/test_network.py
@@ -75,6 +75,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
'shared',
'status',
'subnets',
+ 'tags',
)
data = (
@@ -97,6 +98,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
_network.shared,
_network.status,
utils.format_list(_network.subnets),
+ utils.format_list(_network.tags),
)
def setUp(self):
@@ -255,6 +257,7 @@ class TestCreateNetworkIdentityV2(TestNetwork):
'shared',
'status',
'subnets',
+ 'tags',
)
data = (
@@ -277,6 +280,7 @@ class TestCreateNetworkIdentityV2(TestNetwork):
_network.shared,
_network.status,
utils.format_list(_network.subnets),
+ utils.format_list(_network.tags),
)
def setUp(self):
@@ -932,6 +936,7 @@ class TestShowNetwork(TestNetwork):
'shared',
'status',
'subnets',
+ 'tags',
)
data = (
@@ -954,6 +959,7 @@ class TestShowNetwork(TestNetwork):
_network.shared,
_network.status,
utils.format_list(_network.subnets),
+ utils.format_list(_network.tags),
)
def setUp(self):