Skip to content

Commit c04b49e

Browse files
author
Steve Martinelli
committed
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
1 parent 019c155 commit c04b49e

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎doc/source/command-objects/catalog.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ catalog list
99

1010
List services in the service catalog
1111

12+
.. program:: catalog list
1213
.. code:: bash
1314
1415
os catalog list
@@ -18,7 +19,12 @@ catalog show
1819

1920
Display service catalog details
2021

22+
.. program:: catalog show
2123
.. code:: bash
2224
2325
os catalog show
2426
<service>
27+
28+
.. describe:: <service>
29+
30+
Service to display (type or name)

‎openstackclient/identity/v2_0/catalog.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def get_parser(self, prog_name):
6868
parser.add_argument(
6969
'service',
7070
metavar='<service>',
71-
help=_('Service to display (type, name or ID)'),
71+
help=_('Service to display (type or name)'),
7272
)
7373
return parser
7474

@@ -96,4 +96,9 @@ def take_action(self, parsed_args):
9696
if 'endpoints_links' in data:
9797
data.pop('endpoints_links')
9898

99+
if not data:
100+
self.app.log.error('service %s not found\n' %
101+
parsed_args.service)
102+
return ([], [])
103+
99104
return zip(*sorted(six.iteritems(data)))

0 commit comments

Comments
 (0)