summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/proxy/views
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2018-08-27 07:16:17 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2018-08-27 07:16:17 +0000
commit92e88758f73b99c8b817f318702d7b63e265a634 (patch)
tree313f6c3c4bf055822f9e979f509d0e8bc56b4123 /windriver/titanium_cloud/proxy/views
parent0321035cf1f31a07929de22a31bf520861f1eaff (diff)
Fix subclass init issue
All subclass should invoke parent class __init__() Change-Id: Id7537156dc65f4c4739d2b70cc705d2ff39f4ff0 Issue-ID: MULTICLOUD-337 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/proxy/views')
-rw-r--r--windriver/titanium_cloud/proxy/views/identityV3.py24
-rw-r--r--windriver/titanium_cloud/proxy/views/services.py20
2 files changed, 26 insertions, 18 deletions
diff --git a/windriver/titanium_cloud/proxy/views/identityV3.py b/windriver/titanium_cloud/proxy/views/identityV3.py
index e6dc16a7..85fec086 100644
--- a/windriver/titanium_cloud/proxy/views/identityV3.py
+++ b/windriver/titanium_cloud/proxy/views/identityV3.py
@@ -25,20 +25,23 @@ logger = logging.getLogger(__name__)
class Tokens(newton_identityV3.Tokens):
def __init__(self):
+ super(Tokens, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_PREFIX
- self._logger = logger
+ # self._logger = logger
class TokensV2(newton_identityV3.TokensV2):
def __init__(self):
+ super(TokensV2, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_PREFIX
- self._logger = logger
+ # self._logger = logger
class APIv1Tokens(Tokens):
def __init__(self):
+ super(APIv1Tokens, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_API_V1_PREFIX
- self._logger = logger
+ # self._logger = logger
def get(self, request, cloud_owner="", cloud_region_id=""):
@@ -52,8 +55,8 @@ class APIv1Tokens(Tokens):
def post(self, request, cloud_owner="", cloud_region_id=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id))
- #self._logger.debug("META> %s" % request.META)
- #self._logger.debug("data> %s" % request.data)
+ # self._logger.debug("META> %s" % request.META)
+ # self._logger.debug("data> %s" % request.data)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1Tokens,self).post(request, vimid)
@@ -61,14 +64,15 @@ class APIv1Tokens(Tokens):
class APIv1TokensV2(TokensV2):
def __init__(self):
+ super(APIv1TokensV2, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_API_V1_PREFIX
- self._logger = logger
+ # self._logger = logger
def get(self, request, cloud_owner="", cloud_region_id=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id))
- #self._logger.debug("META> %s" % request.META)
- #self._logger.debug("data> %s" % request.data)
+ # self._logger.debug("META> %s" % request.META)
+ # self._logger.debug("data> %s" % request.data)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1TokensV2,self).get(request, vimid)
@@ -76,8 +80,8 @@ class APIv1TokensV2(TokensV2):
def post(self, request, cloud_owner="", cloud_region_id=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id))
- #self._logger.debug("META> %s" % request.META)
- #self._logger.debug("data> %s" % request.data)
+ # self._logger.debug("META> %s" % request.META)
+ # self._logger.debug("data> %s" % request.data)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1TokensV2,self).post(request, vimid)
diff --git a/windriver/titanium_cloud/proxy/views/services.py b/windriver/titanium_cloud/proxy/views/services.py
index 6f4ec326..2ea46630 100644
--- a/windriver/titanium_cloud/proxy/views/services.py
+++ b/windriver/titanium_cloud/proxy/views/services.py
@@ -27,7 +27,8 @@ logger = logging.getLogger(__name__)
class Services(newton_services.Services):
def __init__(self):
- self._logger = logger
+ super(Services, self).__init__()
+ # self._logger = logger
class GetTenants(newton_services.GetTenants):
@@ -36,7 +37,8 @@ class GetTenants(newton_services.GetTenants):
'''
def __init__(self):
- self._logger = logger
+ super(GetTenants, self).__init__()
+ # self._logger = logger
def get(self, request, vimid="", servicetype="identity", requri='v3/projects'):
self._logger.info("vimid: %s" % (vimid))
@@ -47,12 +49,13 @@ class GetTenants(newton_services.GetTenants):
class APIv1Services(Services):
def __init__(self):
- self._logger = logger
+ super(APIv1Services, self).__init__()
+ # self._logger = logger
def head(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
-# self._logger.info("servicetype, requri> %s,%s" % (servicetype, requri))
-# self._logger.debug("META, data> %s , %s" % (request.META, request.data))
+ # self._logger.info("servicetype, requri> %s,%s" % (servicetype, requri))
+ # self._logger.debug("META, data> %s , %s" % (request.META, request.data))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1Services,self).head(request, vimid, servicetype, requri)
@@ -94,12 +97,13 @@ class APIv1GetTenants(GetTenants):
'''
def __init__(self):
- self._logger = logger
+ super(APIv1GetTenants, self).__init__()
+ # self._logger = logger
def head(self, request, cloud_owner="", cloud_region_id="", servicetype="identity", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
-# self._logger.info("servicetype, requri> %s,%s" % (servicetype, requri))
-# self._logger.debug("META, data> %s , %s" % (request.META, request.data))
+ # self._logger.info("servicetype, requri> %s,%s" % (servicetype, requri))
+ # self._logger.debug("META, data> %s , %s" % (request.META, request.data))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1GetTenants,self).head(request, vimid, servicetype, requri)