summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavanum Srinivas <dims@linux.vnet.ibm.com>2014-08-01 10:33:41 -0400
committerDavanum Srinivas (dims) <davanum@gmail.com>2014-08-08 22:07:31 +0000
commit11aaf21d9e239c0b017a89f82f678d264f0d403b (patch)
tree0e1250fb548652a840538ec594033997b332ae33
parent6a9fe989e8d20ba43ed1a2bf318bc41b745f318e (diff)
downloadnova-11aaf21d9e239c0b017a89f82f678d264f0d403b.tar.gz
docs - Fix errors,warnings from document generation
SEVERE: Unexpected section title. ERROR: Unexpected indentation. WARNING: Block quote ends without a blank line; unexpected unindent. WARNING: Definition list ends without a blank line; unexpected unindent. WARNING: Field list ends without a blank line; unexpected unindent. WARNING: Inline emphasis start-string without end-string. WARNING: Inline interpreted text or phrase reference start-string without end-string. WARNING: Inline strong start-string without end-string. Partial-Bug: #1351350 Change-Id: I661e0e32519f8e4de3325efd10242824015ed03d
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py68
-rw-r--r--nova/api/openstack/compute/plugins/v3/hosts.py69
-rw-r--r--nova/compute/resource_tracker.py6
-rw-r--r--nova/db/sqlalchemy/api.py43
-rw-r--r--nova/db/sqlalchemy/utils.py6
-rw-r--r--nova/hooks.py32
-rw-r--r--nova/image/api.py4
-rw-r--r--nova/keymgr/key_mgr.py4
-rw-r--r--nova/notifications.py13
-rw-r--r--nova/objects/base.py6
-rw-r--r--nova/objects/instance.py27
-rw-r--r--nova/objects/pci_device.py14
-rw-r--r--nova/openstack/common/network_utils.py15
-rw-r--r--nova/openstack/common/report/report.py6
-rw-r--r--nova/pci/pci_request.py54
-rw-r--r--nova/scheduler/filters/isolated_hosts_filter.py22
-rw-r--r--nova/scheduler/filters/pci_passthrough_filter.py14
-rw-r--r--nova/scheduler/filters/trusted_filter.py11
-rw-r--r--nova/tests/api/openstack/compute/plugins/v3/test_servers.py18
-rw-r--r--nova/tests/api/openstack/compute/test_servers.py16
-rw-r--r--nova/tests/compute/test_resource_tracker.py5
-rw-r--r--nova/tests/db/test_migrations.py16
-rw-r--r--nova/tests/image_fixtures.py21
23 files changed, 259 insertions, 231 deletions
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
index cb2303799a..6a08836b71 100644
--- a/nova/api/openstack/compute/contrib/hosts.py
+++ b/nova/api/openstack/compute/contrib/hosts.py
@@ -97,39 +97,41 @@ class HostController(object):
@wsgi.serializers(xml=HostIndexTemplate)
def index(self, req):
"""Returns a dict in the format:
- {'hosts': [{'host_name': 'some.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'some.other.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'some.celly.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'console1.host.com',
- 'service': 'consoleauth',
- 'zone': 'internal'},
- {'host_name': 'network1.host.com',
- 'service': 'network',
- 'zone': 'internal'},
- {'host_name': 'netwwork2.host.com',
- 'service': 'network',
- 'zone': 'internal'},
- {'host_name': 'compute1.host.com',
- 'service': 'compute',
- 'zone': 'nova'},
- {'host_name': 'compute2.host.com',
- 'service': 'compute',
- 'zone': 'nova'},
- {'host_name': 'sched1.host.com',
- 'service': 'scheduler',
- 'zone': 'internal'},
- {'host_name': 'sched2.host.com',
- 'service': 'scheduler',
- 'zone': 'internal'},
- {'host_name': 'vol1.host.com',
- 'service': 'volume'},
- 'zone': 'internal']}
+
+ | {'hosts': [{'host_name': 'some.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'some.other.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'some.celly.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'console1.host.com',
+ | 'service': 'consoleauth',
+ | 'zone': 'internal'},
+ | {'host_name': 'network1.host.com',
+ | 'service': 'network',
+ | 'zone': 'internal'},
+ | {'host_name': 'netwwork2.host.com',
+ | 'service': 'network',
+ | 'zone': 'internal'},
+ | {'host_name': 'compute1.host.com',
+ | 'service': 'compute',
+ | 'zone': 'nova'},
+ | {'host_name': 'compute2.host.com',
+ | 'service': 'compute',
+ | 'zone': 'nova'},
+ | {'host_name': 'sched1.host.com',
+ | 'service': 'scheduler',
+ | 'zone': 'internal'},
+ | {'host_name': 'sched2.host.com',
+ | 'service': 'scheduler',
+ | 'zone': 'internal'},
+ | {'host_name': 'vol1.host.com',
+ | 'service': 'volume'},
+ | 'zone': 'internal']}
+
"""
context = req.environ['nova.context']
authorize(context)
diff --git a/nova/api/openstack/compute/plugins/v3/hosts.py b/nova/api/openstack/compute/plugins/v3/hosts.py
index 8990aa873a..e1b3399f75 100644
--- a/nova/api/openstack/compute/plugins/v3/hosts.py
+++ b/nova/api/openstack/compute/plugins/v3/hosts.py
@@ -39,41 +39,42 @@ class HostController(wsgi.Controller):
@extensions.expected_errors(())
def index(self, req):
- """:returns: A dict in the format:
+ """Returns a dict in the format
+
+ | {'hosts': [{'host_name': 'some.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'some.other.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'some.celly.host.name',
+ | 'service': 'cells',
+ | 'zone': 'internal'},
+ | {'host_name': 'console1.host.com',
+ | 'service': 'consoleauth',
+ | 'zone': 'internal'},
+ | {'host_name': 'network1.host.com',
+ | 'service': 'network',
+ | 'zone': 'internal'},
+ | {'host_name': 'netwwork2.host.com',
+ | 'service': 'network',
+ | 'zone': 'internal'},
+ | {'host_name': 'compute1.host.com',
+ | 'service': 'compute',
+ | 'zone': 'nova'},
+ | {'host_name': 'compute2.host.com',
+ | 'service': 'compute',
+ | 'zone': 'nova'},
+ | {'host_name': 'sched1.host.com',
+ | 'service': 'scheduler',
+ | 'zone': 'internal'},
+ | {'host_name': 'sched2.host.com',
+ | 'service': 'scheduler',
+ | 'zone': 'internal'},
+ | {'host_name': 'vol1.host.com',
+ | 'service': 'volume'},
+ | 'zone': 'internal']}
- {'hosts': [{'host_name': 'some.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'some.other.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'some.celly.host.name',
- 'service': 'cells',
- 'zone': 'internal'},
- {'host_name': 'console1.host.com',
- 'service': 'consoleauth',
- 'zone': 'internal'},
- {'host_name': 'network1.host.com',
- 'service': 'network',
- 'zone': 'internal'},
- {'host_name': 'netwwork2.host.com',
- 'service': 'network',
- 'zone': 'internal'},
- {'host_name': 'compute1.host.com',
- 'service': 'compute',
- 'zone': 'nova'},
- {'host_name': 'compute2.host.com',
- 'service': 'compute',
- 'zone': 'nova'},
- {'host_name': 'sched1.host.com',
- 'service': 'scheduler',
- 'zone': 'internal'},
- {'host_name': 'sched2.host.com',
- 'service': 'scheduler',
- 'zone': 'internal'},
- {'host_name': 'vol1.host.com',
- 'service': 'volume'},
- 'zone': 'internal']}
"""
context = req.environ['nova.context']
authorize(context)
diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py
index 5dab024fef..680bf6c061 100644
--- a/nova/compute/resource_tracker.py
+++ b/nova/compute/resource_tracker.py
@@ -145,10 +145,10 @@ class ResourceTracker(object):
:param instance: instance object to reserve resources for
:param instance_type: new instance_type being resized to
:param limits: Dict of oversubscription limits for memory, disk,
- and CPUs.
+ and CPUs
:returns: A Claim ticket representing the reserved resources. This
- should be turned into finalize a resource claim or free
- resources after the compute operation is finished.
+ should be turned into finalize a resource claim or free
+ resources after the compute operation is finished.
"""
if self.disabled:
# compute_driver doesn't support resource tracking, just
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 6bd1db5ca4..f92e498a68 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1844,32 +1844,33 @@ def instance_get_all_by_filters(context, filters, sort_key, sort_dir,
Depending on the name of a filter, matching for that filter is
performed using either exact matching or as regular expression
- matching. Exact matching is applied for the following filters:
+ matching. Exact matching is applied for the following filters::
- ['project_id', 'user_id', 'image_ref',
- 'vm_state', 'instance_type_id', 'uuid',
- 'metadata', 'host', 'system_metadata']
+ | ['project_id', 'user_id', 'image_ref',
+ | 'vm_state', 'instance_type_id', 'uuid',
+ | 'metadata', 'host', 'system_metadata']
A third type of filter (also using exact matching), filters
based on instance metadata tags when supplied under a special
- key named 'filter'.
-
- filters = {
- 'filter': [
- {'name': 'tag-key', 'value': '<metakey>'},
- {'name': 'tag-value', 'value': '<metaval>'},
- {'name': 'tag:<metakey>', 'value': '<metaval>'}
- ]
- }
-
- Special keys are used to tweek the query further:
-
- 'changes-since' - only return instances updated after
- 'deleted' - only return (or exclude) deleted instances
- 'soft_deleted' - modify behavior of 'deleted' to either
- include or exclude instances whose
- vm_state is SOFT_DELETED.
+ key named 'filter'::
+
+ | filters = {
+ | 'filter': [
+ | {'name': 'tag-key', 'value': '<metakey>'},
+ | {'name': 'tag-value', 'value': '<metaval>'},
+ | {'name': 'tag:<metakey>', 'value': '<metaval>'}
+ | ]
+ | }
+
+ Special keys are used to tweek the query further::
+
+ | 'changes-since' - only return instances updated after
+ | 'deleted' - only return (or exclude) deleted instances
+ | 'soft_deleted' - modify behavior of 'deleted' to either
+ | include or exclude instances whose
+ | vm_state is SOFT_DELETED.
+
"""
# NOTE(mriedem): If the limit is 0 there is no point in even going
# to the database since nothing is going to be returned anyway.
diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py
index fcb33922a2..eafe3c2481 100644
--- a/nova/db/sqlalchemy/utils.py
+++ b/nova/db/sqlalchemy/utils.py
@@ -93,10 +93,8 @@ def create_shadow_table(migrate_engine, table_name=None, table=None,
:param table_name: Autoload table with this name and create shadow table
:param table: Autoloaded table, so just create corresponding shadow table.
:param col_name_col_instance: contains pair column_name=column_instance.
- column_instance is instance of Column. These params
- are required only for columns that have unsupported
- types by sqlite. For example BigInteger.
-
+ column_instance is instance of Column. These params are required only for
+ columns that have unsupported types by sqlite. For example BigInteger.
:returns: The created shadow_table object.
"""
meta = MetaData(bind=migrate_engine)
diff --git a/nova/hooks.py b/nova/hooks.py
index 3c67bb3aed..735b89338b 100644
--- a/nova/hooks.py
+++ b/nova/hooks.py
@@ -23,22 +23,22 @@ post)
Hook objects are loaded by HookLoaders. Each named hook may invoke multiple
Hooks.
-Example Hook object:
-
-class MyHook(object):
- def pre(self, *args, **kwargs):
- # do stuff before wrapped callable runs
-
- def post(self, rv, *args, **kwargs):
- # do stuff after wrapped callable runs
-
-Example Hook object with function parameters:
-
-class MyHookWithFunction(object):
- def pre(self, f, *args, **kwargs):
- # do stuff with wrapped function info
- def post(self, f, *args, **kwards):
- # do stuff with wrapped function info
+Example Hook object::
+
+ | class MyHook(object):
+ | def pre(self, *args, **kwargs):
+ | # do stuff before wrapped callable runs
+ |
+ | def post(self, rv, *args, **kwargs):
+ | # do stuff after wrapped callable runs
+
+Example Hook object with function parameters::
+
+ | class MyHookWithFunction(object):
+ | def pre(self, f, *args, **kwargs):
+ | # do stuff with wrapped function info
+ | def post(self, f, *args, **kwargs):
+ | # do stuff with wrapped function info
"""
diff --git a/nova/image/api.py b/nova/image/api.py
index 1b5db39f85..a43fdb156a 100644
--- a/nova/image/api.py
+++ b/nova/image/api.py
@@ -61,8 +61,8 @@ class API(object):
are owned by the requesting user in the ACTIVE status are returned.
:param context: The `nova.context.Context` object for the request
- :param **kwargs: A dictionary of filter and pagination values that
- may be passed to the underlying image info driver.
+ :param kwargs: A dictionary of filter and pagination values that
+ may be passed to the underlying image info driver.
"""
session = self._get_session(context)
return session.detail(context, **kwargs)
diff --git a/nova/keymgr/key_mgr.py b/nova/keymgr/key_mgr.py
index 4fb4f07bc0..c020ca2474 100644
--- a/nova/keymgr/key_mgr.py
+++ b/nova/keymgr/key_mgr.py
@@ -60,8 +60,10 @@ class KeyManager(object):
the specified context does not permit copying keys, then a
NotAuthorized error should be raised.
- Implementation note: This method should behave identically to
+ Implementation note: This method should behave identically to::
+
store_key(context, get_key(context, <encryption key UUID>))
+
although it is preferable to perform this operation within the key
manager to avoid unnecessary handling of the key material.
"""
diff --git a/nova/notifications.py b/nova/notifications.py
index 8c43e5959c..f0e302a920 100644
--- a/nova/notifications.py
+++ b/nova/notifications.py
@@ -319,10 +319,15 @@ def info_from_instance(context, instance_ref, network_info,
"""Get detailed instance information for an instance which is common to all
notifications.
- :param network_info: network_info provided if not None
- :param system_metadata: system_metadata DB entries for the instance,
- if not None. *NOTE*: Currently unused here in trunk, but needed for
- potential custom modifications.
+ :param:network_info: network_info provided if not None
+ :param:system_metadata: system_metadata DB entries for the instance,
+ if not None
+
+ .. note::
+
+ Currently unused here in trunk, but needed for potential custom
+ modifications.
+
"""
def null_safe_str(s):
diff --git a/nova/objects/base.py b/nova/objects/base.py
index 63a2705aaa..7830601ec8 100644
--- a/nova/objects/base.py
+++ b/nova/objects/base.py
@@ -339,9 +339,9 @@ class NovaObject(object):
:param:primitive: The result of self.obj_to_primitive()
:param:target_version: The version string requested by the recipient
- of the object.
- :param:raises: nova.exception.UnsupportedObjectError if conversion
- is not possible for some reason.
+ of the object
+ :raises: nova.exception.UnsupportedObjectError if conversion
+ is not possible for some reason
"""
pass
diff --git a/nova/objects/instance.py b/nova/objects/instance.py
index 275e7db89d..136e98eb1e 100644
--- a/nova/objects/instance.py
+++ b/nova/objects/instance.py
@@ -389,13 +389,15 @@ class Instance(base.NovaPersistentObject, base.NovaObject):
self.what_changed(). If expected_task_state is provided,
it will be checked against the in-database copy of the
instance before updates are made.
- :param context: Security context
- :param expected_task_state: Optional tuple of valid task states
- for the instance to be in.
- :param expected_vm_state: Optional tuple of valid vm states
- for the instance to be in.
+
+ :param:context: Security context
+ :param:expected_task_state: Optional tuple of valid task states
+ for the instance to be in
+ :param:expected_vm_state: Optional tuple of valid vm states
+ for the instance to be in
:param admin_state_reset: True if admin API is forcing setting
- of task_state/vm_state.
+ of task_state/vm_state
+
"""
cell_type = cells_opts.get_cell_type()
@@ -680,14 +682,15 @@ class InstanceList(base.ObjectListBase, base.NovaObject):
expected_attrs=None):
"""Get instances and joins active during a certain time window.
- :param context: nova request context
- :param begin: datetime for the start of the time window
- :param end: datetime for the end of the time window
- :param project_id: used to filter instances by project
- :param host: used to filter instances on a given compute host
- :param expected_attrs: list of related fields that can be joined
+ :param:context: nova request context
+ :param:begin: datetime for the start of the time window
+ :param:end: datetime for the end of the time window
+ :param:project_id: used to filter instances by project
+ :param:host: used to filter instances on a given compute host
+ :param:expected_attrs: list of related fields that can be joined
in the database layer when querying for instances
:returns: InstanceList
+
"""
# NOTE(mriedem): We have to convert the datetime objects to string
# primitives for the remote call.
diff --git a/nova/objects/pci_device.py b/nova/objects/pci_device.py
index b6fa5a6435..32caadeebd 100644
--- a/nova/objects/pci_device.py
+++ b/nova/objects/pci_device.py
@@ -54,12 +54,14 @@ class PciDevice(base.NovaPersistentObject, base.NovaObject):
the device object is changed to deleted state and no longer synced with
the DB.
- Filed notes:
- 'dev_id':
- Hypervisor's identification for the device, the string format
- is hypervisor specific
- 'extra_info':
- Device-specific properties like PF address, switch ip address etc.
+ Filed notes::
+
+ | 'dev_id':
+ | Hypervisor's identification for the device, the string format
+ | is hypervisor specific
+ | 'extra_info':
+ | Device-specific properties like PF address, switch ip address etc.
+
"""
# Version 1.0: Initial version
diff --git a/nova/openstack/common/network_utils.py b/nova/openstack/common/network_utils.py
index 88f4c9f638..331edcb411 100644
--- a/nova/openstack/common/network_utils.py
+++ b/nova/openstack/common/network_utils.py
@@ -113,16 +113,15 @@ def set_tcp_keepalive(sock, tcp_keepalive=True,
This function configures tcp keepalive parameters if users wish to do
so.
- :param tcp_keepalive: Boolean, turn on or off tcp_keepalive. If users are
- not sure, this should be True, and default values will be used.
- :param tcp_keepidle: time to wait before starting to send keepalive probes
+ :param:tcp_keepalive: Boolean, turn on or off tcp_keepalive. If users are
+ not sure, this should be True, and default values will be used
+ :param:tcp_keepidle: time to wait before starting to send keepalive probes
+ :param:tcp_keepalive_interval: time between successive probes, once the
+ initial wait time is over
+ :param:tcp_keepalive_count: number of probes to send before the connection
+ is killed
- :param tcp_keepalive_interval: time between successive probes, once the
- initial wait time is over
-
- :param tcp_keepalive_count: number of probes to send before the connection
- is killed
"""
# NOTE(praneshp): Despite keepalive being a tcp concept, the level is
diff --git a/nova/openstack/common/report/report.py b/nova/openstack/common/report/report.py
index 7fca30c777..730ab4ac0c 100644
--- a/nova/openstack/common/report/report.py
+++ b/nova/openstack/common/report/report.py
@@ -89,9 +89,9 @@ class ReportSection(object):
:func:`BasicReport.add_section`
:param view: the top-level view for this section
- :param generator: the generator for this section
- (any callable object which takes
- no parameters and returns a data model)
+ :param generator: the generator for this section which could be
+ any callable object which takes
+ no parameters and returns a data model
"""
def __init__(self, view, generator):
diff --git a/nova/pci/pci_request.py b/nova/pci/pci_request.py
index d07dfbd96d..cb031e5cc1 100644
--- a/nova/pci/pci_request.py
+++ b/nova/pci/pci_request.py
@@ -13,23 +13,27 @@
# License for the specific language governing permissions and limitations
# under the License.
-""" Example of a PCI alias:
- pci_alias = '{
- "name": "QuicAssist",
- "product_id": "0443",
- "vendor_id": "8086",
- "device_type": "ACCEL",
- }'
-
- Aliases with the same name and the same device_type are OR operation:
- pci_alias = '{
- "name": "QuicAssist",
- "product_id": "0442",
- "vendor_id": "8086",
- "device_type": "ACCEL",
- }'
+""" Example of a PCI alias::
+
+ | pci_alias = '{
+ | "name": "QuicAssist",
+ | "product_id": "0443",
+ | "vendor_id": "8086",
+ | "device_type": "ACCEL",
+ | }'
+
+ Aliases with the same name and the same device_type are OR operation::
+
+ | pci_alias = '{
+ | "name": "QuicAssist",
+ | "product_id": "0442",
+ | "vendor_id": "8086",
+ | "device_type": "ACCEL",
+ | }'
+
These 2 aliases define a device request meaning: vendor_id is "8086" and
product id is "0442" or "0443".
+
"""
import copy
@@ -159,18 +163,20 @@ def get_pci_requests_from_flavor(flavor):
optional 'alias_name' is the corresponding alias definition name.
Example:
- Assume alias configuration is:
- {'vendor_id':'8086',
- 'device_id':'1502',
- 'name':'alias_1'}
+ Assume alias configuration is::
+
+ | {'vendor_id':'8086',
+ | 'device_id':'1502',
+ | 'name':'alias_1'}
The flavor extra specs includes: 'pci_passthrough:alias': 'alias_1:2'.
- The returned pci_requests are:
- pci_requests = [{'count':2,
- 'specs': [{'vendor_id':'8086',
- 'device_id':'1502'}],
- 'alias_name': 'alias_1'}]
+ The returned pci_requests are::
+
+ | pci_requests = [{'count':2,
+ | 'specs': [{'vendor_id':'8086',
+ | 'device_id':'1502'}],
+ | 'alias_name': 'alias_1'}]
:param flavor: the flavor to be checked
:returns: a list of pci requests
diff --git a/nova/scheduler/filters/isolated_hosts_filter.py b/nova/scheduler/filters/isolated_hosts_filter.py
index a15193a8f6..6d383dde09 100644
--- a/nova/scheduler/filters/isolated_hosts_filter.py
+++ b/nova/scheduler/filters/isolated_hosts_filter.py
@@ -41,18 +41,20 @@ class IsolatedHostsFilter(filters.BaseHostFilter):
def host_passes(self, host_state, filter_properties):
"""Result Matrix with 'restrict_isolated_hosts_to_isolated_images' set
- to True:
- | isolated_image | non_isolated_image
- -------------+----------------+-------------------
- iso_host | True | False
- non_iso_host | False | True
+ to True::
+
+ | | isolated_image | non_isolated_image
+ | -------------+----------------+-------------------
+ | iso_host | True | False
+ | non_iso_host | False | True
Result Matrix with 'restrict_isolated_hosts_to_isolated_images' set
- to False:
- | isolated_image | non_isolated_image
- -------------+----------------+-------------------
- iso_host | True | True
- non_iso_host | False | True
+ to False::
+
+ | | isolated_image | non_isolated_image
+ | -------------+----------------+-------------------
+ | iso_host | True | True
+ | non_iso_host | False | True
"""
# If the configuration does not list any hosts, the filter will always
diff --git a/nova/scheduler/filters/pci_passthrough_filter.py b/nova/scheduler/filters/pci_passthrough_filter.py
index 0726d22148..5855649f24 100644
--- a/nova/scheduler/filters/pci_passthrough_filter.py
+++ b/nova/scheduler/filters/pci_passthrough_filter.py
@@ -26,13 +26,17 @@ class PciPassthroughFilter(filters.BaseHostFilter):
to meet the device requests in the 'extra_specs' for the flavor.
PCI resource tracker provides updated summary information about the
- PCI devices for each host, like:
- [{"count": 5, "vendor_id": "8086", "product_id": "1520",
- "extra_info":'{}'}],
- and VM requests PCI devices via PCI requests, like:
- [{"count": 1, "vendor_id": "8086", "product_id": "1520",}].
+ PCI devices for each host, like::
+
+ | [{"count": 5, "vendor_id": "8086", "product_id": "1520",
+ | "extra_info":'{}'}],
+
+ and VM requests PCI devices via PCI requests, like::
+
+ | [{"count": 1, "vendor_id": "8086", "product_id": "1520",}].
The filter checks if the host passes or not based on this information.
+
"""
def host_passes(self, host_state, filter_properties):
diff --git a/nova/scheduler/filters/trusted_filter.py b/nova/scheduler/filters/trusted_filter.py
index d15290a2a7..4ace9c8d02 100644
--- a/nova/scheduler/filters/trusted_filter.py
+++ b/nova/scheduler/filters/trusted_filter.py
@@ -18,14 +18,14 @@
Filter to add support for Trusted Computing Pools.
Filter that only schedules tasks on a host if the integrity (trust)
-of that host matches the trust requested in the `extra_specs' for the
-flavor. The `extra_specs' will contain a key/value pair where the
-key is `trust'. The value of this pair (`trusted'/`untrusted') must
+of that host matches the trust requested in the ``extra_specs`` for the
+flavor. The ``extra_specs`` will contain a key/value pair where the
+key is ``trust``. The value of this pair (``trusted``/``untrusted``) must
match the integrity of that host (obtained from the Attestation
service) before the task can be scheduled on that host.
Note that the parameters to control access to the Attestation Service
-are in the `nova.conf' file in a separate `trust' section. For example,
+are in the ``nova.conf`` file in a separate ``trust`` section. For example,
the config file will look something like:
[DEFAULT]
@@ -34,7 +34,8 @@ the config file will look something like:
[trust]
server=attester.mynetwork.com
-Details on the specific parameters can be found in the file `trust_attest.py'.
+Details on the specific parameters can be found in the file
+``trust_attest.py``.
Details on setting up and using an Attestation Service can be found at
the Open Attestation project at:
diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py
index 6368cb649b..b46c37a9d2 100644
--- a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py
+++ b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py
@@ -3024,15 +3024,15 @@ class ServersAllExtensionsTestCase(test.TestCase):
an exception because of a malformed request before the core API
gets a chance to validate the request and return a 422 response.
- For example, AccessIPsController extends servers.Controller:
-
- @wsgi.extends
- def create(self, req, resp_obj, body):
- context = req.environ['nova.context']
- if authorize(context) and 'server' in resp_obj.obj:
- resp_obj.attach(xml=AccessIPTemplate())
- server = resp_obj.obj['server']
- self._extend_server(req, server)
+ For example, AccessIPsController extends servers.Controller::
+
+ | @wsgi.extends
+ | def create(self, req, resp_obj, body):
+ | context = req.environ['nova.context']
+ | if authorize(context) and 'server' in resp_obj.obj:
+ | resp_obj.attach(xml=AccessIPTemplate())
+ | server = resp_obj.obj['server']
+ | self._extend_server(req, server)
we want to ensure that the extension isn't barfing on an invalid
body.
diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py
index 777c63c9ff..0edab4760a 100644
--- a/nova/tests/api/openstack/compute/test_servers.py
+++ b/nova/tests/api/openstack/compute/test_servers.py
@@ -4838,14 +4838,14 @@ class ServersAllExtensionsTestCase(test.TestCase):
an exception because of a malformed request before the core API
gets a chance to validate the request and return a 422 response.
- For example, ServerDiskConfigController extends servers.Controller:
-
- @wsgi.extends
- def create(self, req, body):
- if 'server' in body:
- self._set_disk_config(body['server'])
- resp_obj = (yield)
- self._show(req, resp_obj)
+ For example, ServerDiskConfigController extends servers.Controller::
+
+ | @wsgi.extends
+ | def create(self, req, body):
+ | if 'server' in body:
+ | self._set_disk_config(body['server'])
+ | resp_obj = (yield)
+ | self._show(req, resp_obj)
we want to ensure that the extension isn't barfing on an invalid
body.
diff --git a/nova/tests/compute/test_resource_tracker.py b/nova/tests/compute/test_resource_tracker.py
index 0a5a1c0653..ee284d122f 100644
--- a/nova/tests/compute/test_resource_tracker.py
+++ b/nova/tests/compute/test_resource_tracker.py
@@ -1077,9 +1077,10 @@ class ResizeClaimTestCase(BaseTrackerTestCase):
class NoInstanceTypesInSysMetadata(ResizeClaimTestCase):
"""Make sure we handle the case where the following are true:
- 1) Compute node C gets upgraded to code that looks for instance types in
+
+ #) Compute node C gets upgraded to code that looks for instance types in
system metadata. AND
- 2) C already has instances in the process of migrating that do not have
+ #) C already has instances in the process of migrating that do not have
stashed instance types.
bug 1164110
diff --git a/nova/tests/db/test_migrations.py b/nova/tests/db/test_migrations.py
index f0cf594b60..603d5fcee6 100644
--- a/nova/tests/db/test_migrations.py
+++ b/nova/tests/db/test_migrations.py
@@ -31,14 +31,14 @@ and 'openstack_baremetal_citest' with user 'openstack_citest' and password
'openstack_citest' on localhost. The test will then use that db and u/p combo
to run the tests.
-For postgres on Ubuntu this can be done with the following commands:
-
-sudo -u postgres psql
-postgres=# create user openstack_citest with createdb login password
- 'openstack_citest';
-postgres=# create database openstack_citest with owner openstack_citest;
-postgres=# create database openstack_baremetal_citest with owner
- openstack_citest;
+For postgres on Ubuntu this can be done with the following commands::
+
+| sudo -u postgres psql
+| postgres=# create user openstack_citest with createdb login password
+| 'openstack_citest';
+| postgres=# create database openstack_citest with owner openstack_citest;
+| postgres=# create database openstack_baremetal_citest with owner
+| openstack_citest;
"""
diff --git a/nova/tests/image_fixtures.py b/nova/tests/image_fixtures.py
index 771b5e1a3f..9ab09b989a 100644
--- a/nova/tests/image_fixtures.py
+++ b/nova/tests/image_fixtures.py
@@ -26,16 +26,17 @@ def get_image_fixtures():
start at 123 and go to 131, with the following brief summary of image
attributes:
- ID Type Status Notes
- -----------------------------------------------------------------
- 123 Public image active
- 124 Snapshot queued
- 125 Snapshot saving
- 126 Snapshot active
- 127 Snapshot killed
- 128 Snapshot deleted
- 129 Snapshot pending_delete
- 130 Public image active Has no name
+ | ID Type Status Notes
+ | ----------------------------------------------------------
+ | 123 Public image active
+ | 124 Snapshot queued
+ | 125 Snapshot saving
+ | 126 Snapshot active
+ | 127 Snapshot killed
+ | 128 Snapshot deleted
+ | 129 Snapshot pending_delete
+ | 130 Public image active Has no name
+
"""
image_id = 123