diff options
author | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2018-08-27 07:16:17 +0000 |
---|---|---|
committer | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2018-08-27 07:16:17 +0000 |
commit | 92e88758f73b99c8b817f318702d7b63e265a634 (patch) | |
tree | 313f6c3c4bf055822f9e979f509d0e8bc56b4123 /windriver/titanium_cloud/proxy/views/services.py | |
parent | 0321035cf1f31a07929de22a31bf520861f1eaff (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/services.py')
-rw-r--r-- | windriver/titanium_cloud/proxy/views/services.py | 20 |
1 files changed, 12 insertions, 8 deletions
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) |