Added docstring examples to glance methods and nova.list

This commit is contained in:
Justin Anderson 2016-05-24 15:35:44 -06:00
parent ebf1256545
commit 0b1cae05d9
2 changed files with 25 additions and 0 deletions

View file

@ -448,6 +448,12 @@ def image_schema(profile=None):
'''
Returns names and descriptions of the schema "image"'s
properties for this profile's instance of glance
CLI Example:
.. code-block:: bash
salt '*' glance.image_schema
'''
return schema_get('image', profile)
@ -459,6 +465,13 @@ def image_update(id=None, name=None, profile=None, **kwargs): # pylint: disable
- min_ram (in MB)
- protected (bool)
- visibility ('public' or 'private')
CLI Example:
.. code-block:: bash
salt '*' glance.image_update id=c2eb2eb0-53e1-4a80-b990-8ec887eae7df
salt '*' glance.image_update name=f16-jeos
'''
if id:
image = image_show(id=id, profile=profile)
@ -512,6 +525,12 @@ def schema_get(name, profile=None):
- images
- member
- members
CLI Example:
.. code-block:: bash
salt '*' glance.schema_get name=f16-jeos
'''
g_client = _auth(profile)
pformat = pprint.PrettyPrinter(indent=4).pformat

View file

@ -559,6 +559,12 @@ def list_(profile=None):
'''
To maintain the feel of the nova command line, this function simply calls
the server_list function.
CLI Example:
.. code-block:: bash
salt '*' nova.list
'''
return server_list(profile=profile)