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:
Vijendra Soni 2016-11-21 07:02:23 +05:30
parent 71b4fc35d0
commit b24df1f39b
6 changed files with 19 additions and 11 deletions

View File

@ -32,8 +32,8 @@ class ListService(command.Lister):
self.log.debug("take_action(%s)", parsed_args)
heat_client = self.app.client_manager.orchestration
columns = ['hostname', 'binary', 'engine_id', 'host',
'topic', 'updated_at', 'status']
columns = ['Hostname', 'Binary', 'Engine ID', 'Host',
'Topic', 'Updated At', 'Status']
services = heat_client.services.list()
return (
columns,

View File

@ -37,7 +37,7 @@ class VersionList(command.Lister):
client = self.app.client_manager.orchestration
versions = client.template_versions.list()
fields = ['version', 'type']
fields = ['Version', 'Type']
return (
fields,
@ -79,7 +79,7 @@ class FunctionList(command.Lister):
msg = _('Template version not found: %s') % version
raise exc.CommandError(msg)
fields = ['functions', 'description']
fields = ['Functions', 'Description']
return (
fields,
(utils.get_item_properties(s, fields) for s in functions)

View File

@ -75,13 +75,13 @@ class SimpleReadOnlyOpenStackClientTest(base.OpenStackClientTestBase):
def test_openstack_template_version_list(self):
ret = self.openstack('orchestration template version list')
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):
ret = self.openstack('orchestration template function list '
'heat_template_version.2015-10-15')
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):
ret = self.openstack('orchestration resource type list')

View File

@ -45,8 +45,8 @@ class TestServiceList(orchestration_fakes.TestOrchestrationv1):
}
]}
columns = ['hostname', 'binary', 'engine_id', 'host',
'topic', 'updated_at', 'status']
columns = ['Hostname', 'Binary', 'Engine ID', 'Host',
'Topic', 'Updated At', 'Status']
def setUp(self):
super(TestServiceList, self).setUp()

View File

@ -46,7 +46,7 @@ class TestTemplateVersionList(TestTemplate):
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))
@ -73,7 +73,7 @@ class TestTemplateFunctionList(TestTemplate):
self.template_versions.get.return_value = [self.tv1, self.tv2]
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')],
list(data))
@ -84,7 +84,7 @@ class TestTemplateFunctionList(TestTemplate):
self.tv_with_cf]
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'),
('condition func', 'Condition Function')],

View 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>`_]