Client addition for Active Node Creation verb adopt

Change-Id: I94e07d6a1b3c34dba1982e8c11d0a2faf7271903
Depends-On: Ib3eadf4172e93add9a9855582f56cbb3707f3d39
Partial-Bug: #1526315
This commit is contained in:
Julia Kreger 2016-02-02 10:45:48 -05:00
parent 585575eb8d
commit 7dcb05a5e5
3 changed files with 21 additions and 2 deletions

View File

@ -673,6 +673,18 @@ class NodeShellTest(utils.BaseTestCase):
client_mock.node.set_provision_state.assert_called_once_with(
'node_uuid', 'abort', configdrive=None, cleansteps=None)
def test_do_node_set_provision_state_adopt(self):
client_mock = mock.MagicMock()
args = mock.MagicMock()
args.node = 'node_uuid'
args.provision_state = 'adopt'
args.config_drive = None
args.clean_steps = None
n_shell.do_node_set_provision_state(client_mock, args)
client_mock.node.set_provision_state.assert_called_once_with(
'node_uuid', 'adopt', cleansteps=None, configdrive=None)
def test_do_node_set_console_mode(self):
client_mock = mock.MagicMock()
args = mock.MagicMock()

View File

@ -472,9 +472,10 @@ def do_node_set_target_raid_config(cc, args):
'provision_state',
metavar='<provision-state>',
choices=['active', 'deleted', 'rebuild', 'inspect', 'provide',
'manage', 'clean', 'abort'],
'manage', 'clean', 'abort', 'adopt'],
help="Supported states: 'active', 'deleted', 'rebuild', "
"'inspect', 'provide', 'manage', 'clean' or 'abort'.")
"'inspect', 'provide', 'manage', 'clean', 'abort', "
"or 'adopt'.")
@cliutils.arg(
'--config-drive',
metavar='<config-drive>',

View File

@ -0,0 +1,6 @@
---
features:
- Support has been added for the node-set-provision-state verb
``adopt`` which requires API version 1.17. This feature allows
an operator move a node from ``MANAGABLE`` state to ``ACTIVE``
state without performing cleaning or a deployment operation.