Exemplo n.º 1
0
 def DeleteBackup(self, request, context):
     logging.info("Deleting backup {}".format(request.name))
     resp = medusa_pb2.DeleteBackupResponse()
     try:
         medusa.purge.delete_backup(self.config, request.name, True)
         return resp
     except Exception:
         logging.exception("Deleting backup {} failed".format(request.name))
         return resp
Exemplo n.º 2
0
    def DeleteBackup(self, request, context):
        logging.info("Deleting backup {}".format(request.name))
        resp = medusa_pb2.DeleteBackupResponse()
        try:
            medusa.purge.delete_backup(self.config, request.name, True)
        except Exception as e:
            context.set_details("deleting backups failed: {}".format(e))
            context.set_code(grpc.StatusCode.INTERNAL)
            logging.exception("Deleting backup {} failed".format(request.name))

        return resp