diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-05-14 14:47:41 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-05-14 15:05:57 +0800 |
commit | 78f29beb1a5fe2a35ea0143f5cc7a6aa2e665323 (patch) | |
tree | 909b5b431bb04ea104fccd21249bd3a7787c7338 | |
parent | 5c8214c8e18d5addeb29bd938b22c214dae064c6 (diff) |
Fix dpdk discovery
Fix dpdk discovery
Change-Id: Ibc089150800fda9638e567ef0c3d35828a689790
Issue-ID: MULTICLOUD-228
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r-- | vio/vio/pub/utils/restcall.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vio/vio/pub/utils/restcall.py b/vio/vio/pub/utils/restcall.py index 0f8b6f3..41b7897 100644 --- a/vio/vio/pub/utils/restcall.py +++ b/vio/vio/pub/utils/restcall.py @@ -744,7 +744,14 @@ class AAIClient(object): if not self._vim_info: self._vim_info = self.get_vim(get_all=True) - cloud_extra_info_str = self._vim_info.get('cloud_extra_info') + cloud_extra_info_str = self._vim_info.get('cloud-extra-info') + if not isinstance(cloud_extra_info_str, dict): + try: + cloud_extra_info_str = json.loads(cloud_extra_info_str) + except Exception as ex: + logger.error("Can not convert cloud extra info %s %s" % ( + str(ex), cloud_extra_info_str)) + return {} if cloud_extra_info_str: cloud_dpdk_info = cloud_extra_info_str.get("ovsDpdk") if cloud_dpdk_info: |