From 1169434f42a751ca9ef37fed2fa2fd04fe8b6f8b Mon Sep 17 00:00:00 2001 From: Ankur Gupta Date: Thu, 27 Oct 2016 23:37:27 -0500 Subject: Auto allocated topology for OSC Implementation of Auto-allocated topology into OSC. Dependency merged and released in SDK v. 0.9.11 Partially Implements: blueprint network-auto-allocated-topology Change-Id: I16120910893b0b26b0f7f77a184b0378448458c5 --- openstackclient/tests/unit/network/v2/fakes.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'openstackclient/tests/unit/network/v2/fakes.py') diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index 6a73b7e9..044eba7a 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -157,6 +157,31 @@ class FakeAddressScope(object): return mock.Mock(side_effect=address_scopes) +class FakeAutoAllocatedTopology(object): + """Fake Auto Allocated Topology""" + + @staticmethod + def create_one_topology(attrs=None): + attrs = attrs or {} + + auto_allocated_topology_attrs = { + 'id': 'network-id-' + uuid.uuid4().hex, + 'tenant_id': 'project-id-' + uuid.uuid4().hex, + } + + auto_allocated_topology_attrs.update(attrs) + + auto_allocated_topology = fakes.FakeResource( + info=copy.deepcopy(auto_allocated_topology_attrs), + loaded=True) + + auto_allocated_topology.project_id = auto_allocated_topology_attrs[ + 'tenant_id' + ] + + return auto_allocated_topology + + class FakeAvailabilityZone(object): """Fake one or more network availability zones (AZs).""" -- cgit v1.2.1