diff options
Diffstat (limited to 'ocata')
-rw-r--r-- | ocata/ocata/registration/tests/test_registration.py | 2 | ||||
-rw-r--r-- | ocata/ocata/registration/views/registration.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ocata/ocata/registration/tests/test_registration.py b/ocata/ocata/registration/tests/test_registration.py index 0d1cfab0..9087a792 100644 --- a/ocata/ocata/registration/tests/test_registration.py +++ b/ocata/ocata/registration/tests/test_registration.py @@ -41,7 +41,7 @@ OCATA_MOCK_VIM_INFO = { "version": "v1", "arch": "Intel64", "libname":"dataProcessingAccelerationLibrary", - "libvalue":"v12.1", + "libversion":"v12.1", } }, 'insecure': 'True' diff --git a/ocata/ocata/registration/views/registration.py b/ocata/ocata/registration/views/registration.py index 4d954cb1..bb898995 100644 --- a/ocata/ocata/registration/views/registration.py +++ b/ocata/ocata/registration/views/registration.py @@ -318,6 +318,13 @@ class Registry(newton_registration.Registry): feature_uuid = uuid.uuid4() cloud_extra_info_str = viminfo.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 : |