summaryrefslogtreecommitdiffstats
path: root/share/newton_base/openoapi/hypervisor.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/newton_base/openoapi/hypervisor.py')
-rwxr-xr-xshare/newton_base/openoapi/hypervisor.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/share/newton_base/openoapi/hypervisor.py b/share/newton_base/openoapi/hypervisor.py
index 455bad68..bc7d577f 100755
--- a/share/newton_base/openoapi/hypervisor.py
+++ b/share/newton_base/openoapi/hypervisor.py
@@ -29,6 +29,7 @@ logger = logging.getLogger(__name__)
running_threads = {}
running_thread_lock = threading.Lock()
+
class Hypervisors(APIView):
service = {'service_type': 'compute',
'interface': 'public'}
@@ -38,6 +39,9 @@ class Hypervisors(APIView):
("container_format", "containerFormat")
]
+ def __init__(self):
+ super(Hypervisors, self).__init__()
+ self._logger = logger
def get(self, request, vimid="", tenantid="", hypervisorid=""):
logger.info("vimid, tenantid, hypervisorid = %s,%s,%s" % (vimid, tenantid, hypervisorid))
@@ -63,7 +67,6 @@ class Hypervisors(APIView):
return Response(data={'error': str(e)},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
-
def get_hypervisors(self, query="", vimid="", tenantid="", hypervisorid=""):
req_resource = "/os-hypervisors"
@@ -92,6 +95,10 @@ class Hypervisors(APIView):
class APIv1Hypervisors(Hypervisors):
+ def __init__(self):
+ super(APIv1Hypervisors, self).__init__()
+ self._logger = logger
+
def get(self, request, cloud_owner="", cloud_region_id="", tenantid="", hypervisorid=""):
self._logger.info("%s, %s" % (cloud_owner, cloud_region_id))