diff options
| author | Ankur Gupta <ankur.gupta@intel.com> | 2016-10-27 23:37:27 -0500 |
|---|---|---|
| committer | Akihiro Motoki <amotoki@gmail.com> | 2017-02-22 15:38:16 -0500 |
| commit | 1169434f42a751ca9ef37fed2fa2fd04fe8b6f8b (patch) | |
| tree | 938bc5354945edfd4134e422c01c19f3e7664ab9 /openstackclient/tests/unit/network/v2/fakes.py | |
| parent | 3746fd2caf1dd3853a4def5f8f5f228bb1b1871a (diff) | |
| download | python-openstackclient-1169434f42a751ca9ef37fed2fa2fd04fe8b6f8b.tar.gz | |
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
Diffstat (limited to 'openstackclient/tests/unit/network/v2/fakes.py')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 25 |
1 files changed, 25 insertions, 0 deletions
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).""" |
