summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/proxy/views
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:26:29 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:26:29 +0000
commit87ba0b1dc07997db90d62df3c50cbb826fb8b828 (patch)
tree8dd539d4dc3108d7f0470183ed612d92abb092a5 /windriver/titanium_cloud/proxy/views
parent2a4dd5b2e224db4a34870e836dc47989c830d837 (diff)
Fix pep8 errors in multicloud plugin
Fix pep8 errors in proxy module Change-Id: Iea570d7cdf822cf7788ec7094c46b801b0a8c8d1 Issue-ID: MULTICLOUD-420 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/__init__.py1
-rw-r--r--windriver/titanium_cloud/proxy/views/identityV3.py29
-rw-r--r--windriver/titanium_cloud/proxy/views/services.py32
3 files changed, 30 insertions, 32 deletions
diff --git a/windriver/titanium_cloud/proxy/views/__init__.py b/windriver/titanium_cloud/proxy/views/__init__.py
index afa702d3..ae1ce9db 100644
--- a/windriver/titanium_cloud/proxy/views/__init__.py
+++ b/windriver/titanium_cloud/proxy/views/__init__.py
@@ -11,4 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
diff --git a/windriver/titanium_cloud/proxy/views/identityV3.py b/windriver/titanium_cloud/proxy/views/identityV3.py
index 85fec086..3f369552 100644
--- a/windriver/titanium_cloud/proxy/views/identityV3.py
+++ b/windriver/titanium_cloud/proxy/views/identityV3.py
@@ -20,17 +20,18 @@ from common.msapi import extsys
logger = logging.getLogger(__name__)
+
# DEBUG=True
-class Tokens(newton_identityV3.Tokens):
+class Tokens(newton_identityV3.Tokens):
def __init__(self):
super(Tokens, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_PREFIX
# self._logger = logger
-class TokensV2(newton_identityV3.TokensV2):
+class TokensV2(newton_identityV3.TokensV2):
def __init__(self):
super(TokensV2, self).__init__()
self.proxy_prefix = settings.MULTICLOUD_PREFIX
@@ -43,23 +44,21 @@ class APIv1Tokens(Tokens):
self.proxy_prefix = settings.MULTICLOUD_API_V1_PREFIX
# 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.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)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Tokens,self).get(request, vimid)
-
+ return super(APIv1Tokens, self).get(request, vimid)
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.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)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Tokens,self).post(request, vimid)
+ return super(APIv1Tokens, self).post(request, vimid)
class APIv1TokensV2(TokensV2):
@@ -68,20 +67,18 @@ class APIv1TokensV2(TokensV2):
self.proxy_prefix = settings.MULTICLOUD_API_V1_PREFIX
# 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.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)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1TokensV2,self).get(request, vimid)
-
+ return super(APIv1TokensV2, self).get(request, vimid)
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.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)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1TokensV2,self).post(request, vimid)
+ 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 2ea46630..605e22b7 100644
--- a/windriver/titanium_cloud/proxy/views/services.py
+++ b/windriver/titanium_cloud/proxy/views/services.py
@@ -14,9 +14,9 @@
import logging
-from rest_framework import status
+# from rest_framework import status
-from django.conf import settings
+# from django.conf import settings
from newton_base.proxy import services as newton_services
from common.msapi import extsys
@@ -24,6 +24,7 @@ logger = logging.getLogger(__name__)
# DEBUG=True
+
class Services(newton_services.Services):
def __init__(self):
@@ -44,7 +45,8 @@ class GetTenants(newton_services.GetTenants):
self._logger.info("vimid: %s" % (vimid))
self._logger.debug("with servicetype, requri> %s,%s" % (servicetype, requri))
- return super(GetTenants,self).get(request, vimid, servicetype, requri)
+ return super(GetTenants, self).get(request, vimid, servicetype, requri)
+
class APIv1Services(Services):
@@ -58,37 +60,37 @@ class APIv1Services(Services):
# 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)
+ return super(APIv1Services, self).head(request, vimid, servicetype, requri)
def get(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Services,self).get(request, vimid, servicetype, requri)
+ return super(APIv1Services, self).get(request, vimid, servicetype, requri)
def post(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Services,self).post(request, vimid, servicetype, requri)
+ return super(APIv1Services, self).post(request, vimid, servicetype, requri)
def put(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Services,self).put(request, vimid, servicetype, requri)
+ return super(APIv1Services, self).put(request, vimid, servicetype, requri)
def patch(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Services,self).patch(request, vimid, servicetype, requri)
+ return super(APIv1Services, self).patch(request, vimid, servicetype, requri)
def delete(self, request, cloud_owner="", cloud_region_id="", servicetype="", requri=""):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Services,self).delete(request, vimid, servicetype, requri)
+ return super(APIv1Services, self).delete(request, vimid, servicetype, requri)
class APIv1GetTenants(GetTenants):
@@ -106,7 +108,7 @@ class APIv1GetTenants(GetTenants):
# 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)
+ return super(APIv1GetTenants, self).head(request, vimid, servicetype, requri)
def get(self, request, cloud_owner="", cloud_region_id="", servicetype="identity", requri='v3/projects'):
self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner, cloud_region_id))
@@ -114,7 +116,7 @@ class APIv1GetTenants(GetTenants):
# self._logger.debug("with META> %s" % request.META)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1GetTenants,self).get(request, vimid, servicetype, requri)
+ return super(APIv1GetTenants, self).get(request, vimid, servicetype, requri)
def post(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))
@@ -123,22 +125,22 @@ class APIv1GetTenants(GetTenants):
# self._logger.debug("with data> %s" % request.data)
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1GetTenants,self).post(request, vimid, servicetype, requri)
+ return super(APIv1GetTenants, self).post(request, vimid, servicetype, requri)
def put(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))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1GetTenants,self).put(request, vimid, servicetype, requri)
+ return super(APIv1GetTenants, self).put(request, vimid, servicetype, requri)
def patch(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))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1GetTenants,self).patch(request, vimid, servicetype, requri)
+ return super(APIv1GetTenants, self).patch(request, vimid, servicetype, requri)
def delete(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))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1GetTenants,self).delete(request, vimid, servicetype, requri)
+ return super(APIv1GetTenants, self).delete(request, vimid, servicetype, requri)