diff options
author | Huang Haibin <haibin.huang@intel.com> | 2018-02-28 03:44:35 +0800 |
---|---|---|
committer | Huang Haibin <haibin.huang@intel.com> | 2018-03-01 02:39:05 +0800 |
commit | b14e1359642e17daf769ca39fa01e644135191f0 (patch) | |
tree | f29fcbd5c81df64eac4796bdd0c0423d460ebe17 /share/newton_base | |
parent | b99c0d415f37ca26443514d43f3cc1975185bf74 (diff) |
Move extsys from newton to common
Change-Id: I30ad2ed3a43bcb0ef569bb25d3e51a9ab49ea48a
Issue-ID: MULTICLOUD-138
Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'share/newton_base')
-rw-r--r-- | share/newton_base/extensions/epacaps.py | 6 | ||||
-rw-r--r-- | share/newton_base/extensions/extensions.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/flavor.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/hosts.py | 4 | ||||
-rw-r--r-- | share/newton_base/openoapi/image.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/limits.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/network.py | 4 | ||||
-rw-r--r-- | share/newton_base/openoapi/server.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/subnet.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/tenants.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/volume.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/vport.py | 2 | ||||
-rw-r--r-- | share/newton_base/proxy/dnsaasdelegate.py | 6 | ||||
-rw-r--r-- | share/newton_base/proxy/identityV3.py | 13 | ||||
-rw-r--r-- | share/newton_base/proxy/proxy_utils.py | 2 | ||||
-rw-r--r-- | share/newton_base/proxy/services.py | 6 | ||||
-rw-r--r-- | share/newton_base/registration/registration.py | 11 | ||||
-rw-r--r-- | share/newton_base/swagger/__init__.py | 2 | ||||
-rw-r--r-- | share/newton_base/swagger/views.py | 2 | ||||
-rw-r--r-- | share/newton_base/util.py | 4 |
20 files changed, 41 insertions, 41 deletions
diff --git a/share/newton_base/extensions/epacaps.py b/share/newton_base/extensions/epacaps.py index d8878e2c..cc5420e5 100644 --- a/share/newton_base/extensions/epacaps.py +++ b/share/newton_base/extensions/epacaps.py @@ -21,9 +21,9 @@ 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 newton.pub.msapi import extsys +from common.exceptions import VimDriverNewtonException +from newton_base.util import VimDriverUtils +from common.msapi import extsys logger = logging.getLogger(__name__) diff --git a/share/newton_base/extensions/extensions.py b/share/newton_base/extensions/extensions.py index fb6455b1..6b3ecb57 100644 --- a/share/newton_base/extensions/extensions.py +++ b/share/newton_base/extensions/extensions.py @@ -24,9 +24,9 @@ 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 newton.pub.msapi import extsys +from common.exceptions import VimDriverNewtonException +from newton_base.util import VimDriverUtils +from common.msapi import extsys logger = logging.getLogger(__name__) diff --git a/share/newton_base/openoapi/flavor.py b/share/newton_base/openoapi/flavor.py index 27bbb821..d50b1941 100644 --- a/share/newton_base/openoapi/flavor.py +++ b/share/newton_base/openoapi/flavor.py @@ -20,7 +20,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils logger = logging.getLogger(__name__) diff --git a/share/newton_base/openoapi/hosts.py b/share/newton_base/openoapi/hosts.py index 720ba8e2..60debf54 100644 --- a/share/newton_base/openoapi/hosts.py +++ b/share/newton_base/openoapi/hosts.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/image.py b/share/newton_base/openoapi/image.py index 9ddb5f55..965b2c3f 100644 --- a/share/newton_base/openoapi/image.py +++ b/share/newton_base/openoapi/image.py @@ -21,7 +21,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/limits.py b/share/newton_base/openoapi/limits.py index 3f62afa3..3302fdba 100644 --- a/share/newton_base/openoapi/limits.py +++ b/share/newton_base/openoapi/limits.py @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/network.py b/share/newton_base/openoapi/network.py index a1ac550d..253ac89f 100644 --- a/share/newton_base/openoapi/network.py +++ b/share/newton_base/openoapi/network.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/server.py b/share/newton_base/openoapi/server.py index c53e43e8..95eab2bf 100644 --- a/share/newton_base/openoapi/server.py +++ b/share/newton_base/openoapi/server.py @@ -22,7 +22,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils logger = logging.getLogger(__name__) diff --git a/share/newton_base/openoapi/subnet.py b/share/newton_base/openoapi/subnet.py index 1310ab50..a9b423ac 100644 --- a/share/newton_base/openoapi/subnet.py +++ b/share/newton_base/openoapi/subnet.py @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/tenants.py b/share/newton_base/openoapi/tenants.py index bcd8f2f2..926f72c5 100644 --- a/share/newton_base/openoapi/tenants.py +++ b/share/newton_base/openoapi/tenants.py @@ -20,7 +20,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils logger = logging.getLogger(__name__) diff --git a/share/newton_base/openoapi/volume.py b/share/newton_base/openoapi/volume.py index a048dda4..27bd1ef7 100644 --- a/share/newton_base/openoapi/volume.py +++ b/share/newton_base/openoapi/volume.py @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils diff --git a/share/newton_base/openoapi/vport.py b/share/newton_base/openoapi/vport.py index 8f9b0d62..9656b5c0 100644 --- a/share/newton_base/openoapi/vport.py +++ b/share/newton_base/openoapi/vport.py @@ -19,7 +19,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException from newton_base.util import VimDriverUtils 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__) diff --git a/share/newton_base/registration/registration.py b/share/newton_base/registration/registration.py index d9ce713d..e5a84501 100644 --- a/share/newton_base/registration/registration.py +++ b/share/newton_base/registration/registration.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,11 +21,10 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.config import config -from newton.pub.exceptions import VimDriverNewtonException -from newton.pub.msapi import extsys -from newton.pub.utils import restcall -from newton.requests.views.util import VimDriverUtils +from common.exceptions import VimDriverNewtonException +from common.msapi import extsys +from common.utils import restcall +from newton_base.util import VimDriverUtils logger = logging.getLogger(__name__) diff --git a/share/newton_base/swagger/__init__.py b/share/newton_base/swagger/__init__.py index 802f3fba..387c54c2 100644 --- a/share/newton_base/swagger/__init__.py +++ b/share/newton_base/swagger/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/share/newton_base/swagger/views.py b/share/newton_base/swagger/views.py index 10f3c0cc..839abea2 100644 --- a/share/newton_base/swagger/views.py +++ b/share/newton_base/swagger/views.py @@ -18,7 +18,7 @@ from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView -from newton.pub.exceptions import VimDriverNewtonException +from common.exceptions import VimDriverNewtonException logger = logging.getLogger(__name__) diff --git a/share/newton_base/util.py b/share/newton_base/util.py index d2363252..c708e850 100644 --- a/share/newton_base/util.py +++ b/share/newton_base/util.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ from keystoneauth1.identity import v2 as keystone_v2 from keystoneauth1.identity import v3 as keystone_v3 from keystoneauth1 import session -from newton.pub.msapi import extsys +from common.msapi import extsys logger = logging.getLogger(__name__) |