diff --git a/ironicclient/osc/v1/baremetal_node.py b/ironicclient/osc/v1/baremetal_node.py index e4cd1d42f..da9ab65cf 100755 --- a/ironicclient/osc/v1/baremetal_node.py +++ b/ironicclient/osc/v1/baremetal_node.py @@ -564,9 +564,7 @@ class ListBaremetalNode(command.Lister): '--provision-state', dest='provision_state', metavar='', - choices=self.PROVISION_STATES, - help=_("Limit list to nodes in . One of %s.") % - (", ".join(self.PROVISION_STATES))) + help=_("List nodes in specified provision state.")) parser.add_argument( '--resource-class', dest='resource_class', diff --git a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py index 55d70eacb..dea2cff6d 100644 --- a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py +++ b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py @@ -778,18 +778,6 @@ class TestBaremetalList(TestBaremetal): **kwargs ) - def test_baremetal_list_invalid_provision_state(self): - arglist = [ - '--provision-state', 'invalid', - ] - verifylist = [ - ('provision_state', 'invalid'), - ] - - self.assertRaises(oscutils.ParserException, - self.check_parser, - self.cmd, arglist, verifylist) - def test_baremetal_list_resource_class(self): arglist = [ '--resource-class', 'foo', diff --git a/releasenotes/notes/osc-node-list-provisionstate-cd98dbddaad93e96.yaml b/releasenotes/notes/osc-node-list-provisionstate-cd98dbddaad93e96.yaml new file mode 100644 index 000000000..e56fa9098 --- /dev/null +++ b/releasenotes/notes/osc-node-list-provisionstate-cd98dbddaad93e96.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Allows all provision states for OSC node list + command with --provision-state argument