summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2018-05-27 09:21:36 -0700
committerDileep Ranganathan <dileep.ranganathan@intel.com>2018-05-27 09:24:34 -0700
commitf395664a388230be26918e32f4e1beb1b38acb7a (patch)
tree7a91b71ad269a0bb9eac7fe32c7b8786e91b9559
parent66ecb946abbc86d698435d826a8591ac86f817d7 (diff)
Fix data error
Handle data error by discarding candidates with invalid data Discard candidates if the cloud-owner or region id is missing in the vserver associated with generic vnfs. This scenario can occur when invalid data is present in A&AI database. Issue-ID: OPTFRA-246 Change-Id: I1405267a8f3713c91e10da3d6fbd37c0ca3fc01f Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
-rw-r--r--conductor/conductor/data/plugins/inventory_provider/aai.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/conductor/conductor/data/plugins/inventory_provider/aai.py b/conductor/conductor/data/plugins/inventory_provider/aai.py
index 4a9748d..d23a483 100644
--- a/conductor/conductor/data/plugins/inventory_provider/aai.py
+++ b/conductor/conductor/data/plugins/inventory_provider/aai.py
@@ -1032,6 +1032,8 @@ class AAI(base.InventoryProviderBase):
cloud_owner = rl_data.get('d_value')
candidate['cloud_owner'] = cloud_owner
+ if not cloud_owner:
+ continue
search_key = "cloud-region.cloud-region-id"