diff options
| -rw-r--r-- | ironicclient/tests/v1/test_node_shell.py | 8 | ||||
| -rw-r--r-- | ironicclient/v1/node_shell.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ironicclient/tests/v1/test_node_shell.py b/ironicclient/tests/v1/test_node_shell.py index a4191ae..92dff54 100644 --- a/ironicclient/tests/v1/test_node_shell.py +++ b/ironicclient/tests/v1/test_node_shell.py @@ -293,7 +293,7 @@ class NodeShellTest(utils.BaseTestCase): args = mock.MagicMock() args.node = 'node_uuid' args.provision_state = 'active' - args.configdrive = 'foo' + args.config_drive = 'foo' n_shell.do_node_set_provision_state(client_mock, args) client_mock.node.set_provision_state.assert_called_once_with( @@ -304,7 +304,7 @@ class NodeShellTest(utils.BaseTestCase): args = mock.MagicMock() args.node = 'node_uuid' args.provision_state = 'deleted' - args.configdrive = None + args.config_drive = None n_shell.do_node_set_provision_state(client_mock, args) client_mock.node.set_provision_state.assert_called_once_with( @@ -315,7 +315,7 @@ class NodeShellTest(utils.BaseTestCase): args = mock.MagicMock() args.node = 'node_uuid' args.provision_state = 'rebuild' - args.configdrive = None + args.config_drive = None n_shell.do_node_set_provision_state(client_mock, args) client_mock.node.set_provision_state.assert_called_once_with( @@ -326,7 +326,7 @@ class NodeShellTest(utils.BaseTestCase): args = mock.MagicMock() args.node = 'node_uuid' args.provision_state = 'deleted' - args.configdrive = 'foo' + args.config_drive = 'foo' self.assertRaises(exceptions.CommandError, n_shell.do_node_set_provision_state, diff --git a/ironicclient/v1/node_shell.py b/ironicclient/v1/node_shell.py index e9e65b5..ca258a2 100644 --- a/ironicclient/v1/node_shell.py +++ b/ironicclient/v1/node_shell.py @@ -303,19 +303,19 @@ def do_node_set_power_state(cc, args): choices=['active', 'deleted', 'rebuild'], help="Supported states: 'active' or 'deleted' or 'rebuild'") @cliutils.arg( - '--configdrive', - metavar='<configdrive>', + '--config-drive', + metavar='<config drive>', default=None, help=('A gzipped base64 encoded config drive string or the path ' 'to the config drive file; Only valid when setting provision ' 'state to "active".')) def do_node_set_provision_state(cc, args): """Provision, rebuild or delete an instance.""" - if args.configdrive and args.provision_state != 'active': + if args.config_drive and args.provision_state != 'active': raise exceptions.CommandError(_('--config-drive is only valid when ' 'setting provision state to "active"')) cc.node.set_provision_state(args.node, args.provision_state, - configdrive=args.configdrive) + configdrive=args.config_drive) @cliutils.arg('node', metavar='<node uuid>', help="UUID of node") |
