diff options
author | Bin Yang <bin.yang@windriver.com> | 2018-12-25 10:42:52 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2018-12-25 10:42:52 +0000 |
commit | e628d07247f788d20c06e8d310070a5bc66917f7 (patch) | |
tree | 0efc08d1181bd26b268190c36e06ba50fa146ea2 /share/common/msapi | |
parent | 7994c7757b13e052bffc2c3774b70f0a5ad7da79 (diff) |
Refactor the AAI cache for multicloud plugin3.0.1-ONAP1.2.3
Fix the cache issue of cloud region which result in failure of
cloud region registration
Change-Id: Id13a40124efb92bd818686e069c9335ecd0d07c1
Issue-ID: MULTICLOUD-431
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'share/common/msapi')
-rw-r--r-- | share/common/msapi/extsys.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/share/common/msapi/extsys.py b/share/common/msapi/extsys.py index 9b65072e..88118aa8 100644 --- a/share/common/msapi/extsys.py +++ b/share/common/msapi/extsys.py @@ -12,7 +12,6 @@ import json import logging import re -from django.core.cache import cache from common.exceptions import VimDriverNewtonException from common.utils import restcall @@ -22,13 +21,6 @@ logger = logging.getLogger(__name__) def get_vim_by_id(vim_id): - - # try to load from cache - cachedviminfostr = cache.get("VIMINFOCACHE_"+vim_id) - if cachedviminfostr: - viminfo = json.loads(cachedviminfostr) - return viminfo - cloud_owner,cloud_region_id = decode_vim_id(vim_id) if cloud_owner and cloud_region_id: @@ -81,8 +73,6 @@ def get_vim_by_id(vim_id): viminfo['openstack_region_id'] = tmp_viminfo.get("cloud-epa-caps") \ if tmp_viminfo.get("cloud-epa-caps") else cloud_region_id - # cache the viminfo for 24 hour - cache.set("VIMINFOCACHE_"+vim_id, json.dumps(viminfo), 3600*24) return viminfo return None |