From: Dileep Ranganathan Date: Sun, 27 May 2018 16:21:36 +0000 (-0700) Subject: Fix data error X-Git-Tag: 2.0.0-ONAP~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F49287%2F1;p=optf%2Fhas.git 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 --- 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"