Rename the "all" commands to "bulk"
Change-Id: Ia6ed32024d6e68c9fff291cfdcb7d6a2762c2c10
This commit is contained in:
parent
d1f3cf01aa
commit
57ad4f4534
@ -34,25 +34,25 @@ Import baremetal nodes
|
||||
|
||||
Filename to be imported
|
||||
|
||||
baremetal introspection all start
|
||||
---------------------------------
|
||||
baremetal introspection bulk start
|
||||
----------------------------------
|
||||
|
||||
Begin introspection of all baremetal nodes
|
||||
|
||||
.. program:: baremetal introspection all start
|
||||
.. program:: baremetal introspection bulk start
|
||||
.. code:: bash
|
||||
|
||||
os baremetal introspection all start
|
||||
os baremetal introspection bulk start
|
||||
|
||||
baremetal introspection all status
|
||||
----------------------------------
|
||||
baremetal introspection bulk status
|
||||
-----------------------------------
|
||||
|
||||
Get status of node introspection
|
||||
|
||||
.. program:: baremetal introspection all status
|
||||
.. program:: baremetal introspection bulk status
|
||||
.. code:: bash
|
||||
|
||||
os baremetal introspection all status
|
||||
os baremetal introspection bulk status
|
||||
|
||||
baremetal configure boot
|
||||
------------------------
|
||||
|
@ -198,16 +198,16 @@ pxe_ssh,192.168.122.1,root,"KEY2",00:7c:ef:3d:eb:60""")
|
||||
keystone_client=None)
|
||||
|
||||
|
||||
class TestStartBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
class TestStartBaremetalIntrospectionBulk(fakes.TestBaremetal):
|
||||
|
||||
def setUp(self):
|
||||
super(TestStartBaremetalIntrospectionAll, self).setUp()
|
||||
super(TestStartBaremetalIntrospectionBulk, self).setUp()
|
||||
|
||||
# Get the command object to test
|
||||
self.cmd = baremetal.StartBaremetalIntrospectionAll(self.app, None)
|
||||
self.cmd = baremetal.StartBaremetalIntrospectionBulk(self.app, None)
|
||||
|
||||
@mock.patch('ironic_discoverd.client.introspect')
|
||||
def test_introspect_all_one(self, discoverd_mock):
|
||||
def test_introspect_bulk_one(self, discoverd_mock):
|
||||
|
||||
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
|
||||
client.node.list.return_value = [
|
||||
@ -224,8 +224,8 @@ class TestStartBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
@mock.patch('rdomanager_oscplugin.utils.wait_for_provision_state')
|
||||
@mock.patch('ironic_discoverd.client.get_status')
|
||||
@mock.patch('ironic_discoverd.client.introspect')
|
||||
def test_introspect_all(self, introspect_mock, get_status_mock,
|
||||
wait_for_state_mock, wait_for_discover_mock):
|
||||
def test_introspect_bulk(self, introspect_mock, get_status_mock,
|
||||
wait_for_state_mock, wait_for_discover_mock):
|
||||
|
||||
wait_for_discover_mock.return_value = []
|
||||
wait_for_state_mock.return_value = True
|
||||
@ -265,9 +265,9 @@ class TestStartBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
@mock.patch('rdomanager_oscplugin.utils.wait_for_provision_state')
|
||||
@mock.patch('ironic_discoverd.client.get_status')
|
||||
@mock.patch('ironic_discoverd.client.introspect')
|
||||
def test_introspect_all_no_poll(self, introspect_mock, get_status_mock,
|
||||
wait_for_state_mock,
|
||||
wait_for_discover_mock):
|
||||
def test_introspect_bulk_no_poll(self, introspect_mock, get_status_mock,
|
||||
wait_for_state_mock,
|
||||
wait_for_discover_mock):
|
||||
|
||||
wait_for_discover_mock.return_value = []
|
||||
wait_for_state_mock.return_value = True
|
||||
@ -303,16 +303,16 @@ class TestStartBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
self.assertFalse(wait_for_discover_mock.called)
|
||||
|
||||
|
||||
class TestStatusBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
class TestStatusBaremetalIntrospectionBulk(fakes.TestBaremetal):
|
||||
|
||||
def setUp(self):
|
||||
super(TestStatusBaremetalIntrospectionAll, self).setUp()
|
||||
super(TestStatusBaremetalIntrospectionBulk, self).setUp()
|
||||
|
||||
# Get the command object to test
|
||||
self.cmd = baremetal.StatusBaremetalIntrospectionAll(self.app, None)
|
||||
self.cmd = baremetal.StatusBaremetalIntrospectionBulk(self.app, None)
|
||||
|
||||
@mock.patch('ironic_discoverd.client.get_status')
|
||||
def test_status_all_one(self, discoverd_mock):
|
||||
def test_status_bulk_one(self, discoverd_mock):
|
||||
|
||||
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
|
||||
client.node.list.return_value = [
|
||||
@ -334,7 +334,7 @@ class TestStatusBaremetalIntrospectionAll(fakes.TestBaremetal):
|
||||
[('ABCDEFGH', False, None)]))
|
||||
|
||||
@mock.patch('ironic_discoverd.client.get_status')
|
||||
def test_status_all(self, discoverd_mock):
|
||||
def test_status_bulk(self, discoverd_mock):
|
||||
|
||||
client = self.app.client_manager.rdomanager_oscplugin.baremetal()
|
||||
client.node.list.return_value = [
|
||||
|
@ -108,14 +108,14 @@ class IntrospectionParser(object):
|
||||
return parser
|
||||
|
||||
|
||||
class StartBaremetalIntrospectionAll(IntrospectionParser, command.Command):
|
||||
"""Start introspection on all baremetal nodes"""
|
||||
class StartBaremetalIntrospectionBulk(IntrospectionParser, command.Command):
|
||||
"""Start bulk introspection on all baremetal nodes"""
|
||||
|
||||
log = logging.getLogger(__name__ + ".StartBaremetalIntrospectionAll")
|
||||
log = logging.getLogger(__name__ + ".StartBaremetalIntrospectionBulk")
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(
|
||||
StartBaremetalIntrospectionAll, self).get_parser(prog_name)
|
||||
StartBaremetalIntrospectionBulk, self).get_parser(prog_name)
|
||||
parser.add_argument('--no-poll', dest='poll', action='store_false')
|
||||
parser.set_defaults(poll=True)
|
||||
return parser
|
||||
@ -151,10 +151,10 @@ class StartBaremetalIntrospectionAll(IntrospectionParser, command.Command):
|
||||
uuid, status['error']))
|
||||
|
||||
|
||||
class StatusBaremetalIntrospectionAll(IntrospectionParser, lister.Lister):
|
||||
class StatusBaremetalIntrospectionBulk(IntrospectionParser, lister.Lister):
|
||||
"""Get the status of all baremetal nodes"""
|
||||
|
||||
log = logging.getLogger(__name__ + ".StatusBaremetalIntrospectionAll")
|
||||
log = logging.getLogger(__name__ + ".StatusBaremetalIntrospectionBulk")
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
|
||||
|
@ -57,8 +57,8 @@ openstack.cli.extension =
|
||||
|
||||
openstack.rdomanager_oscplugin.v1 =
|
||||
baremetal_import = rdomanager_oscplugin.v1.baremetal:ImportBaremetal
|
||||
baremetal_introspection_all_start = rdomanager_oscplugin.v1.baremetal:StartBaremetalIntrospectionAll
|
||||
baremetal_introspection_all_status = rdomanager_oscplugin.v1.baremetal:StatusBaremetalIntrospectionAll
|
||||
baremetal_introspection_bulk_start = rdomanager_oscplugin.v1.baremetal:StartBaremetalIntrospectionBulk
|
||||
baremetal_introspection_bulk_status = rdomanager_oscplugin.v1.baremetal:StatusBaremetalIntrospectionBulk
|
||||
baremetal_configure_boot = rdomanager_oscplugin.v1.baremetal:ConfigureBaremetalBoot
|
||||
overcloud_deploy = rdomanager_oscplugin.v1.overcloud_deploy:DeployOvercloud
|
||||
overcloud_image_build = rdomanager_oscplugin.v1.overcloud_image:BuildOvercloudImage
|
||||
|
Loading…
Reference in New Issue
Block a user