Rename hypervisor to compute

Fix #487
This commit is contained in:
Julien Duponchelle
2016-04-15 17:57:06 +02:00
parent 3185baff0d
commit 58d4a529d4
186 changed files with 1173 additions and 1206 deletions

View File

@ -25,7 +25,7 @@ import traceback
log = logging.getLogger(__name__)
from ..hypervisor.vm_error import VMError
from ..compute.vm_error import VMError
from ..controller.controller_error import ControllerError
from ..ubridge.ubridge_error import UbridgeError
from .response import Response
@ -127,8 +127,8 @@ class Route(object):
# Add the type of server to the route
if "controller" in func.__module__:
route = "/v{version}{path}".format(path=path, version=api_version)
elif "hypervisor" in func.__module__:
route = "/v{version}/hypervisor{path}".format(path=path, version=api_version)
elif "compute" in func.__module__:
route = "/v{version}/compute{path}".format(path=path, version=api_version)
else:
route = path
@ -243,7 +243,7 @@ class Route(object):
if vm_id is None:
vm_id = request.match_info["device_id"]
if "hypervisor" in request.path:
if "compute" in request.path:
type = "compute"
else:
type = "controller"