Exemplo n.º 1
0
    def _action_reset_status(self, context, req, instance, body):
        context.notification = notification.DBaaSInstanceResetStatus(
            context, request=req)
        with StartNotification(context, instance_id=instance.id):
            instance.reset_status()

            LOG.debug("Failing backups for instance %s." % instance.id)
            backup_model.fail_for_instance(instance.id)

        return wsgi.Result(None, 202)
Exemplo n.º 2
0
    def _action_reset_status(self, context, req, instance, body):
        if 'force_delete' in body['reset_status']:
            self.authorize_instance_action(context, 'force_delete', instance)
        else:
            self.authorize_instance_action(context, 'reset_status', instance)
        context.notification = notification.DBaaSInstanceResetStatus(
            context, request=req)
        with StartNotification(context, instance_id=instance.id):
            instance.reset_status()

            LOG.debug("Failing backups for instance %s.", instance.id)
            backup_model.fail_for_instance(instance.id)

        return wsgi.Result(None, 202)