Documentation fixes

Fixed various typos/errors/missing pages in the documentation.

Change-Id: Ia254d472780434b159c08a8bd11004914ea9dfbc
This commit is contained in:
Anthony Lee 2014-12-12 15:01:57 -08:00
parent c6a1ca2396
commit cf83528ae9
4 changed files with 38 additions and 42 deletions

View File

@ -4,19 +4,11 @@
.. automodule:: hplefthandclient.http
:synopsis: HTTP REST Base Class
.. autoclass::hplefthandclient.http(api_url, [insecure=False[,http_log_debug=False]])
.. autoclass:: hplefthandclient.http.HTTPJSONRESTClient(api_url, [insecure=False[,http_log_debug=False]])
.. automethod:: authenticate
.. automethod:: unauthenticate
.. describe:: c[db_name] || c.db_name
Get the `db_name` :class:`~pymongo.database.Database` on :class:`Connection` `c`.
Raises :class:`~pymongo.errors.InvalidName` if an invalid database name is used.
.. autoattribute:: api_url
.. autoattribute:: http_log_debug
.. automethod:: set_debug_flag
.. automethod:: request
.. automethod:: get
.. automethod:: post

View File

@ -5,28 +5,29 @@ Changelog
Changes in Version 1.0.0
------------------------
- First implementation of the REST API Client
* First implementation of the REST API Client
Changes in Version 1.0.1
------------------------
- Updated the REST API Client to be Python 3.0 compliant
* Updated the REST API Client to be Python 3.0 compliant
Changes in Version 1.0.2
------------------------
- Added support for query parameter in getVolume
* Added support for query parameter in getVolume
Changes in Version 1.0.3
------------------------
- Added missing Flask imports so that running unit tests against the mock LHOS
* Added missing Flask imports so that running unit tests against the mock LHOS
pass
- Added new API
* Find Server Volumes
- Updated the mock Flask server to support server API
* Added new API
- Find Server Volumes
* Updated the mock Flask server to support server API
calls.
- Added unit tests for server API calls.
- Added a volume unit test that makes sure that volumes are created with the
* Added unit tests for server API calls.
* Added a volume unit test that makes sure that volumes are created with the
correct size.
- Added support for PEP8 checks with tox.
* Added support for PEP8 checks with tox.
* Fixed various typos in the documentation.

View File

@ -99,8 +99,8 @@ class HPLeftHandClient:
:type name: str
:returns: cluster
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_CLUSTER - cluster doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_CLUSTER - cluster doesn't exist
"""
response, body = self.http.get('/clusters?name=%s' % name)
return body
@ -135,8 +135,8 @@ class HPLeftHandClient:
:type name: str
:returns: server
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_SERVER - server doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_SERVER - server doesn't exist
"""
response, body = self.http.get('/servers?name=%s' % name)
return body
@ -168,8 +168,8 @@ class HPLeftHandClient:
}
:returns: server
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_SERVER - server doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_SERVER - server doesn't exist
"""
info = {'name': name, 'iscsiIQN': iqn}
if optional:
@ -184,8 +184,8 @@ class HPLeftHandClient:
:param server_id: the server ID to delete
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_SERVER - The server does not exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_SERVER - The server does not exist
"""
response, body = self.http.delete('/servers/%s' % server_id)
return body
@ -216,8 +216,8 @@ class HPLeftHandClient:
:param name: The name of the snapshot to find
:returns: volume
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_SNAP - shapshot doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_SNAP - shapshot doesn't exist
"""
response, body = self.http.get('/snapshots?name=%s' % name)
return body
@ -258,8 +258,8 @@ class HPLeftHandClient:
:param snapshot_id: the snapshot ID to delete
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_SNAPSHOT - The snapshot does not exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_SNAPSHOT - The snapshot does not exist
"""
response, body = self.http.delete('/snapshots/%s' % snapshot_id)
return body
@ -311,8 +311,8 @@ class HPLeftHandClient:
:type volume_id: str
:returns: volume
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_VOL - volume doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_VOL - volume doesn't exist
"""
uri = '/volumes/%s' % volume_id
if query:
@ -328,8 +328,8 @@ class HPLeftHandClient:
:type name: str
:returns: volume
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_VOL - volume doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_VOL - volume doesn't exist
"""
response, body = self.http.get('/volumes?name=%s' % name)
return body
@ -392,8 +392,8 @@ class HPLeftHandClient:
:returns: List of Volumes
:raises: :class:`~hplefthandclient.exceptions.HTTPConflict` -
EXISTENT_SV - Volume Exists already
:raises: :class:`~hplefthandclient.exceptions.HTTPConflict`
- EXISTENT_SV - Volume Exists already
"""
info = {'name': name, 'clusterID': cluster_id, 'size': size}
if optional:
@ -409,8 +409,8 @@ class HPLeftHandClient:
:param name: the name of the volume
:type name: str
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_VOL - The volume does not exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_VOL - The volume does not exist
"""
response, body = self.http.delete('/volumes/%s' % volume_id)
return body
@ -422,8 +422,8 @@ class HPLeftHandClient:
:type volume_id: str
:returns: volume
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
NON_EXISTENT_VOL - volume doesn't exist
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
- NON_EXISTENT_VOL - volume doesn't exist
"""
info = {'volume_id': volume_id}
info = self._mergeDict(info, optional)

View File

@ -17,6 +17,9 @@
"""
HPLeftHand HTTP Client
.. module: http
:Author: Walter A. Boring IV
:Description: This is the HTTP Client that is used to make the actual calls.
It includes the authentication that knows the cookie name for LH.