Tweaks to the catalog doc and show command

Looks like providing a service id isn't working, so it the help
message was reduced to just type and name.
Added a bit more to the docs, too.

Change-Id: Id7f8b48bdf99773ad55ca7f204f3c779f84633d5
This commit is contained in:
Steve Martinelli 2015-01-09 23:44:25 -05:00
parent 019c155e9b
commit c04b49ef07
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
@ -96,4 +96,9 @@ class ShowCatalog(show.ShowOne):
if 'endpoints_links' in data:
data.pop('endpoints_links')
if not data:
self.app.log.error('service %s not found\n' %
parsed_args.service)
return ([], [])
return zip(*sorted(six.iteritems(data)))