Remove "baremetal show capabilities" command

It has been in conflict with "baremetal show" command provided by Ironic
since Mitaka, and due to that has been completely broken. The only
reason we haven't noticed that is because nobody uses this command.
Let's just remove it.

Change-Id: I645536f0ae0af3bd318db26543a662de659a27a5
(cherry picked from commit 76cb55a26b)
This commit is contained in:
Dmitry Tantsur 2016-10-17 10:10:27 +02:00 committed by Dougal Matthews
parent d963159bcc
commit 8cd130c71c
3 changed files with 0 additions and 49 deletions

View File

@ -58,7 +58,6 @@ openstack.tripleoclient.v1 =
baremetal_instackenv_validate = tripleoclient.v1.baremetal:ValidateInstackEnv
baremetal_import = tripleoclient.v1.baremetal:ImportBaremetal
baremetal_introspection_bulk_start = tripleoclient.v1.baremetal:StartBaremetalIntrospectionBulk
baremetal_show_capabilities = tripleoclient.v1.baremetal:ShowNodeCapabilities
baremetal_introspection_bulk_status = tripleoclient.v1.baremetal:StatusBaremetalIntrospectionBulk
baremetal_configure_ready_state = tripleoclient.v1.baremetal:ConfigureReadyState
baremetal_configure_boot = tripleoclient.v1.baremetal:ConfigureBaremetalBoot

View File

@ -1044,33 +1044,3 @@ class TestConfigureBaremetalBoot(fakes.TestBaremetal):
'tripleo.baremetal.v1.configure',
workflow_input=self.workflow_input
)
class TestShowNodeCapabilities(fakes.TestBaremetal):
def setUp(self):
super(TestShowNodeCapabilities, self).setUp()
# Get the command object to test
self.cmd = baremetal.ShowNodeCapabilities(self.app, None)
def test_success(self):
bm_client = self.app.client_manager.baremetal
bm_client.node.list.return_value = [
mock.Mock(uuid='UUID1'),
mock.Mock(uuid='UUID2'),
]
bm_client.node.get.return_value = mock.Mock(
properties={'capabilities': 'boot_option:local'})
arglist = []
parsed_args = self.check_parser(self.cmd, arglist, [])
result = self.cmd.take_action(parsed_args)
self.assertEqual((
('Node UUID', 'Node Capabilities'),
[('UUID1', 'boot_option:local'), ('UUID2', 'boot_option:local')]
), result)

View File

@ -422,21 +422,3 @@ class ConfigureBaremetalBoot(command.Command):
overwrite_root_device_hints=(
parsed_args.overwrite_root_device_hints)
)
class ShowNodeCapabilities(command.Lister):
"""List the capabilities for all Nodes"""
log = logging.getLogger(__name__ + ".ShowNodeProfile")
def take_action(self, parsed_args):
self.log.warning('This command is deprecated and will be removed soon '
'please use "openstack overcloud profiles list" to '
'get the list of all nodes and their profiles')
bm_client = self.app.client_manager.baremetal
rows = []
for node in bm_client.node.list():
node_detail = bm_client.node.get(node.uuid)
capabilities = node_detail.properties.get('capabilities')
rows.append((node.uuid, capabilities))
return (("Node UUID", "Node Capabilities"), rows, )