diff options
| author | Abhishek Raut <rauta@vmware.com> | 2016-11-19 04:52:19 -0800 |
|---|---|---|
| committer | Abhishek Raut <rauta@vmware.com> | 2016-12-13 17:06:38 -0800 |
| commit | 7832ea357c29fcf8b1e1ad0d29cede3637893ac6 (patch) | |
| tree | f52f62372cfb24fad0721276234e738471ecb14c /openstackclient/tests | |
| parent | 2cb5cf7d54f8db2f18897a70ba9ab3e301480477 (diff) | |
| download | python-openstackclient-7832ea357c29fcf8b1e1ad0d29cede3637893ac6.tar.gz | |
SDK Refactor: Prepare port commands
Prepare the OSC "port" commands for the SDK refactor.
See [1] for details.
Also fixed a typo in the UT.
[1] https://etherpad.openstack.org/p/osc-network-command-sdk-support
Change-Id: I0e37d6c04f3d8e81fdfd50ac26eea9b5a5fb2ff9
Partially-Implements: blueprint network-command-sdk-support
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 5 | ||||
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_port.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index 97d07076..ece6369a 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -461,12 +461,15 @@ class FakePort(object): loaded=True) # Set attributes with special mappings in OpenStack SDK. - port.project_id = port_attrs['tenant_id'] port.binding_host_id = port_attrs['binding:host_id'] port.binding_profile = port_attrs['binding:profile'] port.binding_vif_details = port_attrs['binding:vif_details'] port.binding_vif_type = port_attrs['binding:vif_type'] port.binding_vnic_type = port_attrs['binding:vnic_type'] + port.is_admin_state_up = port_attrs['admin_state_up'] + port.is_port_security_enabled = port_attrs['port_security_enabled'] + port.project_id = port_attrs['tenant_id'] + port.security_group_ids = port_attrs['security_groups'] return port diff --git a/openstackclient/tests/unit/network/v2/test_port.py b/openstackclient/tests/unit/network/v2/test_port.py index aeb9884a..255e8116 100644 --- a/openstackclient/tests/unit/network/v2/test_port.py +++ b/openstackclient/tests/unit/network/v2/test_port.py @@ -324,7 +324,7 @@ class TestCreatePort(TestPort): self.assertEqual(ref_columns, columns) self.assertEqual(ref_data, data) - def test_create_with_no_secuirty_groups(self): + def test_create_with_no_security_groups(self): arglist = [ '--network', self._port.network_id, '--no-security-group', |
