From f395664a388230be26918e32f4e1beb1b38acb7a Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Sun, 27 May 2018 09:21:36 -0700 Subject: 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 --- conductor/conductor/data/plugins/inventory_provider/aai.py | 2 ++ 1 file changed, 2 insertions(+) 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" -- cgit 1.2.3-korg