def _migration_status_update(self, context, id, event=None, status=None): data = {} if event: data['migration_event'] = event if status: data['migration_status'] = status if data: db.migration_update(context, id, data)
def save(self): updates = self.guts_obj_get_changes() if updates: db.migration_update(self._context, self.id, updates) self.obj_reset_changes()
def update_migration(ctxt, id, values): """Updates migration DB entry""" # Ex: values = {"migration_status": "INCOMPLETE", # "migration_event": "DOWNLOADING"} db.migration_update(ctxt, id, values)