def _set_share_group_error_state(self, method, context, ex, request_spec, action=None): LOG.warning("Failed to schedule_%(method)s: %(ex)s", { "method": method, "ex": ex }) share_group_state = {'status': constants.STATUS_ERROR} share_group_id = request_spec.get('share_group_id') if share_group_id: db.share_group_update(context, share_group_id, share_group_state) if action: self.message_api.create( context, action, context.project_id, resource_type=message_field.Resource.SHARE_GROUP, resource_id=share_group_id, exception=ex)
def _set_share_group_error_state(self, method, context, ex, request_spec): LOG.warning(_LW("Failed to schedule_%(method)s: %(ex)s"), {"method": method, "ex": ex}) share_group_state = {'status': constants.STATUS_ERROR} share_group_id = request_spec.get('share_group_id') if share_group_id: db.share_group_update(context, share_group_id, share_group_state)
def _set_share_group_error_state(self, method, context, ex, request_spec): LOG.warning(_LW("Failed to schedule_%(method)s: %(ex)s"), { "method": method, "ex": ex }) share_group_state = {'status': constants.STATUS_ERROR} share_group_id = request_spec.get('share_group_id') if share_group_id: db.share_group_update(context, share_group_id, share_group_state)
def share_group_update_db(context, share_group_id, host): '''Set the host and set the updated_at field of a share group. :returns: A share group with the updated fields set properly. ''' now = timeutils.utcnow() values = {'host': host, 'updated_at': now} return db.share_group_update(context, share_group_id, values)
def _set_share_group_error_state(self, method, context, ex, request_spec, action=None): LOG.warning("Failed to schedule_%(method)s: %(ex)s", {"method": method, "ex": ex}) share_group_state = {'status': constants.STATUS_ERROR} share_group_id = request_spec.get('share_group_id') if share_group_id: db.share_group_update(context, share_group_id, share_group_state) if action: self.message_api.create( context, action, context.project_id, resource_type=message_field.Resource.SHARE_GROUP, resource_id=share_group_id, exception=ex)
def _update(self, *args, **kwargs): db.share_group_update(*args, **kwargs)