From 4d7952a6082d3bad5c5a931c491b94fa563b44a6 Mon Sep 17 00:00:00 2001 From: Ritu Sood Date: Wed, 23 May 2018 07:18:45 -0700 Subject: Fix matching issues for attribute block For cloud inventory type empty strings in the attribute block of the demand are being matched Issue-ID: OPTFRA-244 Change-Id: I0ac3a256f32ba497d9f74ddb8ca873604ca67773 Signed-off-by: Ritu Sood --- conductor/conductor/data/plugins/inventory_provider/aai.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'conductor') diff --git a/conductor/conductor/data/plugins/inventory_provider/aai.py b/conductor/conductor/data/plugins/inventory_provider/aai.py index b556ef7..4a9748d 100644 --- a/conductor/conductor/data/plugins/inventory_provider/aai.py +++ b/conductor/conductor/data/plugins/inventory_provider/aai.py @@ -741,6 +741,9 @@ class AAI(base.InventoryProviderBase): attribute_key == 'model-version-id'): continue + if not attribute_values: + continue + match_type = 'any' if type(attribute_values) is dict: if 'any' in attribute_values: -- cgit 1.2.3-korg