def _set_cg_error_state(self, method, context, ex, request_spec): LOG.warning(_LW("Failed to schedule_%(method)s: %(ex)s"), {"method": method, "ex": ex}) cg_state = {'status': constants.STATUS_ERROR} consistency_group_id = request_spec.get('consistency_group_id') if consistency_group_id: db.consistency_group_update(context, consistency_group_id, cg_state)
def _set_cg_error_state(self, method, context, ex, request_spec): LOG.warning(_LW("Failed to schedule_%(method)s: %(ex)s"), {"method": method, "ex": ex}) cg_state = {'status': constants.STATUS_ERROR} consistency_group_id = request_spec.get('consistency_group_id') if consistency_group_id: db.consistency_group_update(context, consistency_group_id, cg_state)
def cg_update_db(context, cg_id, host): '''Set the host and set the updated_at field of a consistency group. :returns: A CG with the updated fields set properly. ''' now = timeutils.utcnow() values = {'host': host, 'updated_at': now} return db.consistency_group_update(context, cg_id, values)
def cg_update_db(context, cg_id, host): """Set the host and set the updated_at field of a consistency group. :returns: A CG with the updated fields set properly. """ now = timeutils.utcnow() values = {"host": host, "updated_at": now} return db.consistency_group_update(context, cg_id, values)
def cg_update_db(context, cg_id, host): '''Set the host and set the updated_at field of a consistency group. :returns: A CG with the updated fields set properly. ''' now = timeutils.utcnow() values = {'host': host, 'updated_at': now} return db.consistency_group_update(context, cg_id, values)
def _update(self, *args, **kwargs): db.consistency_group_update(*args, **kwargs)
def _update(self, *args, **kwargs): db.consistency_group_update(*args, **kwargs)