summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2015-01-09 23:44:25 -0500
committerSteve Martinelli <stevemar@ca.ibm.com>2015-01-13 05:59:38 +0000
commitc04b49ef07defdecadcf614d9ff4cde4b3dd029b (patch)
tree53c3c815d8157e411df2852cd5bf4ed3c8e3917e
parent019c155e9b308dab002f23064b969452bc3d7a89 (diff)
downloadpython-openstackclient-c04b49ef07defdecadcf614d9ff4cde4b3dd029b.tar.gz
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
-rw-r--r--doc/source/command-objects/catalog.rst6
-rw-r--r--openstackclient/identity/v2_0/catalog.py7
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/source/command-objects/catalog.rst b/doc/source/command-objects/catalog.rst
index 4e67f3a4..89db95d5 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
<service>
+
+.. describe:: <service>
+
+ Service to display (type or name)
diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py
index 330dcf3b..3aeca918 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='<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)))