Sphinx-ify QuantumPluginBaseV2 docstrings
The quantum.quantum_plugin_base_v2 module had some good docstrings, but there was no corresponding sphinx code that would generate docs from them. There were also some syntax issues with the sphinx markup in the docstrings. This change adds sphinx directives so these docs will be auto- generated. It also modifies the docstrings in the QuantumPluginBaseV2 methods so they are parsed by the Sphinx documentation generator without any errors. If this patch is accepted, a "Plugin API" link to these docs will appear at http://docs.openstack.org/developer/quantum/ Fixes bug 1186255 Change-Id: I96eddcc516d109766d7f4c52edd595748696b595
This commit is contained in:
parent
b8960ea393
commit
28884ffaa4
7
doc/source/devref/plugin-api.rst
Normal file
7
doc/source/devref/plugin-api.rst
Normal file
@ -0,0 +1,7 @@
|
||||
Plugin API
|
||||
==========
|
||||
|
||||
.. automodule:: quantum.quantum_plugin_base_v2
|
||||
|
||||
.. autoclass:: QuantumPluginBaseV2
|
||||
:members:
|
@ -44,6 +44,7 @@ Development Documents
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
devref/plugin-api
|
||||
devref/index
|
||||
devref/common
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
"""
|
||||
v2 Quantum Plug-in API specification.
|
||||
|
||||
QuantumPluginBase provides the definition of minimum set of
|
||||
:class:`QuantumPluginBaseV2` provides the definition of minimum set of
|
||||
methods that needs to be implemented by a v2 Quantum Plug-in.
|
||||
"""
|
||||
|
||||
@ -36,10 +36,12 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
Create a subnet, which represents a range of IP addresses
|
||||
that can be allocated to devices
|
||||
|
||||
:param context: quantum api request context
|
||||
:param subnet: dictionary describing the subnet, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP` object
|
||||
in :file:`quantum/api/v2/attributes.py`. All keys will
|
||||
be populated.
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -50,9 +52,10 @@ class QuantumPluginBaseV2(object):
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the subnet to update.
|
||||
:param subnet: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
valid keys are those that have a value of True for
|
||||
'allow_put' as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`.
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -63,8 +66,9 @@ class QuantumPluginBaseV2(object):
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the subnet to fetch.
|
||||
:param fields: a list of strings that are valid keys in a
|
||||
subnet dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
subnet dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -77,17 +81,20 @@ class QuantumPluginBaseV2(object):
|
||||
The contents of the list depends on
|
||||
the identity of the user making the request (as indicated by the
|
||||
context) as well as any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a subnet as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a subnet as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP`
|
||||
object in :file:`quantum/api/v2/attributes.py`.
|
||||
Values in this dictiontary are an iterable containing
|
||||
values that will be used for an exact match comparison
|
||||
for that value. Each result returned by this
|
||||
function will have matched one of the values for each
|
||||
key in filters.
|
||||
:param fields: a list of strings that are valid keys in a
|
||||
subnet dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
subnet dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -98,16 +105,18 @@ class QuantumPluginBaseV2(object):
|
||||
The result depends on the identity of
|
||||
the user making the request (as indicated by the context) as well as
|
||||
any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a network as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Values in this
|
||||
dictiontary are an iterable containing values that
|
||||
will be used for an exact match comparison for that
|
||||
value. Each result returned by this function will
|
||||
have matched one of the values for each key in filters.
|
||||
|
||||
NOTE: this method is optional, as it was not part of the originally
|
||||
.. note:: this method is optional, as it was not part of the originally
|
||||
defined plugin API.
|
||||
"""
|
||||
raise exceptions.NotImplementedError()
|
||||
@ -127,10 +136,13 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
Create a network, which represents an L2 network segment which
|
||||
can have a set of subnets and ports associated with it.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param network: dictionary describing the network, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP` object
|
||||
in :file:`quantum/api/v2/attributes.py`. All keys will
|
||||
be populated.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -141,9 +153,10 @@ class QuantumPluginBaseV2(object):
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the network to update.
|
||||
:param network: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
valid keys are those that have a value of True for
|
||||
'allow_put' as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`.
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -154,8 +167,9 @@ class QuantumPluginBaseV2(object):
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the network to fetch.
|
||||
:param fields: a list of strings that are valid keys in a
|
||||
network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
network dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -168,17 +182,20 @@ class QuantumPluginBaseV2(object):
|
||||
The contents of the list depends on
|
||||
the identity of the user making the request (as indicated by the
|
||||
context) as well as any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a network as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Values in this
|
||||
dictiontary are an iterable containing values that will
|
||||
be used for an exact match comparison for that value.
|
||||
Each result returned by this function will have matched
|
||||
one of the values for each key in filters.
|
||||
:param fields: a list of strings that are valid keys in a
|
||||
network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
network dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -189,14 +206,16 @@ class QuantumPluginBaseV2(object):
|
||||
The result depends on the identity
|
||||
of the user making the request (as indicated by the context) as well
|
||||
as any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a network as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object
|
||||
in :file:`quantum/api/v2/attributes.py`. Values in
|
||||
this dictiontary are an iterable containing values that
|
||||
will be used for an exact match comparison for that
|
||||
value. Each result returned by this function will have
|
||||
matched one of the values for each key in filters.
|
||||
|
||||
NOTE: this method is optional, as it was not part of the originally
|
||||
defined plugin API.
|
||||
@ -218,10 +237,12 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
Create a port, which is a connection point of a device (e.g., a VM
|
||||
NIC) to attach to a L2 Quantum network.
|
||||
|
||||
:param context: quantum api request context
|
||||
: param port: dictionary describing the port, with keys
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py. All keys will be populated.
|
||||
:param port: dictionary describing the port, with keys as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. All keys will be
|
||||
populated.
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -232,9 +253,9 @@ class QuantumPluginBaseV2(object):
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the port to update.
|
||||
:param port: dictionary with keys indicating fields to update.
|
||||
valid keys are those that have a value of True for 'allow_put'
|
||||
as listed in the RESOURCE_ATTRIBUTE_MAP object in
|
||||
quantum/api/v2/attributes.py.
|
||||
valid keys are those that have a value of True for
|
||||
'allow_put' as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP`
|
||||
object in :file:`quantum/api/v2/attributes.py`.
|
||||
"""
|
||||
pass
|
||||
|
||||
@ -244,9 +265,10 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
:param context: quantum api request context
|
||||
:param id: UUID representing the port to fetch.
|
||||
: param fields: a list of strings that are valid keys in a
|
||||
port dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
:param fields: a list of strings that are valid keys in a port
|
||||
dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -258,17 +280,19 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
The contents of the list depends on the identity of the user making
|
||||
the request (as indicated by the context) as well as any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a port as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a port as listed in the :obj:`RESOURCE_ATTRIBUTE_MAP`
|
||||
object in :file:`quantum/api/v2/attributes.py`. Values
|
||||
in this dictiontary are an iterable containing values
|
||||
that will be used for an exact match comparison for
|
||||
that value. Each result returned by this function will
|
||||
have matched one of the values for each key in filters.
|
||||
:param fields: a list of strings that are valid keys in a
|
||||
port dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
|
||||
object in quantum/api/v2/attributes.py. Only these fields
|
||||
port dictionary as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Only these fields
|
||||
will be returned.
|
||||
"""
|
||||
pass
|
||||
@ -278,16 +302,18 @@ class QuantumPluginBaseV2(object):
|
||||
|
||||
The result depends on the identity of the user making the request
|
||||
(as indicated by the context) as well as any filters.
|
||||
|
||||
:param context: quantum api request context
|
||||
:param filters: a dictionary with keys that are valid keys for
|
||||
a network as listed in the RESOURCE_ATTRIBUTE_MAP object
|
||||
in quantum/api/v2/attributes.py. Values in this dictiontary
|
||||
are an iterable containing values that will be used for an exact
|
||||
match comparison for that value. Each result returned by this
|
||||
function will have matched one of the values for each key in
|
||||
filters.
|
||||
a network as listed in the
|
||||
:obj:`RESOURCE_ATTRIBUTE_MAP` object in
|
||||
:file:`quantum/api/v2/attributes.py`. Values in this
|
||||
dictiontary are an iterable containing values that will
|
||||
be used for an exact match comparison for that value.
|
||||
Each result returned by this function will have matched
|
||||
one of the values for each key in filters.
|
||||
|
||||
NOTE: this method is optional, as it was not part of the originally
|
||||
.. note:: this method is optional, as it was not part of the originally
|
||||
defined plugin API.
|
||||
"""
|
||||
raise exceptions.NotImplementedError()
|
||||
|
Loading…
x
Reference in New Issue
Block a user