Skip to content

Commit 872e509

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Tweaks to the catalog doc and show command"
2 parents 2525ec4 + c04b49e commit 872e509

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

@@ -91,4 +91,9 @@ def take_action(self, parsed_args):
9191
data.pop('endpoints_links')
9292
break
9393

94+
if not data:
95+
self.app.log.error('service %s not found\n' %
96+
parsed_args.service)
97+
return ([], [])
98+
9499
return zip(*sorted(six.iteritems(data)))

0 commit comments

Comments
 (0)