summaryrefslogtreecommitdiffstats
path: root/ocata/ocata/proxy
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-09-13 17:57:00 +0800
committerBin Yang <bin.yang@windriver.com>2017-09-13 17:57:00 +0800
commit51f18c6e84a88eaea53237b3a21d32ad4ab0e8a5 (patch)
treeaed163e17ddfde30bb46e9aafa857550b07d1f05 /ocata/ocata/proxy
parent530818aab2a02921e0445b6062260aad9e4b2810 (diff)
Refactor newton and ocato proxy
refactor code and fix bugs to update proxy prefix Change-Id: I4a02b0570759f087581e875cc683d4475bd2121b Issue-Id: MULTICLOUD-89 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'ocata/ocata/proxy')
-rw-r--r--ocata/ocata/proxy/urls.py2
-rw-r--r--ocata/ocata/proxy/views/identityV3.py8
-rw-r--r--ocata/ocata/proxy/views/services.py12
3 files changed, 12 insertions, 10 deletions
diff --git a/ocata/ocata/proxy/urls.py b/ocata/ocata/proxy/urls.py
index 7d52a4ed..e32702f5 100644
--- a/ocata/ocata/proxy/urls.py
+++ b/ocata/ocata/proxy/urls.py
@@ -23,8 +23,6 @@ urlpatterns = [
# identityV2.Tokens.as_view()),
url(r'^identity/v3/auth/tokens$',
identityV3.Tokens.as_view()),
- url(r'^identity/v3/auth/catalog$',
- identityV3.Catalog.as_view()),
url(r'^identity/(?:v2.0/|)tenants$',
services.GetTenants.as_view()),
url(r'^(?P<servicetype>[0-9a-zA-Z_-]+)/(?P<requri>[0-9a-zA-Z./_-]*)$',
diff --git a/ocata/ocata/proxy/views/identityV3.py b/ocata/ocata/proxy/views/identityV3.py
index 5e018e2a..534ebe8f 100644
--- a/ocata/ocata/proxy/views/identityV3.py
+++ b/ocata/ocata/proxy/views/identityV3.py
@@ -13,7 +13,7 @@
# limitations under the License.
import logging
-from newton.pub.config import config
+from ocata.pub.config import config
from newton.proxy.views import identityV3 as newton_identityV3
logger = logging.getLogger(__name__)
@@ -25,9 +25,3 @@ class Tokens(newton_identityV3.Tokens):
def __init__(self):
self.proxy_prefix = config.MULTICLOUD_PREFIX
self._logger = logger
-
-class Catalog(newton_identityV3.Catalog):
-
- def __init__(self):
- self.proxy_prefix = config.MULTICLOUD_PREFIX
- self._logger = logger
diff --git a/ocata/ocata/proxy/views/services.py b/ocata/ocata/proxy/views/services.py
index 5a022fe4..7eb6bd25 100644
--- a/ocata/ocata/proxy/views/services.py
+++ b/ocata/ocata/proxy/views/services.py
@@ -13,7 +13,9 @@
# limitations under the License.
import logging
-from newton.pub.config import config
+from rest_framework import status
+
+from ocata.pub.config import config
from newton.proxy.views import services as newton_services
logger = logging.getLogger(__name__)
@@ -33,3 +35,11 @@ class GetTenants(newton_services.GetTenants):
def __init__(self):
self._logger = logger
+
+ def get(self, request, vimid="", servicetype="identity", requri='v3/projects'):
+ self._logger.debug("GetTenants--get::META> %s" % request.META)
+ self._logger.debug("GetTenants--get::data> %s" % request.data)
+ self._logger.debug("GetTenants--get::vimid, servicetype, requri> %s,%s,%s"
+ % (vimid, servicetype, requri))
+
+ return super(GetTenants,self).get(request, vimid, servicetype, requri)