Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
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)
Пример #4
0
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)
Пример #5
0
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)
Пример #6
0
 def _update(self, *args, **kwargs):
     db.consistency_group_update(*args, **kwargs)
Пример #7
0
 def _update(self, *args, **kwargs):
     db.consistency_group_update(*args, **kwargs)