summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2015-02-10 14:34:57 +0000
committerLucas Alvares Gomes <lucasagomes@gmail.com>2015-02-10 15:17:36 +0000
commit4390a21663de3123fac306e9860624ba7deda0e6 (patch)
tree225138ab727d0adbf5e71c2f7e78c7fa3bff56f4
parent4fdba6ef0d1ddcf22e3db961657e99e8b5dd2583 (diff)
downloadpython-ironicclient-0.4.1.tar.gz
Rename --configdrive to --config-drive0.4.1
Rename the --configdrive option of the CLI to make it consistent with the --config-drive option in the Nova client. Change-Id: Ic7f4c4b530ba9530bbec21867c6799c53be7eb0e
-rw-r--r--ironicclient/tests/v1/test_node_shell.py8
-rw-r--r--ironicclient/v1/node_shell.py8
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")