typing: "Import" objects
mypy doesn't know that we dynamically register these: give it a helping hand. Change-Id: I73321f67766b67e00038fd8de744f95128c3e6cb Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -19,6 +19,56 @@
|
||||
# on this module automatically, pointing to the newest/latest version of
|
||||
# the object.
|
||||
|
||||
import typing as ty
|
||||
|
||||
if ty.TYPE_CHECKING:
|
||||
from nova.objects.aggregate import * # noqa
|
||||
from nova.objects.block_device import * # noqa
|
||||
from nova.objects.build_request import * # noqa
|
||||
from nova.objects.cell_mapping import * # noqa
|
||||
from nova.objects.compute_node import * # noqa
|
||||
from nova.objects.diagnostics import * # noqa
|
||||
from nova.objects.console_auth_token import * # noqa
|
||||
from nova.objects.ec2 import * # noqa
|
||||
from nova.objects.external_event import * # noqa
|
||||
from nova.objects.flavor import * # noqa
|
||||
from nova.objects.host_mapping import * # noqa
|
||||
from nova.objects.hv_spec import * # noqa
|
||||
from nova.objects.image_meta import * # noqa
|
||||
from nova.objects.instance import * # noqa
|
||||
from nova.objects.instance_action import * # noqa
|
||||
from nova.objects.instance_fault import * # noqa
|
||||
from nova.objects.instance_group import * # noqa
|
||||
from nova.objects.instance_info_cache import * # noqa
|
||||
from nova.objects.instance_mapping import * # noqa
|
||||
from nova.objects.instance_numa import * # noqa
|
||||
from nova.objects.instance_pci_requests import * # noqa
|
||||
from nova.objects.keypair import * # noqa
|
||||
from nova.objects.migrate_data import * # noqa
|
||||
from nova.objects.virt_device_metadata import * # noqa
|
||||
from nova.objects.migration import * # noqa
|
||||
from nova.objects.migration_context import * # noqa
|
||||
from nova.objects.monitor_metric import * # noqa
|
||||
from nova.objects.network_metadata import * # noqa
|
||||
from nova.objects.network_request import * # noqa
|
||||
from nova.objects.numa import * # noqa
|
||||
from nova.objects.pci_device import * # noqa
|
||||
from nova.objects.pci_device_pool import * # noqa
|
||||
from nova.objects.request_spec import * # noqa
|
||||
from nova.objects.tag import * # noqa
|
||||
from nova.objects.quotas import * # noqa
|
||||
from nova.objects.resource import * # noqa
|
||||
from nova.objects.security_group import * # noqa
|
||||
from nova.objects.selection import * # noqa
|
||||
from nova.objects.service import * # noqa
|
||||
from nova.objects.task_log import * # noqa
|
||||
from nova.objects.trusted_certs import * # noqa
|
||||
from nova.objects.vcpu_model import * # noqa
|
||||
from nova.objects.virt_cpu_topology import * # noqa
|
||||
from nova.objects.virtual_interface import * # noqa
|
||||
from nova.objects.volume_usage import * # noqa
|
||||
from nova.objects.share_mapping import * # noqa
|
||||
|
||||
|
||||
def register_all():
|
||||
# NOTE(danms): You must make sure your object gets imported in this
|
||||
|
||||
@@ -31,6 +31,11 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
DEPRECATED_FIELDS = ['deleted', 'deleted_at']
|
||||
|
||||
__all__ = [
|
||||
'Aggregate',
|
||||
'AggregateList',
|
||||
]
|
||||
|
||||
|
||||
@api_db_api.context_manager.reader
|
||||
def _aggregate_get_from_db(context, aggregate_id):
|
||||
|
||||
@@ -19,7 +19,7 @@ from oslo_serialization import jsonutils
|
||||
from oslo_utils import uuidutils
|
||||
from oslo_utils import versionutils
|
||||
|
||||
from nova import block_device
|
||||
from nova import block_device as blockdev
|
||||
from nova.db.main import api as db
|
||||
from nova.db.main import models as db_models
|
||||
from nova import exception
|
||||
@@ -35,6 +35,14 @@ LOG = logging.getLogger(__name__)
|
||||
_BLOCK_DEVICE_OPTIONAL_JOINED_FIELD = ['instance']
|
||||
BLOCK_DEVICE_OPTIONAL_ATTRS = _BLOCK_DEVICE_OPTIONAL_JOINED_FIELD
|
||||
|
||||
__all__ = [
|
||||
'BLOCK_DEVICE_OPTIONAL_ATTRS',
|
||||
'BlockDeviceMapping',
|
||||
'BlockDeviceMappingList',
|
||||
'block_device_make_list',
|
||||
'block_device_make_list_from_dicts',
|
||||
]
|
||||
|
||||
|
||||
def _expected_cols(expected_attrs):
|
||||
return [attr for attr in expected_attrs
|
||||
@@ -347,7 +355,7 @@ class BlockDeviceMapping(base.NovaPersistentObject, base.NovaObject,
|
||||
fields.BlockDeviceDestinationType.LOCAL)
|
||||
|
||||
def get_image_mapping(self):
|
||||
return block_device.BlockDeviceDict(self).get_image_mapping()
|
||||
return blockdev.BlockDeviceDict(self).get_image_mapping()
|
||||
|
||||
@base.lazy_load_counter
|
||||
def obj_load_attr(self, attrname):
|
||||
|
||||
@@ -28,6 +28,11 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'BuildRequest',
|
||||
'BuildRequestList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class BuildRequest(base.NovaObject):
|
||||
|
||||
@@ -27,6 +27,11 @@ from nova.objects import fields
|
||||
CONF = nova.conf.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'CellMapping',
|
||||
'CellMappingList',
|
||||
]
|
||||
|
||||
|
||||
def _parse_netloc(netloc):
|
||||
"""Parse a user:pass@host:port and return a dict suitable for formatting
|
||||
|
||||
@@ -30,6 +30,11 @@ from nova.objects import pci_device_pool
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
__all__ = [
|
||||
'ComputeNode',
|
||||
'ComputeNodeList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class ComputeNode(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
@@ -32,6 +32,10 @@ from nova import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'ConsoleAuthToken',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class ConsoleAuthToken(base.NovaTimestampObject, base.NovaObject):
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'CpuDiagnostics',
|
||||
'Diagnostics',
|
||||
'DiskDiagnostics',
|
||||
'MemoryDiagnostics',
|
||||
'NicDiagnostics',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class CpuDiagnostics(base.NovaObject):
|
||||
|
||||
@@ -27,6 +27,18 @@ from nova.objects import fields
|
||||
_CACHE_TIME = 7 * 24 * 60 * 60
|
||||
_CACHE = None
|
||||
|
||||
__all__ = [
|
||||
'EC2Ids',
|
||||
'EC2InstanceMapping',
|
||||
'S3ImageMapping',
|
||||
'get_int_id_from_instance_uuid',
|
||||
'glance_id_to_ec2_id',
|
||||
'glance_id_to_id',
|
||||
'glance_type_to_ec2_type',
|
||||
'id_to_ec2_id',
|
||||
'id_to_ec2_inst_id',
|
||||
]
|
||||
|
||||
|
||||
def memoize(func):
|
||||
@functools.wraps(func)
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
from nova.objects import base as obj_base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'EVENT_NAMES',
|
||||
'EVENT_STATUSES',
|
||||
'InstanceExternalEvent',
|
||||
]
|
||||
|
||||
EVENT_NAMES = [
|
||||
# Network has changed for this instance, rebuild info_cache
|
||||
'network-changed',
|
||||
|
||||
@@ -39,6 +39,11 @@ DEPRECATED_FIELDS = ['deleted', 'deleted_at']
|
||||
# Non-joined fields which can be updated.
|
||||
MUTABLE_FIELDS = set(['description'])
|
||||
|
||||
__all__ = [
|
||||
'Flavor',
|
||||
'FlavorList',
|
||||
]
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ from nova.objects import base
|
||||
from nova.objects import cell_mapping
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'HostMapping',
|
||||
'HostMappingList',
|
||||
'discover_hosts',
|
||||
]
|
||||
|
||||
|
||||
def _cell_id_in_updates(updates):
|
||||
cell_mapping_obj = updates.pop("cell_mapping", None)
|
||||
|
||||
@@ -18,6 +18,10 @@ from oslo_utils import versionutils
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'HVSpec',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class HVSpec(base.NovaObject):
|
||||
|
||||
@@ -28,6 +28,11 @@ NULLABLE_STRING_FIELDS = ['name', 'checksum', 'owner',
|
||||
'container_format', 'disk_format']
|
||||
NULLABLE_INTEGER_FIELDS = ['size', 'virtual_size']
|
||||
|
||||
__all__ = [
|
||||
'ImageMeta',
|
||||
'ImageMetaProps',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class ImageMeta(base.NovaObject):
|
||||
|
||||
@@ -66,6 +66,14 @@ _MIGRATION_CONTEXT_ATTRS = ['numa_topology', 'pci_requests',
|
||||
INSTANCE_OPTIONAL_ATTRS = (_INSTANCE_OPTIONAL_JOINED_FIELDS +
|
||||
_INSTANCE_OPTIONAL_NON_COLUMN_FIELDS +
|
||||
_INSTANCE_EXTRA_FIELDS)
|
||||
|
||||
__all__ = [
|
||||
'Instance',
|
||||
'InstanceList',
|
||||
'populate_instance_compute_id',
|
||||
'populate_missing_availability_zones',
|
||||
]
|
||||
|
||||
# These are fields that most query calls load by default
|
||||
INSTANCE_DEFAULT_FIELDS = ['metadata', 'system_metadata',
|
||||
'info_cache', 'security_groups']
|
||||
|
||||
@@ -22,6 +22,13 @@ from nova import objects
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'InstanceAction',
|
||||
'InstanceActionEvent',
|
||||
'InstanceActionEventList',
|
||||
'InstanceActionList',
|
||||
]
|
||||
|
||||
|
||||
# TODO(berrange): Remove NovaObjectDictCompat
|
||||
@base.NovaObjectRegistry.register
|
||||
|
||||
@@ -25,6 +25,11 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'InstanceFault',
|
||||
'InstanceFaultList',
|
||||
]
|
||||
|
||||
|
||||
# TODO(berrange): Remove NovaObjectDictCompat
|
||||
@base.NovaObjectRegistry.register
|
||||
|
||||
@@ -33,6 +33,11 @@ from nova.objects import fields
|
||||
LAZY_LOAD_FIELDS = ['hosts']
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'InstanceGroup',
|
||||
'InstanceGroupList',
|
||||
]
|
||||
|
||||
|
||||
def _instance_group_get_query(context, id_field=None, id=None):
|
||||
query = context.session.query(api_models.InstanceGroup).\
|
||||
|
||||
@@ -22,6 +22,10 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'InstanceInfoCache',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class InstanceInfoCache(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
@@ -33,6 +33,13 @@ from nova.objects import virtual_interface
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'InstanceMapping',
|
||||
'InstanceMappingList',
|
||||
'populate_queued_for_delete',
|
||||
'populate_user_id',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class InstanceMapping(base.NovaTimestampObject, base.NovaObject):
|
||||
|
||||
@@ -26,6 +26,11 @@ from nova.virt import hardware
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'InstanceNUMACell',
|
||||
'InstanceNUMATopology',
|
||||
]
|
||||
|
||||
|
||||
# TODO(berrange): Remove NovaObjectDictCompat
|
||||
@base.NovaObjectRegistry.register
|
||||
|
||||
@@ -17,6 +17,11 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'InstancePCIRequest',
|
||||
'InstancePCIRequests',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class InstancePCIRequest(base.NovaObject):
|
||||
|
||||
@@ -28,6 +28,11 @@ KEYPAIR_TYPE_SSH = 'ssh'
|
||||
KEYPAIR_TYPE_X509 = 'x509'
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'KeyPair',
|
||||
'KeyPairList',
|
||||
]
|
||||
|
||||
|
||||
@api_db_api.context_manager.reader
|
||||
def _get_from_db(context, user_id, name=None, limit=None, marker=None):
|
||||
|
||||
@@ -25,6 +25,16 @@ from nova.objects import fields
|
||||
LOG = log.getLogger(__name__)
|
||||
OS_VIF_DELEGATION = 'os_vif_delegation'
|
||||
|
||||
__all__ = [
|
||||
'HyperVLiveMigrateData',
|
||||
'LibvirtLiveMigrateBDMInfo',
|
||||
'LibvirtLiveMigrateData',
|
||||
'LibvirtLiveMigrateNUMAInfo',
|
||||
'LiveMigrateData',
|
||||
'VIFMigrateData',
|
||||
'VMwareLiveMigrateData',
|
||||
]
|
||||
|
||||
|
||||
@obj_base.NovaObjectRegistry.register
|
||||
class VIFMigrateData(obj_base.NovaObject):
|
||||
|
||||
@@ -27,6 +27,12 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'Migration',
|
||||
'MigrationList',
|
||||
'determine_migration_type',
|
||||
]
|
||||
|
||||
|
||||
def determine_migration_type(migration):
|
||||
if isinstance(migration, dict):
|
||||
|
||||
@@ -24,6 +24,10 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'MigrationContext',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class MigrationContext(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
@@ -27,6 +27,11 @@ FIELDS_REQUIRING_CONVERSION = [fields.MonitorMetricType.CPU_USER_PERCENT,
|
||||
fields.MonitorMetricType.CPU_IOWAIT_PERCENT,
|
||||
fields.MonitorMetricType.CPU_PERCENT]
|
||||
|
||||
__all__ = [
|
||||
'MonitorMetric',
|
||||
'MonitorMetricList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class MonitorMetric(base.NovaObject):
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'NetworkMetadata',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class NetworkMetadata(base.NovaObject):
|
||||
|
||||
@@ -25,6 +25,11 @@ from nova.objects import fields
|
||||
NETWORK_ID_NONE = 'none'
|
||||
NETWORK_ID_AUTO = 'auto'
|
||||
|
||||
__all__ = [
|
||||
'NetworkRequest',
|
||||
'NetworkRequestList',
|
||||
]
|
||||
|
||||
|
||||
@obj_base.NovaObjectRegistry.register
|
||||
class NetworkRequest(obj_base.NovaObject):
|
||||
|
||||
@@ -20,6 +20,13 @@ from nova.objects import base
|
||||
from nova.objects import fields as obj_fields
|
||||
from nova.virt import hardware
|
||||
|
||||
__all__ = [
|
||||
'NUMACell',
|
||||
'NUMAPagesTopology',
|
||||
'NUMATopology',
|
||||
'NUMATopologyLimits',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class NUMACell(base.NovaObject):
|
||||
|
||||
@@ -31,6 +31,12 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'PciDevice',
|
||||
'PciDeviceList',
|
||||
'compare_pci_device_attributes',
|
||||
]
|
||||
|
||||
|
||||
def compare_pci_device_attributes(obj_a, obj_b):
|
||||
if not isinstance(obj_b, PciDevice):
|
||||
|
||||
@@ -22,6 +22,12 @@ from nova import objects
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'PciDevicePool',
|
||||
'PciDevicePoolList',
|
||||
'from_pci_stats',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class PciDevicePool(base.NovaObject):
|
||||
|
||||
@@ -26,6 +26,16 @@ from nova.objects import base
|
||||
from nova.objects import fields
|
||||
from nova import quota
|
||||
|
||||
__all__ = [
|
||||
'Quotas',
|
||||
'QuotasNoOp',
|
||||
'ids_from_instance',
|
||||
'ids_from_security_group',
|
||||
'ids_from_server_group',
|
||||
'migrate_quota_classes_to_api_db',
|
||||
'migrate_quota_limits_to_api_db',
|
||||
]
|
||||
|
||||
|
||||
def ids_from_instance(context, instance):
|
||||
if (context.is_admin and
|
||||
|
||||
@@ -41,6 +41,15 @@ REQUEST_SPEC_OPTIONAL_ATTRS = ['requested_destination',
|
||||
'request_level_params',
|
||||
'requested_networks']
|
||||
|
||||
__all__ = [
|
||||
'Destination',
|
||||
'RequestGroup',
|
||||
'RequestLevelParams',
|
||||
'RequestSpec',
|
||||
'SchedulerLimits',
|
||||
'SchedulerRetries',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class RequestSpec(base.NovaObject):
|
||||
|
||||
@@ -18,6 +18,13 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'LibvirtVPMEMDevice',
|
||||
'Resource',
|
||||
'ResourceList',
|
||||
'ResourceMetadata',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class ResourceMetadata(base.NovaObject):
|
||||
|
||||
@@ -24,6 +24,12 @@ from nova import objects
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'SecurityGroup',
|
||||
'SecurityGroupList',
|
||||
'make_secgroup_list',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class SecurityGroup(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
@@ -24,6 +24,10 @@ from nova.scheduler.filters import utils as filter_utils
|
||||
|
||||
CONF = conf.CONF
|
||||
|
||||
__all__ = [
|
||||
'Selection',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class Selection(base.NovaObject, ovo_base.ComparableVersionedObject):
|
||||
|
||||
@@ -29,6 +29,12 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'Service',
|
||||
'ServiceList',
|
||||
'get_minimum_version_all_cells',
|
||||
]
|
||||
|
||||
|
||||
# NOTE(danms): This is the global service version counter
|
||||
SERVICE_VERSION = 70
|
||||
|
||||
@@ -30,6 +30,11 @@ EPHEMERAL_FIELDS = [
|
||||
"access_key",
|
||||
]
|
||||
|
||||
__all__ = [
|
||||
'ShareMapping',
|
||||
'ShareMappingList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class ShareMapping(base.NovaTimestampObject, base.NovaObject):
|
||||
|
||||
@@ -17,6 +17,11 @@ from nova.objects import fields
|
||||
|
||||
MAX_TAG_LENGTH = 60
|
||||
|
||||
__all__ = [
|
||||
'Tag',
|
||||
'TagList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class Tag(base.NovaObject):
|
||||
|
||||
@@ -14,6 +14,11 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'TaskLog',
|
||||
'TaskLogList',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class TaskLog(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
@@ -16,6 +16,10 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'TrustedCerts',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class TrustedCerts(base.NovaObject):
|
||||
|
||||
@@ -16,6 +16,11 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'VirtCPUFeature',
|
||||
'VirtCPUModel',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class VirtCPUModel(base.NovaObject):
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'VirtCPUTopology',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class VirtCPUTopology(base.NovaObject):
|
||||
|
||||
@@ -19,6 +19,20 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'DeviceBus',
|
||||
'DeviceMetadata',
|
||||
'DiskMetadata',
|
||||
'IDEDeviceBus',
|
||||
'InstanceDeviceMetadata',
|
||||
'NetworkInterfaceMetadata',
|
||||
'PCIDeviceBus',
|
||||
'SCSIDeviceBus',
|
||||
'ShareMetadata',
|
||||
'USBDeviceBus',
|
||||
'XenDeviceBus',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class DeviceBus(base.NovaObject):
|
||||
|
||||
@@ -26,6 +26,12 @@ from nova.objects import fields
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
__all__ = [
|
||||
'VirtualInterface',
|
||||
'VirtualInterfaceList',
|
||||
'fill_virtual_interface_list',
|
||||
]
|
||||
|
||||
VIF_OPTIONAL_FIELDS = ['network_id']
|
||||
FAKE_UUID = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ from nova.db.main import api as db
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
|
||||
__all__ = [
|
||||
'VolumeUsage',
|
||||
]
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class VolumeUsage(base.NovaPersistentObject, base.NovaObject):
|
||||
|
||||
Reference in New Issue
Block a user