diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2012-08-23 13:09:54 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2012-08-24 09:46:47 -0500 |
| commit | 5f211956f129e54a3209ae7bc71e700db04ab108 (patch) | |
| tree | 82894990b03c30e4d7fade7c51b46228d426afa0 /quantumclient/tests/unit | |
| parent | c9316cabae51f9819be6290b9217d5b2b759733f (diff) | |
| download | python-neutronclient-5f211956f129e54a3209ae7bc71e700db04ab108.tar.gz | |
Change '_' to '-' in options
This changes every command-line option with a '_' in its name
and changes them to '-'. The old option names are maintained
for backward compatibility but are no longer in the help text.
BP command-options
Change-Id: I94daea544ab613321c0a1c4de45092be6dc8471d
Diffstat (limited to 'quantumclient/tests/unit')
| -rw-r--r-- | quantumclient/tests/unit/test_cli20_floatingips.py | 6 | ||||
| -rw-r--r-- | quantumclient/tests/unit/test_cli20_network.py | 12 | ||||
| -rw-r--r-- | quantumclient/tests/unit/test_cli20_port.py | 12 |
3 files changed, 30 insertions, 0 deletions
diff --git a/quantumclient/tests/unit/test_cli20_floatingips.py b/quantumclient/tests/unit/test_cli20_floatingips.py index f9b63df..9aeb1e2 100644 --- a/quantumclient/tests/unit/test_cli20_floatingips.py +++ b/quantumclient/tests/unit/test_cli20_floatingips.py @@ -55,6 +55,12 @@ class CLITestV20FloatingIps(CLITestV20Base): _str = self._test_create_resource(resource, cmd, name, myid, args, position_names, position_values) + # Test dashed options + args = [name, '--port-id', pid] + position_names = ['floating_network_id', 'port-id'] + _str = self._test_create_resource(resource, cmd, name, myid, args, + position_names, position_values) + def test_list_floatingips(self): """list floatingips: -D.""" resources = 'floatingips' diff --git a/quantumclient/tests/unit/test_cli20_network.py b/quantumclient/tests/unit/test_cli20_network.py index de627de..c82d92c 100644 --- a/quantumclient/tests/unit/test_cli20_network.py +++ b/quantumclient/tests/unit/test_cli20_network.py @@ -54,6 +54,12 @@ class CLITestV20Network(CLITestV20Base): position_names, position_values, tenant_id='tenantid') + # Test dashed options + args = ['--tenant-id', 'tenantid', name] + _str = self._test_create_resource(resource, cmd, name, myid, args, + position_names, position_values, + tenant_id='tenantid') + def test_create_network_tags(self): """Create net: myname --tags a b.""" resource = 'network' @@ -80,6 +86,12 @@ class CLITestV20Network(CLITestV20Base): position_names, position_values, admin_state_up=False) + # Test dashed options + args = ['--admin-state-down', name, ] + _str = self._test_create_resource(resource, cmd, name, myid, args, + position_names, position_values, + admin_state_up=False) + def test_lsit_nets_empty_with_column(self): resources = "networks" cmd = ListNetwork(MyApp(sys.stdout), None) diff --git a/quantumclient/tests/unit/test_cli20_port.py b/quantumclient/tests/unit/test_cli20_port.py index 14ae209..c57aa89 100644 --- a/quantumclient/tests/unit/test_cli20_port.py +++ b/quantumclient/tests/unit/test_cli20_port.py @@ -55,6 +55,12 @@ class CLITestV20Port(CLITestV20Base): _str = self._test_create_resource(resource, cmd, name, myid, args, position_names, position_values) + # Test dashed options + args = ['--mac-address', 'mac', '--device-id', 'deviceid', netid] + position_names = ['network_id', 'mac_address', 'device_id'] + _str = self._test_create_resource(resource, cmd, name, myid, args, + position_names, position_values) + def test_create_port_tenant(self): """Create port: --tenant_id tenantid netid.""" resource = 'port' @@ -70,6 +76,12 @@ class CLITestV20Port(CLITestV20Base): position_names, position_values, tenant_id='tenantid') + # Test dashed options + args = ['--tenant-id', 'tenantid', netid, ] + _str = self._test_create_resource(resource, cmd, name, myid, args, + position_names, position_values, + tenant_id='tenantid') + def test_create_port_tags(self): """Create port: netid mac_address device_id --tags a b.""" resource = 'port' |
