diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-02-25 21:15:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-02-25 21:15:47 +0000 |
| commit | fbc03104f66a80e1d7f3c7880d7db82587a7ab6c (patch) | |
| tree | bb9f9e68cbba28f3fbdc25ba30832542e8b96df1 /openstackclient/tests/network/v2/fakes.py | |
| parent | 6176e802b3a4125e983eba3805f3f90881622bc4 (diff) | |
| parent | f0960f0fef263298e56d7e81acf50597073becc7 (diff) | |
| download | python-openstackclient-fbc03104f66a80e1d7f3c7880d7db82587a7ab6c.tar.gz | |
Merge "Floating IP: Neutron support for "ip floating show" command"
Diffstat (limited to 'openstackclient/tests/network/v2/fakes.py')
| -rw-r--r-- | openstackclient/tests/network/v2/fakes.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/openstackclient/tests/network/v2/fakes.py b/openstackclient/tests/network/v2/fakes.py index d091fe5b..cfd05729 100644 --- a/openstackclient/tests/network/v2/fakes.py +++ b/openstackclient/tests/network/v2/fakes.py @@ -637,14 +637,24 @@ class FakeFloatingIP(object): 'id': 'floating-ip-id-' + uuid.uuid4().hex, 'floating_ip_address': '1.0.9.0', 'fixed_ip_address': '2.0.9.0', + 'dns_domain': None, + 'dns_name': None, + 'status': 'DOWN', + 'floating_network_id': 'network-id-' + uuid.uuid4().hex, + 'router_id': 'router-id-' + uuid.uuid4().hex, 'port_id': 'port-id-' + uuid.uuid4().hex, + 'tenant_id': 'project-id-' + uuid.uuid4().hex, } # Overwrite default attributes. floating_ip_attrs.update(attrs) # Set default methods. - floating_ip_methods = {} + floating_ip_methods = { + 'keys': ['id', 'floating_ip_address', 'fixed_ip_address', + 'dns_domain', 'dns_name', 'status', 'router_id', + 'floating_network_id', 'port_id', 'tenant_id'] + } # Overwrite default methods. floating_ip_methods.update(methods) @@ -652,7 +662,12 @@ class FakeFloatingIP(object): floating_ip = fakes.FakeResource( info=copy.deepcopy(floating_ip_attrs), methods=copy.deepcopy(floating_ip_methods), - loaded=True) + loaded=True + ) + + # Set attributes with special mappings in OpenStack SDK. + floating_ip.project_id = floating_ip_attrs['tenant_id'] + return floating_ip @staticmethod |
