From 78f29beb1a5fe2a35ea0143f5cc7a6aa2e665323 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Mon, 14 May 2018 14:47:41 +0800 Subject: Fix dpdk discovery Fix dpdk discovery Change-Id: Ibc089150800fda9638e567ef0c3d35828a689790 Issue-ID: MULTICLOUD-228 Signed-off-by: Ethan Lynn --- vio/vio/pub/utils/restcall.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: -- cgit 1.2.3-korg