summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/network/v2/fakes.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-12-16 03:01:12 +0000
committerGerrit Code Review <review@openstack.org>2016-12-16 03:01:12 +0000
commit60370b46f5bbc9d3de7454f8efef4b5eae867a35 (patch)
tree899bf37ff9f872b6ed5d73f4c02e97428e459c8e /openstackclient/tests/unit/network/v2/fakes.py
parent63377f25fc7dfae151bab2f6e82002a9a1944e93 (diff)
parent22d639b0b61380f715f72142e4c61526f621a707 (diff)
downloadpython-openstackclient-60370b46f5bbc9d3de7454f8efef4b5eae867a35.tar.gz
Merge "SDK refactor: Prepare network commands"
Diffstat (limited to 'openstackclient/tests/unit/network/v2/fakes.py')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index b19a33b8..84f145fb 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -297,15 +297,17 @@ class FakeNetwork(object):
'admin_state_up': True,
'shared': False,
'subnets': ['a', 'b'],
- 'provider_network_type': 'vlan',
- 'provider_physical_network': 'physnet1',
- 'provider_segmentation_id': "400",
+ 'provider:network_type': 'vlan',
+ 'provider:physical_network': 'physnet1',
+ 'provider:segmentation_id': "400",
'router:external': True,
'availability_zones': [],
'availability_zone_hints': [],
'is_default': False,
'port_security_enabled': True,
'qos_policy_id': 'qos-policy-id-' + uuid.uuid4().hex,
+ 'ipv4_address_scope': 'ipv4' + uuid.uuid4().hex,
+ 'ipv6_address_scope': 'ipv6' + uuid.uuid4().hex,
}
# Overwrite default attributes.
@@ -317,8 +319,21 @@ class FakeNetwork(object):
# Set attributes with special mapping in OpenStack SDK.
network.project_id = network_attrs['tenant_id']
network.is_router_external = network_attrs['router:external']
+ network.is_admin_state_up = network_attrs['admin_state_up']
network.is_port_security_enabled = \
network_attrs['port_security_enabled']
+ network.subnet_ids = network_attrs['subnets']
+ network.is_shared = network_attrs['shared']
+ network.provider_network_type = \
+ network_attrs['provider:network_type']
+ network.provider_physical_network = \
+ network_attrs['provider:physical_network']
+ network.provider_segmentation_id = \
+ network_attrs['provider:segmentation_id']
+ network.ipv4_address_scope_id = \
+ network_attrs['ipv4_address_scope']
+ network.ipv6_address_scope_id = \
+ network_attrs['ipv6_address_scope']
return network