Bases: nova.objects.base.NovaPersistentObject, nova.objects.base.NovaObject, nova.objects.base.NovaObjectDictCompat
Optimized metadata delete method.
This provides a more efficient way to delete a single metadata key, instead of just calling instance.save(). This should be called with the key still present in self.metadata, which it will update after completion.
Context manager to temporarily apply the migration context.
Calling .save() from within the context manager means that the mutated context will be saved which can cause incorrect resource tracking, and should be avoided.
Save updates to this instance
Column-wise updates will be made based on the result of 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 admin_state_reset: True if admin API is forcing setting of task_state/vm_state
Context manager to save an instance without syncing cells.
Temporarily disables the cells syncing logic, if enabled. This should only be used when saving an instance that has been passed down/up from another cell in order to avoid passing it back to the originator to be re-saved.
Bases: nova.objects.base.ObjectListBase, nova.objects.base.NovaObject
Batch query the database for our instances’ faults.
Returns: | A list of instance uuids for which faults were found. |
---|
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 in the database layer when querying for instances :param use_slave if True, ship this query off to a DB slave :returns: InstanceList
Returns all instances on all nodes.