Commit 937e4814 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Get rid of httperror module

This was a leftover from the early days of the remote API in Ganeti 1.2.

Reviewed-by: ultrotter
parent fcd62d84
......@@ -93,7 +93,6 @@ hypervisor_PYTHON = \
rapi_PYTHON = \
lib/rapi/ \
lib/rapi/ \
lib/rapi/ \
lib/rapi/ \
lib/rapi/ \
# Copyright (C) 2006, 2007, 2008 Google Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
"""HTTP errors.
class HTTPException(Exception):
code = None
message = None
def __init__(self, message=None):
if message is not None:
self.message = message
class HTTPBadRequest(HTTPException):
code = 400
class HTTPNotFound(HTTPException):
code = 404
class HTTPInternalError(HTTPException):
code = 500
class HTTPServiceUnavailable(HTTPException):
code = 503
......@@ -28,9 +28,9 @@ import ganeti.errors
import ganeti.opcodes
from ganeti import constants
from ganeti import http
from ganeti.rapi import baserlib
from ganeti.rapi import httperror
I_FIELDS = ["name", "os", "pnode", "snodes",
......@@ -313,6 +313,6 @@ class R_os(baserlib.R_Generic):
diagnose_data = ganeti.cli.SubmitOpCode(op)
if not isinstance(diagnose_data, list):
raise httperror.HTTPInternalError(message="Can't get OS list")
raise http.HTTPInternalError(message="Can't get OS list")
return [row[0] for row in diagnose_data if row[1]]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment