Fix matching issues for attribute block 19/48619/1 v1.1.1
authorRitu Sood <ritu.sood@intel.com>
Wed, 23 May 2018 14:18:45 +0000 (07:18 -0700)
committerRitu Sood <ritu.sood@intel.com>
Wed, 23 May 2018 14:22:00 +0000 (07:22 -0700)
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 <ritu.sood@intel.com>
conductor/conductor/data/plugins/inventory_provider/aai.py

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