Fix data error 87/49287/1
authorDileep Ranganathan <dileep.ranganathan@intel.com>
Sun, 27 May 2018 16:21:36 +0000 (09:21 -0700)
committerDileep Ranganathan <dileep.ranganathan@intel.com>
Sun, 27 May 2018 16:24:34 +0000 (09:24 -0700)
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>
conductor/conductor/data/plugins/inventory_provider/aai.py

index 4a9748d..d23a483 100644 (file)
@@ -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"