From c2c3f2e0f23f857aa2c8ce17e310996e90ea9b54 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 16 Jan 2015 10:54:00 -0600 Subject: Update service clist commands for v2 and v3 Changes to the 'service list' commands for Identity v2 and v3: * Document support for --long * Add Description to v3 output with --long * v3 output is now (ID, Name, Type), with (Description, Enabled) added with --long * Change v2 output to match v3 output, with the absense of Enabled. * Update doc to match Closes-Bug: #1411337 Change-Id: I999e3df22f61350cdeba63bbb7d01145c2ffeeaf --- openstackclient/identity/v2_0/service.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'openstackclient/identity/v2_0') diff --git a/openstackclient/identity/v2_0/service.py b/openstackclient/identity/v2_0/service.py index 208f7fbc..f8630238 100644 --- a/openstackclient/identity/v2_0/service.py +++ b/openstackclient/identity/v2_0/service.py @@ -125,7 +125,8 @@ class ListService(lister.Lister): '--long', action='store_true', default=False, - help=_('List additional fields in output')) + help=_('List additional fields in output'), + ) return parser def take_action(self, parsed_args): @@ -134,13 +135,12 @@ class ListService(lister.Lister): if parsed_args.long: columns = ('ID', 'Name', 'Type', 'Description') else: - columns = ('ID', 'Name') + columns = ('ID', 'Name', 'Type') data = self.app.client_manager.identity.services.list() - return (columns, - (utils.get_item_properties( - s, columns, - formatters={}, - ) for s in data)) + return ( + columns, + (utils.get_item_properties(s, columns) for s in data), + ) class ShowService(show.ShowOne): -- cgit v1.2.1