diff options
author | Yun Huang <yun.huang@windriver.com> | 2018-03-07 09:16:38 +0800 |
---|---|---|
committer | Yun Huang <yun.huang@windriver.com> | 2018-03-07 09:23:18 +0800 |
commit | 9b38263158909c0d20c0f36438071b3c532ec284 (patch) | |
tree | 05cebf5569f401ddeb095ea6282e2203e6c3eec0 /windriver/titanium_cloud/extensions/views | |
parent | 8ff2e0716d126a9d47dc98f933bb0bc046faa05d (diff) |
Change the code base from newton to share
And adopt settings,depreciate config
Change-Id: Ib467a6e914ae89ab8799d38191dfed8b3cd7b726
Issue-ID: MULTICLOUD-138
Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/extensions/views')
-rw-r--r-- | windriver/titanium_cloud/extensions/views/epacaps.py | 6 | ||||
-rw-r--r-- | windriver/titanium_cloud/extensions/views/extensions.py | 11 | ||||
-rw-r--r-- | windriver/titanium_cloud/extensions/views/fcaps.py | 10 |
3 files changed, 13 insertions, 14 deletions
diff --git a/windriver/titanium_cloud/extensions/views/epacaps.py b/windriver/titanium_cloud/extensions/views/epacaps.py index 69b24c9f..77542b31 100644 --- a/windriver/titanium_cloud/extensions/views/epacaps.py +++ b/windriver/titanium_cloud/extensions/views/epacaps.py @@ -16,10 +16,10 @@ import logging import json import traceback -from titanium_cloud.pub.config import config +from django.conf import settings -from newton.extensions.views import epacaps as newton_epacaps +from newton_base.extensions import epacaps as newton_epacaps logger = logging.getLogger(__name__) @@ -29,5 +29,5 @@ DEBUG=True class EpaCaps(newton_epacaps.EpaCaps): def __init__(self): - self.proxy_prefix = config.MULTICLOUD_PREFIX + self.proxy_prefix = settings.MULTICLOUD_PREFIX self._logger = logger diff --git a/windriver/titanium_cloud/extensions/views/extensions.py b/windriver/titanium_cloud/extensions/views/extensions.py index d6988830..680e2ca6 100644 --- a/windriver/titanium_cloud/extensions/views/extensions.py +++ b/windriver/titanium_cloud/extensions/views/extensions.py @@ -20,11 +20,10 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from titanium_cloud.pub.config import config -from newton.pub.exceptions import VimDriverNewtonException -from newton.requests.views.util import VimDriverUtils -from newton.extensions.views import extensions as newton_extensions -from newton.pub.msapi import extsys +from django.conf import settings +from common.exceptions import VimDriverNewtonException +from common.msapi import extsys +from newton_base.extensions import extensions as newton_extensions logger = logging.getLogger(__name__) @@ -34,7 +33,7 @@ class Extensions(newton_extensions.Extensions): def __init__(self): self._logger = logger - self.proxy_prefix = config.MULTICLOUD_PREFIX + self.proxy_prefix = settings.MULTICLOUD_PREFIX def get(self, request, vimid=""): diff --git a/windriver/titanium_cloud/extensions/views/fcaps.py b/windriver/titanium_cloud/extensions/views/fcaps.py index 894db367..d5be095f 100644 --- a/windriver/titanium_cloud/extensions/views/fcaps.py +++ b/windriver/titanium_cloud/extensions/views/fcaps.py @@ -24,10 +24,10 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from titanium_cloud.pub.config import config -from newton.pub.exceptions import VimDriverNewtonException -from newton.requests.views.util import VimDriverUtils -from newton.pub.msapi import extsys +from django.conf import settings +from common.exceptions import VimDriverNewtonException +from newton_base.util import VimDriverUtils +from common.msapi import extsys @@ -126,7 +126,7 @@ class GuestMonitorWorker (threading.Thread): class GuestMonitor(APIView): def __init__(self): - self.proxy_prefix = config.MULTICLOUD_PREFIX + self.proxy_prefix = settings.MULTICLOUD_PREFIX self._logger = logger def post(self, request, vimid="", vserverid=""): |