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
This commit is contained in:
parent
6a9fe989e8
commit
11aaf21d9e
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'.
|
||||
key named 'filter'::
|
||||
|
||||
filters = {
|
||||
'filter': [
|
||||
{'name': 'tag-key', 'value': '<metakey>'},
|
||||
{'name': 'tag-value', 'value': '<metaval>'},
|
||||
{'name': 'tag:<metakey>', 'value': '<metaval>'}
|
||||
]
|
||||
}
|
||||
| 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:
|
||||
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.
|
||||
|
||||
'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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -23,22 +23,22 @@ post)
|
|||
Hook objects are loaded by HookLoaders. Each named hook may invoke multiple
|
||||
Hooks.
|
||||
|
||||
Example Hook object:
|
||||
Example Hook object::
|
||||
|
||||
class MyHook(object):
|
||||
def pre(self, *args, **kwargs):
|
||||
# do stuff before wrapped callable runs
|
||||
| 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
|
||||
|
||||
def post(self, rv, *args, **kwargs):
|
||||
# do stuff after wrapped callable runs
|
||||
Example Hook object with function parameters::
|
||||
|
||||
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
|
||||
| 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
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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",
|
||||
}'
|
||||
""" 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",
|
||||
| }'
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
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)
|
||||
| @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.
|
||||
|
|
|
@ -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:
|
||||
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)
|
||||
| @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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
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;
|
||||
| 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;
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue