Documentation fixes
Fixed various typos/errors/missing pages in the documentation. Change-Id: Ia254d472780434b159c08a8bd11004914ea9dfbc
This commit is contained in:
parent
c6a1ca2396
commit
cf83528ae9
|
@ -4,19 +4,11 @@
|
||||||
.. automodule:: hplefthandclient.http
|
.. automodule:: hplefthandclient.http
|
||||||
:synopsis: HTTP REST Base Class
|
: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:: authenticate
|
||||||
.. automethod:: unauthenticate
|
.. automethod:: unauthenticate
|
||||||
|
.. automethod:: set_debug_flag
|
||||||
.. 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:: request
|
.. automethod:: request
|
||||||
.. automethod:: get
|
.. automethod:: get
|
||||||
.. automethod:: post
|
.. automethod:: post
|
||||||
|
|
|
@ -5,28 +5,29 @@ Changelog
|
||||||
Changes in Version 1.0.0
|
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
|
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
|
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
|
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
|
pass
|
||||||
- Added new API
|
* Added new API
|
||||||
* Find Server Volumes
|
- Find Server Volumes
|
||||||
- Updated the mock Flask server to support server API
|
* Updated the mock Flask server to support server API
|
||||||
calls.
|
calls.
|
||||||
- Added unit tests for 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 a volume unit test that makes sure that volumes are created with the
|
||||||
correct size.
|
correct size.
|
||||||
- Added support for PEP8 checks with tox.
|
* Added support for PEP8 checks with tox.
|
||||||
|
* Fixed various typos in the documentation.
|
||||||
|
|
|
@ -99,8 +99,8 @@ class HPLeftHandClient:
|
||||||
:type name: str
|
:type name: str
|
||||||
|
|
||||||
:returns: cluster
|
:returns: cluster
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_CLUSTER - cluster doesn't exist
|
- NON_EXISTENT_CLUSTER - cluster doesn't exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.get('/clusters?name=%s' % name)
|
response, body = self.http.get('/clusters?name=%s' % name)
|
||||||
return body
|
return body
|
||||||
|
@ -135,8 +135,8 @@ class HPLeftHandClient:
|
||||||
:type name: str
|
:type name: str
|
||||||
|
|
||||||
:returns: server
|
:returns: server
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_SERVER - server doesn't exist
|
- NON_EXISTENT_SERVER - server doesn't exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.get('/servers?name=%s' % name)
|
response, body = self.http.get('/servers?name=%s' % name)
|
||||||
return body
|
return body
|
||||||
|
@ -168,8 +168,8 @@ class HPLeftHandClient:
|
||||||
}
|
}
|
||||||
|
|
||||||
:returns: server
|
:returns: server
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_SERVER - server doesn't exist
|
- NON_EXISTENT_SERVER - server doesn't exist
|
||||||
"""
|
"""
|
||||||
info = {'name': name, 'iscsiIQN': iqn}
|
info = {'name': name, 'iscsiIQN': iqn}
|
||||||
if optional:
|
if optional:
|
||||||
|
@ -184,8 +184,8 @@ class HPLeftHandClient:
|
||||||
|
|
||||||
:param server_id: the server ID to delete
|
:param server_id: the server ID to delete
|
||||||
|
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_SERVER - The server does not exist
|
- NON_EXISTENT_SERVER - The server does not exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.delete('/servers/%s' % server_id)
|
response, body = self.http.delete('/servers/%s' % server_id)
|
||||||
return body
|
return body
|
||||||
|
@ -216,8 +216,8 @@ class HPLeftHandClient:
|
||||||
:param name: The name of the snapshot to find
|
:param name: The name of the snapshot to find
|
||||||
|
|
||||||
:returns: volume
|
:returns: volume
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_SNAP - shapshot doesn't exist
|
- NON_EXISTENT_SNAP - shapshot doesn't exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.get('/snapshots?name=%s' % name)
|
response, body = self.http.get('/snapshots?name=%s' % name)
|
||||||
return body
|
return body
|
||||||
|
@ -258,8 +258,8 @@ class HPLeftHandClient:
|
||||||
|
|
||||||
:param snapshot_id: the snapshot ID to delete
|
:param snapshot_id: the snapshot ID to delete
|
||||||
|
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_SNAPSHOT - The snapshot does not exist
|
- NON_EXISTENT_SNAPSHOT - The snapshot does not exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.delete('/snapshots/%s' % snapshot_id)
|
response, body = self.http.delete('/snapshots/%s' % snapshot_id)
|
||||||
return body
|
return body
|
||||||
|
@ -311,8 +311,8 @@ class HPLeftHandClient:
|
||||||
:type volume_id: str
|
:type volume_id: str
|
||||||
|
|
||||||
:returns: volume
|
:returns: volume
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_VOL - volume doesn't exist
|
- NON_EXISTENT_VOL - volume doesn't exist
|
||||||
"""
|
"""
|
||||||
uri = '/volumes/%s' % volume_id
|
uri = '/volumes/%s' % volume_id
|
||||||
if query:
|
if query:
|
||||||
|
@ -328,8 +328,8 @@ class HPLeftHandClient:
|
||||||
:type name: str
|
:type name: str
|
||||||
|
|
||||||
:returns: volume
|
:returns: volume
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_VOL - volume doesn't exist
|
- NON_EXISTENT_VOL - volume doesn't exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.get('/volumes?name=%s' % name)
|
response, body = self.http.get('/volumes?name=%s' % name)
|
||||||
return body
|
return body
|
||||||
|
@ -392,8 +392,8 @@ class HPLeftHandClient:
|
||||||
|
|
||||||
:returns: List of Volumes
|
:returns: List of Volumes
|
||||||
|
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPConflict` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPConflict`
|
||||||
EXISTENT_SV - Volume Exists already
|
- EXISTENT_SV - Volume Exists already
|
||||||
"""
|
"""
|
||||||
info = {'name': name, 'clusterID': cluster_id, 'size': size}
|
info = {'name': name, 'clusterID': cluster_id, 'size': size}
|
||||||
if optional:
|
if optional:
|
||||||
|
@ -409,8 +409,8 @@ class HPLeftHandClient:
|
||||||
:param name: the name of the volume
|
:param name: the name of the volume
|
||||||
:type name: str
|
:type name: str
|
||||||
|
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_VOL - The volume does not exist
|
- NON_EXISTENT_VOL - The volume does not exist
|
||||||
"""
|
"""
|
||||||
response, body = self.http.delete('/volumes/%s' % volume_id)
|
response, body = self.http.delete('/volumes/%s' % volume_id)
|
||||||
return body
|
return body
|
||||||
|
@ -422,8 +422,8 @@ class HPLeftHandClient:
|
||||||
:type volume_id: str
|
:type volume_id: str
|
||||||
|
|
||||||
:returns: volume
|
:returns: volume
|
||||||
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound` -
|
:raises: :class:`~hplefthandclient.exceptions.HTTPNotFound`
|
||||||
NON_EXISTENT_VOL - volume doesn't exist
|
- NON_EXISTENT_VOL - volume doesn't exist
|
||||||
"""
|
"""
|
||||||
info = {'volume_id': volume_id}
|
info = {'volume_id': volume_id}
|
||||||
info = self._mergeDict(info, optional)
|
info = self._mergeDict(info, optional)
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
HPLeftHand HTTP Client
|
HPLeftHand HTTP Client
|
||||||
|
|
||||||
|
.. module: http
|
||||||
|
|
||||||
:Author: Walter A. Boring IV
|
:Author: Walter A. Boring IV
|
||||||
:Description: This is the HTTP Client that is used to make the actual calls.
|
: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.
|
It includes the authentication that knows the cookie name for LH.
|
||||||
|
|
Loading…
Reference in New Issue