summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/extensions/views
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:18:21 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:18:21 +0000
commit2a4dd5b2e224db4a34870e836dc47989c830d837 (patch)
treea1987a28d95f5dd75aae0b32f2e7ee96ed049498 /windriver/titanium_cloud/extensions/views
parent959cc674521d99434bb4bf126cb367902aff15d3 (diff)
Fix pep8 errors in windriver plugin
Fix pep8 errors in swagger,sample and extension Change-Id: I255c08565b7eaf175b9d7506596957ecb2887452 Issue-ID: MULTICLOUD-420 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/extensions/views')
-rw-r--r--windriver/titanium_cloud/extensions/views/__init__.py1
-rw-r--r--windriver/titanium_cloud/extensions/views/extensions.py18
2 files changed, 9 insertions, 10 deletions
diff --git a/windriver/titanium_cloud/extensions/views/__init__.py b/windriver/titanium_cloud/extensions/views/__init__.py
index afa702d3..ae1ce9db 100644
--- a/windriver/titanium_cloud/extensions/views/__init__.py
+++ b/windriver/titanium_cloud/extensions/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/extensions/views/extensions.py b/windriver/titanium_cloud/extensions/views/extensions.py
index 9360cbba..7dd78272 100644
--- a/windriver/titanium_cloud/extensions/views/extensions.py
+++ b/windriver/titanium_cloud/extensions/views/extensions.py
@@ -18,7 +18,7 @@ import traceback
from keystoneauth1.exceptions import HttpError
from rest_framework import status
from rest_framework.response import Response
-from rest_framework.views import APIView
+# from rest_framework.views import APIView
from django.conf import settings
from common.exceptions import VimDriverNewtonException
@@ -29,6 +29,7 @@ logger = logging.getLogger(__name__)
# DEBUG=True
+
class Extensions(newton_extensions.Extensions):
def __init__(self):
@@ -36,7 +37,6 @@ class Extensions(newton_extensions.Extensions):
# self._logger = logger
self.proxy_prefix = settings.MULTICLOUD_PREFIX
-
def get(self, request, vimid=""):
logger.debug("Extensions--get::data> %s" % request.data)
logger.debug("Extensions--get::vimid> %s"
@@ -55,9 +55,9 @@ class Extensions(newton_extensions.Extensions):
]
content = {
- "cloud-owner":cloud_owner,
- "cloud-region-id":cloud_region_id,
- "vimid":vimid,
+ "cloud-owner": cloud_owner,
+ "cloud-region-id": cloud_region_id,
+ "vimid": vimid,
"extensions": registered_extensions
}
return Response(data=content, status=status.HTTP_200_OK)
@@ -73,7 +73,6 @@ class Extensions(newton_extensions.Extensions):
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
-
class APIv1Extensions(Extensions):
def __init__(self):
@@ -81,9 +80,10 @@ class APIv1Extensions(Extensions):
# self._logger = logger
self.proxy_prefix = settings.MULTICLOUD_API_V1_PREFIX
-
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))
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
- return super(APIv1Extensions,self).get(request, vimid)
+ return super(APIv1Extensions, self).get(request, vimid)