The nova.objects.block_device Module

class BlockDeviceMapping(context=None, **kwargs)

Bases: nova.objects.base.NovaPersistentObject, nova.objects.base.NovaObject, nova.objects.base.NovaObjectDictCompat

VERSION = '1.16'
boot_index
connection_info
create(*args, **kwargs)
created_at
delete_on_termination
deleted
deleted_at
destination_type
destroy(*args, **kwargs)
device_name
device_type
disk_bus
fields = {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'no_device': Boolean(default=False,nullable=False), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'guest_format': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'device_name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'snapshot_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'deleted': Boolean(default=False,nullable=False), 'volume_size': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'instance_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'device_type': BlockDeviceType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('cdrom', 'disk', 'floppy', 'fs', 'lun')), 'delete_on_termination': Boolean(default=False,nullable=False), 'instance': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'volume_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'source_type': BlockDeviceSourceType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('blank', 'image', 'snapshot', 'volume')), 'boot_index': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'image_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'disk_bus': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'destination_type': BlockDeviceDestinationType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('local', 'volume')), 'deleted_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'connection_info': SensitiveString(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
classmethod get_by_volume(context, *args, **kwargs)
classmethod get_by_volume_and_instance(context, *args, **kwargs)
classmethod get_by_volume_id(context, *args, **kwargs)
get_image_mapping()
guest_format
id
image_id
instance
instance_uuid
is_image
is_root
is_volume
no_device
obj_load_attr(attrname)
save(*args, **kwargs)
snapshot_id
source_type
update_or_create(*args, **kwargs)
updated_at
volume_id
volume_size
class BlockDeviceMappingList(*args, **kwargs)

Bases: nova.objects.base.ObjectListBase, nova.objects.base.NovaObject

VERSION = '1.17'
classmethod bdms_by_instance_uuid(context, instance_uuids)
fields = {'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
classmethod get_by_instance_uuid(context, *args, **kwargs)
classmethod get_by_instance_uuids(context, *args, **kwargs)
instance_uuids
objects
root_bdm()

It only makes sense to call this method when the BlockDeviceMappingList contains BlockDeviceMappings from exactly one instance rather than BlockDeviceMappings from multiple instances.

For example, you should not call this method from a BlockDeviceMappingList created by get_by_instance_uuids(), but you may call this method from a BlockDeviceMappingList created by get_by_instance_uuid().

block_device_make_list(context, db_list, **extra_args)
block_device_make_list_from_dicts(context, bdm_dicts_list)

Previous topic

The nova.objects.base Module

Next topic

The nova.objects.build_request Module

Project Source

This Page