The nova.db.sqlalchemy.models Module

SQLAlchemy models for nova data.

class AgentBuild(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents an agent build.

architecture
created_at
deleted
deleted_at
hypervisor
id
md5hash
os
updated_at
url
version
class Aggregate(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a cluster of hosts that exists in this zone.

availability_zone
created_at
deleted
deleted_at
hosts
id
metadetails
name
updated_at
class AggregateHost(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a host that is member of an aggregate.

aggregate_id
created_at
deleted
deleted_at
host
id
updated_at
class AggregateMetadata(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a metadata key/value pair for an aggregate.

aggregate_id
created_at
deleted
deleted_at
id
key
updated_at
value
class BandwidthUsage(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Cache for instance bandwidth usage data pulled from the hypervisor.

bw_in
bw_out
created_at
deleted
deleted_at
id
last_ctr_in
last_ctr_out
last_refreshed
mac
start_period
updated_at
uuid
class BlockDeviceMapping(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents block device mapping that is defined by EC2.

boot_index
connection_info
created_at
delete_on_termination
deleted
deleted_at
destination_type
device_name
device_type
disk_bus
guest_format
id
image_id
instance
instance_uuid
no_device
snapshot_id
source_type
updated_at
volume_id
volume_size
class Cell(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents parent and child cells of this cell. Cells can have multiple parents and children, so there could be any number of entries with is_parent=True or False

api_url
created_at
deleted
deleted_at
id
is_parent
name
transport_url
updated_at
weight_offset
weight_scale
class Certificate(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a x509 certificate.

created_at
deleted
deleted_at
file_name
id
project_id
updated_at
user_id
class ComputeNode(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a running compute service on a host.

cpu_allocation_ratio
cpu_info
created_at
current_workload
deleted
deleted_at
disk_available_least
extra_resources
free_disk_gb
free_ram_mb
host
host_ip
hypervisor_hostname
hypervisor_type
hypervisor_version
id
local_gb
local_gb_used
memory_mb
memory_mb_used
metrics
numa_topology
pci_stats
ram_allocation_ratio
running_vms
service_id
stats
supported_instances
updated_at
vcpus
vcpus_used
class Console(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a console session for an instance.

created_at
deleted
deleted_at
id
instance_name
instance_uuid
password
pool
pool_id
port
updated_at
class ConsolePool(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents pool of consoles on the same physical node.

address
compute_host
console_type
created_at
deleted
deleted_at
host
id
password
public_hostname
updated_at
username
class DNSDomain(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a DNS domain with availability zone or project info.

availability_zone
created_at
deleted
deleted_at
domain
project_id
scope
updated_at
class FixedIp(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a fixed ip for an instance.

address
allocated
created_at
deleted
deleted_at
host
id
instance
instance_uuid
leased
network
network_id
reserved
updated_at
virtual_interface
virtual_interface_id
class FloatingIp(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a floating ip that dynamically forwards to a fixed ip.

address
auto_assigned
created_at
deleted
deleted_at
fixed_ip
fixed_ip_id
host
id
interface
pool
project_id
updated_at
class Instance(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a guest VM.

access_ip_v4
access_ip_v6
architecture
auto_disk_config
availability_zone
cell_name
cleaned
config_drive
created_at
default_ephemeral_device
default_swap_device
deleted
deleted_at
disable_terminate
display_description
display_name
ephemeral_gb
ephemeral_key_uuid
host
hostname
id
image_ref
injected_files = []
instance_type_id
internal_id
kernel_id
key_data
key_name
launch_index
launched_at
launched_on
locked
locked_by
memory_mb
name
node
os_type
power_state
progress
project_id
ramdisk_id
reservation_id
root_device_name
root_gb
shutdown_terminate
task_state
terminated_at
updated_at
user_data
user_id
uuid
vcpus
vm_mode
vm_state
class InstanceAction(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Track client actions on an instance.

The intention is that there will only be one of these per user request. A lookup by (instance_uuid, request_id) should always return a single result.

action
created_at
deleted
deleted_at
finish_time
id
instance_uuid
message
project_id
request_id
start_time
updated_at
user_id
class InstanceActionEvent(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Track events that occur during an InstanceAction.

action_id
created_at
deleted
deleted_at
details
event
finish_time
host
id
result
start_time
traceback
updated_at
class InstanceExtra(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

created_at
deleted
deleted_at
flavor
id
instance
instance_uuid
migration_context
numa_topology
pci_requests
updated_at
vcpu_model
class InstanceFault(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

code
created_at
deleted
deleted_at
details
host
id
instance_uuid
message
updated_at
class InstanceGroup(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents an instance group.

A group will maintain a collection of instances and the relationship between them.

created_at
deleted
deleted_at
id
members
name
policies
project_id
updated_at
user_id
uuid
class InstanceGroupMember(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents the members for an instance group.

created_at
deleted
deleted_at
group_id
id
instance_id
updated_at
class InstanceGroupPolicy(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents the policy type for an instance group.

created_at
deleted
deleted_at
group_id
id
policy
updated_at
class InstanceIdMapping(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Compatibility layer for the EC2 instance service.

created_at
deleted
deleted_at
id
updated_at
uuid
class InstanceInfoCache(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a cache of information about an instance

created_at
deleted
deleted_at
id
instance
instance_uuid
network_info
updated_at
class InstanceMetadata(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a user-provided metadata key/value pair for an instance.

created_at
deleted
deleted_at
id
instance
instance_uuid
key
updated_at
value
class InstanceSystemMetadata(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a system-owned metadata key/value pair for an instance.

created_at
deleted
deleted_at
id
instance
instance_uuid
key
updated_at
value
class InstanceTypeExtraSpecs(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents additional specs as key/value pairs for an instance_type.

created_at
deleted
deleted_at
id
instance_type
instance_type_id
key
updated_at
value
class InstanceTypeProjects(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represent projects associated instance_types.

created_at
deleted
deleted_at
id
instance_type
instance_type_id
project_id
updated_at
class InstanceTypes(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents possible flavors for instances.

Note: instance_type and flavor are synonyms and the term instance_type is deprecated and in the process of being removed.

created_at
deleted
deleted_at
disabled
ephemeral_gb
flavorid
id
is_public
memory_mb
name
root_gb
rxtx_factor
swap
updated_at
vcpu_weight
vcpus
class KeyPair(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a public key pair for ssh / WinRM.

created_at
deleted
deleted_at
fingerprint
id
name
public_key
type
updated_at
user_id
MediumText()
class Migration(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a running host-to-host migration.

created_at
deleted
deleted_at
dest_compute
dest_host
dest_node
hidden
id
instance
instance_uuid
migration_type
new_instance_type_id
old_instance_type_id
source_compute
source_node
status
updated_at
class Network(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a network.

bridge
bridge_interface
broadcast
cidr
cidr_v6
created_at
deleted
deleted_at
dhcp_server
dhcp_start
dns1
dns2
enable_dhcp
gateway
gateway_v6
host
id
injected
label
mtu
multi_host
netmask
netmask_v6
priority
project_id
rxtx_base
share_address
updated_at
uuid
vlan
vpn_private_address
vpn_public_address
vpn_public_port
class NovaBase

Bases: oslo_db.sqlalchemy.models.SoftDeleteMixin, oslo_db.sqlalchemy.models.TimestampMixin, oslo_db.sqlalchemy.models.ModelBase

metadata = None
save(session=None)
class PciDevice(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a PCI host device that can be passed through to instances.

address
compute_node_id
created_at
deleted
deleted_at
dev_id
dev_type
extra_info
id
instance
instance_uuid
label
numa_node
product_id
request_id
status
updated_at
vendor_id
class ProjectUserQuota(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a single quota override for a user with in a project.

created_at
deleted
deleted_at
hard_limit
id
project_id
resource
uniq_name = 'uniq_project_user_quotas0user_id0project_id0resource0deleted'
updated_at
user_id
class ProviderFirewallRule(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a rule in a security group.

cidr
created_at
deleted
deleted_at
from_port
id
protocol
to_port
updated_at
class Quota(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a single quota override for a project.

If there is no row for a given project id and resource, then the default for the quota class is used. If there is no row for a given quota class and resource, then the default for the deployment is used. If the row is present but the hard limit is Null, then the resource is unlimited.

created_at
deleted
deleted_at
hard_limit
id
project_id
resource
updated_at
class QuotaClass(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a single quota override for a quota class.

If there is no row for a given quota class and resource, then the default for the deployment is used. If the row is present but the hard limit is Null, then the resource is unlimited.

class_name
created_at
deleted
deleted_at
hard_limit
id
resource
updated_at
class QuotaUsage(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents the current usage for a given resource.

created_at
deleted
deleted_at
id
in_use
project_id
reserved
resource
total
until_refresh
updated_at
user_id
class Reservation(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a resource reservation for quotas.

created_at
deleted
deleted_at
delta
expire
id
project_id
resource
updated_at
usage
usage_id
user_id
uuid
class S3Image(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Compatibility layer for the S3 image service talking to Glance.

created_at
deleted
deleted_at
id
updated_at
uuid
class SecurityGroup(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a security group.

created_at
deleted
deleted_at
description
id
instances
name
project_id
updated_at
user_id
class SecurityGroupIngressDefaultRule(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

cidr
created_at
deleted
deleted_at
from_port
id
protocol
to_port
updated_at
class SecurityGroupIngressRule(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a rule in a security group.

cidr
created_at
deleted
deleted_at
from_port
grantee_group
group_id
id
parent_group
parent_group_id
protocol
to_port
updated_at
class SecurityGroupInstanceAssociation(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

created_at
deleted
deleted_at
id
instance_uuid
security_group_id
updated_at
class Service(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a running service on a host.

binary
created_at
deleted
deleted_at
disabled
disabled_reason
forced_down
host
id
last_seen_up
report_count
topic
updated_at
version
class Snapshot(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a block storage device that can be attached to a VM.

created_at
deleted
deleted_at
display_description
display_name
id
name
progress
project_id
scheduled_at
status
updated_at
user_id
volume_id
volume_name
volume_size
class SnapshotIdMapping(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Compatibility layer for the EC2 snapshot service.

created_at
deleted
deleted_at
id
updated_at
uuid
class Tag(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, oslo_db.sqlalchemy.models.ModelBase

Represents the tag for a resource.

instance
resource_id
tag
class TaskLog(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Audit log for background periodic tasks.

created_at
deleted
deleted_at
errors
host
id
message
period_beginning
period_ending
state
task_items
task_name
updated_at
class VirtualInterface(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Represents a virtual interface on an instance.

address
created_at
deleted
deleted_at
id
instance_uuid
network_id
updated_at
uuid
class VolumeIdMapping(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Compatibility layer for the EC2 volume service.

created_at
deleted
deleted_at
id
updated_at
uuid
class VolumeUsage(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, nova.db.sqlalchemy.models.NovaBase

Cache for volume usage data pulled from the hypervisor.

availability_zone
created_at
curr_last_refreshed
curr_read_bytes
curr_reads
curr_write_bytes
curr_writes
deleted
deleted_at
id
instance_uuid
project_id
tot_last_refreshed
tot_read_bytes
tot_reads
tot_write_bytes
tot_writes
updated_at
user_id
volume_id

Previous topic

The nova.db.sqlalchemy.migration Module

Next topic

The nova.db.sqlalchemy.types Module

Project Source

This Page