diff --git a/doc/source/command-objects/catalog.rst b/doc/source/command-objects/catalog.rst index 4e67f3a4e3..89db95d5d4 100644 --- a/doc/source/command-objects/catalog.rst +++ b/doc/source/command-objects/catalog.rst @@ -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 + +.. describe:: + + Service to display (type or name) diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py index 0558c07596..f604837894 100644 --- a/openstackclient/identity/v2_0/catalog.py +++ b/openstackclient/identity/v2_0/catalog.py @@ -68,7 +68,7 @@ class ShowCatalog(show.ShowOne): parser.add_argument( 'service', metavar='', - 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)))