Merge "Tweaks to the catalog doc and show command"

This commit is contained in:
Jenkins 2015-01-13 07:45:15 +00:00 committed by Gerrit Code Review
commit 872e509ca5
2 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,7 @@ catalog list
List services in the service catalog
.. program:: catalog list
.. code:: bash
os catalog list
@ -18,7 +19,12 @@ catalog show
Display service catalog details
.. program:: catalog show
.. code:: bash
os catalog show
<service>
.. describe:: <service>
Service to display (type or name)

View File

@ -68,7 +68,7 @@ class ShowCatalog(show.ShowOne):
parser.add_argument(
'service',
metavar='<service>',
help=_('Service to display (type, name or ID)'),
help=_('Service to display (type or name)'),
)
return parser
@ -91,4 +91,9 @@ class ShowCatalog(show.ShowOne):
data.pop('endpoints_links')
break
if not data:
self.app.log.error('service %s not found\n' %
parsed_args.service)
return ([], [])
return zip(*sorted(six.iteritems(data)))