Fixes for magnum objects doc string
1. Some functions miss description for 'context' parameter. 2. Typo in container object, 'bay' -> 'container' Change-Id: I7b90a169561640ee0b73d15baf72eaee8717de50
This commit is contained in:
@@ -69,6 +69,7 @@ class Bay(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a bay based on its id or uuid and return a Bay object.
|
||||
|
||||
:param bay_id: the id *or* uuid of a bay.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Bay` object.
|
||||
"""
|
||||
if utils.is_int_like(bay_id):
|
||||
@@ -83,6 +84,7 @@ class Bay(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a bay based on its integer id and return a Bay object.
|
||||
|
||||
:param bay_id: the id of a bay.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Bay` object.
|
||||
"""
|
||||
db_bay = cls.dbapi.get_bay_by_id(context, bay_id)
|
||||
|
||||
@@ -84,6 +84,7 @@ class BayModel(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a baymodel based on its id or uuid and return a BayModel object.
|
||||
|
||||
:param baymodel_id: the id *or* uuid of a baymodel.
|
||||
:param context: Security context
|
||||
:returns: a :class:`BayModel` object.
|
||||
"""
|
||||
if utils.is_int_like(baymodel_id):
|
||||
@@ -98,6 +99,7 @@ class BayModel(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a baymodel based on its integer id and return a BayModel object.
|
||||
|
||||
:param baymodel_id: the id of a baymodel.
|
||||
:param context: Security context
|
||||
:returns: a :class:`BayModel` object.
|
||||
"""
|
||||
db_baymodel = cls.dbapi.get_baymodel_by_id(context, baymodel_id)
|
||||
|
||||
@@ -62,6 +62,7 @@ class Container(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a container based on its integer id and return a Container object.
|
||||
|
||||
:param container_id: the id of a container.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Container` object.
|
||||
"""
|
||||
db_container = cls.dbapi.get_container_by_id(context, container_id)
|
||||
@@ -82,11 +83,11 @@ class Container(base.MagnumPersistentObject, base.MagnumObject,
|
||||
|
||||
@base.remotable_classmethod
|
||||
def get_by_name(cls, context, name):
|
||||
"""Find a bay based on name and return a Bay object.
|
||||
"""Find a container based on name and return a Container object.
|
||||
|
||||
:param name: the logical name of a bay.
|
||||
:param name: the logical name of a container.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Bay` object.
|
||||
:returns: a :class:`Container` object.
|
||||
"""
|
||||
db_bay = cls.dbapi.get_container_by_name(context, name)
|
||||
bay = Container._from_db_object(cls(context), db_bay)
|
||||
|
||||
@@ -56,6 +56,7 @@ class MagnumService(base.MagnumPersistentObject, base.MagnumObject,
|
||||
|
||||
:param host: The host on which the binary is running.
|
||||
:param binary: The name of the binary.
|
||||
:param context: Security context.
|
||||
:returns: a :class:`MagnumService` object.
|
||||
"""
|
||||
db_magnum_service = cls.dbapi.get_magnum_service_by_host_and_binary(
|
||||
|
||||
@@ -53,6 +53,7 @@ class Node(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a node based on its integer id and return a Node object.
|
||||
|
||||
:param node_id: the id of a node.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Node` object.
|
||||
"""
|
||||
db_node = cls.dbapi.get_node_by_id(context, node_id)
|
||||
|
||||
@@ -65,6 +65,7 @@ class Pod(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a pod based on its integer id and return a Pod object.
|
||||
|
||||
:param pod_id: the id of a pod.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Pod` object.
|
||||
"""
|
||||
db_pod = cls.dbapi.get_pod_by_id(context, pod_id)
|
||||
|
||||
@@ -65,6 +65,7 @@ class Service(base.MagnumPersistentObject, base.MagnumObject,
|
||||
"""Find a service based on its integer id and return a Service object.
|
||||
|
||||
:param service_id: the id of a service.
|
||||
:param context: Security context
|
||||
:returns: a :class:`Service` object.
|
||||
"""
|
||||
db_service = cls.dbapi.get_service_by_id(context, service_id)
|
||||
|
||||
@@ -61,6 +61,7 @@ class X509KeyPair(base.MagnumPersistentObject, base.MagnumObject,
|
||||
Find X509KeyPair by id or uuid and return a X509KeyPair object.
|
||||
|
||||
:param x509keypair_id: the id *or* uuid of a x509keypair.
|
||||
:param context: Security context
|
||||
:returns: a :class:`X509KeyPair` object.
|
||||
"""
|
||||
if utils.is_int_like(x509keypair_id):
|
||||
@@ -77,6 +78,7 @@ class X509KeyPair(base.MagnumPersistentObject, base.MagnumObject,
|
||||
Find X509KeyPair by id and return a X509KeyPair object.
|
||||
|
||||
:param x509keypair_id: the id of a x509keypair.
|
||||
:param context: Security context
|
||||
:returns: a :class:`X509KeyPair` object.
|
||||
"""
|
||||
db_x509keypair = cls.dbapi.get_x509keypair_by_id(context,
|
||||
|
||||
Reference in New Issue
Block a user