Update headers for the Openstack Orchestration commands
Updated headers for the following commands openstack orchestration service list, openstack orchestration template version list, and openstack orchestration template function list to keep syncronized with other Openstack commands headers Change-Id: I57f03369a501080356e5292582654cd703803b96 Closes-Bug: #1643492
This commit is contained in:
parent
71b4fc35d0
commit
b24df1f39b
@ -32,8 +32,8 @@ class ListService(command.Lister):
|
|||||||
self.log.debug("take_action(%s)", parsed_args)
|
self.log.debug("take_action(%s)", parsed_args)
|
||||||
|
|
||||||
heat_client = self.app.client_manager.orchestration
|
heat_client = self.app.client_manager.orchestration
|
||||||
columns = ['hostname', 'binary', 'engine_id', 'host',
|
columns = ['Hostname', 'Binary', 'Engine ID', 'Host',
|
||||||
'topic', 'updated_at', 'status']
|
'Topic', 'Updated At', 'Status']
|
||||||
services = heat_client.services.list()
|
services = heat_client.services.list()
|
||||||
return (
|
return (
|
||||||
columns,
|
columns,
|
||||||
|
@ -37,7 +37,7 @@ class VersionList(command.Lister):
|
|||||||
client = self.app.client_manager.orchestration
|
client = self.app.client_manager.orchestration
|
||||||
|
|
||||||
versions = client.template_versions.list()
|
versions = client.template_versions.list()
|
||||||
fields = ['version', 'type']
|
fields = ['Version', 'Type']
|
||||||
|
|
||||||
return (
|
return (
|
||||||
fields,
|
fields,
|
||||||
@ -79,7 +79,7 @@ class FunctionList(command.Lister):
|
|||||||
msg = _('Template version not found: %s') % version
|
msg = _('Template version not found: %s') % version
|
||||||
raise exc.CommandError(msg)
|
raise exc.CommandError(msg)
|
||||||
|
|
||||||
fields = ['functions', 'description']
|
fields = ['Functions', 'Description']
|
||||||
return (
|
return (
|
||||||
fields,
|
fields,
|
||||||
(utils.get_item_properties(s, fields) for s in functions)
|
(utils.get_item_properties(s, fields) for s in functions)
|
||||||
|
@ -75,13 +75,13 @@ class SimpleReadOnlyOpenStackClientTest(base.OpenStackClientTestBase):
|
|||||||
def test_openstack_template_version_list(self):
|
def test_openstack_template_version_list(self):
|
||||||
ret = self.openstack('orchestration template version list')
|
ret = self.openstack('orchestration template version list')
|
||||||
tmpl_types = self.parser.listing(ret)
|
tmpl_types = self.parser.listing(ret)
|
||||||
self.assertTableStruct(tmpl_types, ['version', 'type'])
|
self.assertTableStruct(tmpl_types, ['Version', 'Type'])
|
||||||
|
|
||||||
def test_openstack_template_function_list(self):
|
def test_openstack_template_function_list(self):
|
||||||
ret = self.openstack('orchestration template function list '
|
ret = self.openstack('orchestration template function list '
|
||||||
'heat_template_version.2015-10-15')
|
'heat_template_version.2015-10-15')
|
||||||
tmpl_functions = self.parser.listing(ret)
|
tmpl_functions = self.parser.listing(ret)
|
||||||
self.assertTableStruct(tmpl_functions, ['functions', 'description'])
|
self.assertTableStruct(tmpl_functions, ['Functions', 'Description'])
|
||||||
|
|
||||||
def test_openstack_resource_type_list(self):
|
def test_openstack_resource_type_list(self):
|
||||||
ret = self.openstack('orchestration resource type list')
|
ret = self.openstack('orchestration resource type list')
|
||||||
|
@ -45,8 +45,8 @@ class TestServiceList(orchestration_fakes.TestOrchestrationv1):
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
|
|
||||||
columns = ['hostname', 'binary', 'engine_id', 'host',
|
columns = ['Hostname', 'Binary', 'Engine ID', 'Host',
|
||||||
'topic', 'updated_at', 'status']
|
'Topic', 'Updated At', 'Status']
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestServiceList, self).setUp()
|
super(TestServiceList, self).setUp()
|
||||||
|
@ -46,7 +46,7 @@ class TestTemplateVersionList(TestTemplate):
|
|||||||
|
|
||||||
columns, data = self.cmd.take_action(parsed_args)
|
columns, data = self.cmd.take_action(parsed_args)
|
||||||
|
|
||||||
self.assertEqual(['version', 'type'], columns)
|
self.assertEqual(['Version', 'Type'], columns)
|
||||||
self.assertEqual([('HOT123', 'hot'), ('CFN456', 'cfn')], list(data))
|
self.assertEqual([('HOT123', 'hot'), ('CFN456', 'cfn')], list(data))
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class TestTemplateFunctionList(TestTemplate):
|
|||||||
self.template_versions.get.return_value = [self.tv1, self.tv2]
|
self.template_versions.get.return_value = [self.tv1, self.tv2]
|
||||||
columns, data = self.cmd.take_action(parsed_args)
|
columns, data = self.cmd.take_action(parsed_args)
|
||||||
|
|
||||||
self.assertEqual(['functions', 'description'], columns)
|
self.assertEqual(['Functions', 'Description'], columns)
|
||||||
self.assertEqual([('func1', 'Function 1'), ('func2', 'Function 2')],
|
self.assertEqual([('func1', 'Function 1'), ('func2', 'Function 2')],
|
||||||
list(data))
|
list(data))
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class TestTemplateFunctionList(TestTemplate):
|
|||||||
self.tv_with_cf]
|
self.tv_with_cf]
|
||||||
columns, data = self.cmd.take_action(parsed_args)
|
columns, data = self.cmd.take_action(parsed_args)
|
||||||
|
|
||||||
self.assertEqual(['functions', 'description'], columns)
|
self.assertEqual(['Functions', 'Description'], columns)
|
||||||
self.assertEqual([('func1', 'Function 1'),
|
self.assertEqual([('func1', 'Function 1'),
|
||||||
('func2', 'Function 2'),
|
('func2', 'Function 2'),
|
||||||
('condition func', 'Condition Function')],
|
('condition func', 'Condition Function')],
|
||||||
|
8
releasenotes/notes/bug-1643492-2d7537b55f347722.yaml
Normal file
8
releasenotes/notes/bug-1643492-2d7537b55f347722.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- |
|
||||||
|
Updated the Openstack orchestration Commands headers for
|
||||||
|
``openstack orchestration service list``,
|
||||||
|
``openstack orchestration template version list``, and
|
||||||
|
``openstack orchestration template function list`` commands
|
||||||
|
[Bug `1643492 <https://bugs.launchpad.net/bugs/1643492>`_]
|
Loading…
Reference in New Issue
Block a user