Handles all requests relating to compute resources (e.g. guest vms, networking and storage of vms, and compute hosts on which they run).
Bases: nova.db.base.Base
API for interacting with the compute manager.
Add fixed_ip from specified network to given instance.
Add security group to the instance
Makes calls to network_api to associate_floating_ip.
Parameters: | address – is a string floating ip address |
---|
Attach an existing volume to an existing instance.
Backup the given instance
Parameters: |
|
---|
Confirms a migration/resize and deletes the ‘old’ instance.
Provision instances, sending instance information to the scheduler. The scheduler will determine where the instance(s) go and will handle creating the DB entries.
Returns a tuple of (instances, reservation_id) where instances could be ‘None’ or a list of instance dicts depending on if we waited for information from the scheduler or not.
Create an entry in the DB for this new instance, including any related table updates (such as security group, etc).
This is called by the scheduler after a location for the instance has been determined.
Terminate an instance.
Delete the given metadata item from an instance.
Detach a volume from an instance.
Ensure that a context has a security group.
Creates a security group for the security context if it does not already exist.
Parameters: | context – the security context |
---|
Force delete a previously deleted (but not reclaimed) instance.
Get a single instance with the given instance_id.
Retrieve actions for the given instance.
Get instances that were continuously active over a window.
Get all instances filtered by one of the given parameters.
If there is no filter and the context is an admin, it will retrieve all instances in the system.
Deleted instances will be returned by default, unless there is a search option that says otherwise.
The results will be returned sorted in the order specified by the ‘sort_dir’ parameter using the key specified in the ‘sort_key’ parameter.
Get console output for an an instance.
Retrieve diagnostics for the given instance.
Get all faults for a list of instance uuids.
Get all metadata associated with an instance.
Get an instance type by instance type id.
Return the boolean state of given instance’s lock.
Get a url to an instance Console.
Write a file to the given instance.
Inject network info for the instance.
Lock the given instance.
Pause the given instance.
Reboot the given instance.
Rebuild the given instance with the provided attributes.
Remove fixed_ip from specified network to given instance.
Remove the security group associated with the instance
Rescue the given instance.
Reset networking on the instance.
Resize (ie, migrate) a running instance.
If flavor_id is None, the process is considered a migration, keeping the original flavor_id. If flavor_id is not None, the instance should be migrated to a new host and resized to the new flavor_id.
Restore a previously deleted (but not reclaimed) instance.
Resume the given instance.
Reverts a resize, deleting the ‘new’ instance in the process.
Set the root/admin password for the given instance.
Snapshot the given instance.
Parameters: |
|
---|---|
Returns: | A dict containing image metadata |
Terminate an instance.
Start an instance.
Stop an instance.
Suspend the given instance.
Called when a rule is added/removed from a provider firewall
Called when a security group gains a new or loses a member.
Sends an update request to each compute node for whom this is relevant.
Called when a rule is added to or removed from a security_group.
Unlock the given instance.
Unpause the given instance.
Unrescue the given instance.
Updates the instance in the datastore.
Parameters: |
|
---|---|
Returns: | None |
Updates or creates instance metadata.
If delete is True, metadata items that are not specified in the metadata argument will be deleted.
Bases: nova.db.base.Base
Sub-set of the Compute Manager API for managing host aggregates.
Adds the host to an aggregate.
Creates the model for the aggregate.
Deletes the aggregate.
Get an aggregate by id.
Get all the aggregates for this zone.
Removes host from the aggregate.
Update the properties of an aggregate.
Updates the aggregate metadata.
If a key is set to None, it gets removed from the aggregate metadata.
Bases: nova.db.base.Base
Sub-set of the Compute Manager API for managing host operations.
Reboots, shuts down or powers up the host.
Sets the specified host’s ability to accept new instances.
Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.
Decorator to check VM and/or task state before entry to API functions.
If the instance is in the wrong state, the wrapper will raise an exception.
Check corresponding policy prior of wrapped method to execution