summaryrefslogtreecommitdiffstats
path: root/share/newton_base/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'share/newton_base/proxy')
-rw-r--r--share/newton_base/proxy/dnsaasdelegate.py6
-rw-r--r--share/newton_base/proxy/identityV3.py13
-rw-r--r--share/newton_base/proxy/proxy_utils.py2
-rw-r--r--share/newton_base/proxy/services.py6
4 files changed, 14 insertions, 13 deletions
diff --git a/share/newton_base/proxy/dnsaasdelegate.py b/share/newton_base/proxy/dnsaasdelegate.py
index 85bcbfde..8a384527 100644
--- a/share/newton_base/proxy/dnsaasdelegate.py
+++ b/share/newton_base/proxy/dnsaasdelegate.py
@@ -25,9 +25,9 @@ from rest_framework.views import APIView
from newton_base.proxy.services import Services
from newton_base.proxy.proxy_utils import ProxyUtils
-from newton.pub.exceptions import VimDriverNewtonException
-from newton.pub.msapi import extsys
-from newton.requests.views.util import VimDriverUtils
+from common.exceptions import VimDriverNewtonException
+from common.msapi import extsys
+from newton_base.util import VimDriverUtils
logger = logging.getLogger(__name__)
diff --git a/share/newton_base/proxy/identityV3.py b/share/newton_base/proxy/identityV3.py
index 0c45c23e..057bdf3e 100644
--- a/share/newton_base/proxy/identityV3.py
+++ b/share/newton_base/proxy/identityV3.py
@@ -24,8 +24,8 @@ from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
-from newton.pub.exceptions import VimDriverNewtonException
-from newton.requests.views.util import VimDriverUtils
+from common.exceptions import VimDriverNewtonException
+from newton_base.util import VimDriverUtils
from newton_base.proxy.proxy_utils import ProxyUtils
logger = logging.getLogger(__name__)
@@ -90,9 +90,10 @@ class Tokens(APIView):
# prepare request resource to vim instance
vim = VimDriverUtils.get_vim_info(vimid)
- sess = VimDriverUtils.get_session(vim, tenantname = tenant_name, tenantid=tenant_id)
+ sess = VimDriverUtils.get_session(vim, tenant_name = tenant_name, tenant_id=tenant_id)
- tmp_auth_state = VimDriverUtils.get_auth_state(vim, sess)
+ #tmp_auth_state = VimDriverUtils.get_auth_state(vim, sess)
+ tmp_auth_state = VimDriverUtils.get_auth_state(sess)
tmp_auth_info = json.loads(tmp_auth_state)
tmp_auth_token = tmp_auth_info['auth_token']
tmp_auth_data = tmp_auth_info['body']
@@ -104,8 +105,8 @@ class Tokens(APIView):
tmp_auth_data['token']['catalog'], tmp_metadata_catalog = ProxyUtils.update_catalog(
vimid, tmp_auth_data['token']['catalog'], self.proxy_prefix)
- tmp_auth_token = VimDriverUtils.update_token_cache(
- vim, sess, tmp_auth_token, tmp_auth_state, json.dumps(tmp_metadata_catalog))
+ VimDriverUtils.update_token_cache(
+ tmp_auth_token, tmp_auth_state, json.dumps(tmp_metadata_catalog))
tmp_auth_data['token']['catalog'] = ProxyUtils.update_catalog_dnsaas(
vimid,tmp_auth_data['token']['catalog'], self.proxy_prefix, vim)
diff --git a/share/newton_base/proxy/proxy_utils.py b/share/newton_base/proxy/proxy_utils.py
index 79be4221..bad5b60f 100644
--- a/share/newton_base/proxy/proxy_utils.py
+++ b/share/newton_base/proxy/proxy_utils.py
@@ -19,7 +19,7 @@ import uuid
from rest_framework import status
-from newton.pub.exceptions import VimDriverNewtonException
+from common.exceptions import VimDriverNewtonException
logger = logging.getLogger(__name__)
diff --git a/share/newton_base/proxy/services.py b/share/newton_base/proxy/services.py
index e40b58ec..fb0cf60a 100644
--- a/share/newton_base/proxy/services.py
+++ b/share/newton_base/proxy/services.py
@@ -23,9 +23,9 @@ from rest_framework import status
from rest_framework.views import APIView
from newton_base.proxy.proxy_utils import ProxyUtils
-from newton.pub.exceptions import VimDriverNewtonException
-from newton.pub.msapi import extsys
-from newton.requests.views.util import VimDriverUtils
+from common.exceptions import VimDriverNewtonException
+from common.msapi import extsys
+from newton_base.util import VimDriverUtils
logger = logging.getLogger(__name__)