Fix default value for plugin metadata 93/17193/1
authorFedor Zhadaev <fzhadaev@mirantis.com>
Wed, 20 Jul 2016 05:46:42 +0000 (08:46 +0300)
committerFedor Zhadaev <fzhadaev@mirantis.com>
Wed, 20 Jul 2016 05:46:42 +0000 (08:46 +0300)
Fix typo which result in error while getting default metadata
in case if it's not overridden in scenario.

Fixes https://jira.opnfv.org/browse/FUEL-151

Change-Id: Ibf40f846919155e27da5dc1f778f72afee79ff12
Signed-off-by: Fedor Zhadaev <fzhadaev@mirantis.com>
deploy/deploy-config.py

index 65d51b2..226e3d5 100644 (file)
@@ -101,13 +101,10 @@ def merge_fuel_plugin_version_list(list1, list2):
     # When the plugin version in not there in list1 it will
     # not be copied
     for e_l1 in list1:
-        plugin_version = e_l1.get('metadata',
-                                  {'plugin_version', None}).get('plugin_version')
+        plugin_version = e_l1.get('metadata', {}).get('plugin_version')
         plugin_version_found = False
         for e_l2 in list2:
-            if plugin_version == e_l2.get('metadata',
-                                          {'plugin_version',
-                                           None}).get('plugin_version'):
+            if plugin_version == e_l2.get('metadata', {}).get('plugin_version'):
                 final_list.append(dict(mergedicts(e_l1, e_l2)))
                 plugin_version_found = True
         if not plugin_version_found: