def create_snapshot(self, context, instance, name, metadata=None): backup_context = novacontext.RequestContext(instance['user_id'], instance['project_id']) backup = self.cobalt.bless_instance(backup_context, instance['uuid'], params={ "name" : name }) backup_uuid = backup['uuid'] db.instance_metadata_update(context, backup_uuid, metadata, False)
def _instance_metadata_update(self, context, instance_uuid, metadata): """ Updates the instance metadata """ return db.instance_metadata_update(context, instance_uuid, metadata, False)
def backup_metadata_update(self, context, backup_uuid, metadata): db.instance_metadata_update(context, backup_uuid, metadata, False)