Make POMBA able to detect dummy notifications 70/88470/2
authorburdziak <olaf.burdziakowski@nokia.com>
Fri, 24 May 2019 13:36:15 +0000 (15:36 +0200)
committerburdziak <olaf.burdziakowski@nokia.com>
Mon, 27 May 2019 09:43:29 +0000 (11:43 +0200)
Issue-ID: LOG-1056
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Change-Id: I8bb81cdad651261063fd9d92b3c3a6b8f9346bf6

kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy

index df75b31..4a7f304 100644 (file)
@@ -218,9 +218,27 @@ entity {
       name 'SDC-AAI-vf-module-instance-check'
       attributes 'context-list.sdc.vnfList[*].vfModuleList[*]', 'context-list.aai.vnfList[*].vfModuleList[*]'
     }
+
+    useRule {
+       name 'AAI-not-empty'
+       attributes 'context-list.aai.pnfList', 'context-list.aai.vnfList', 'context-list.aai.networkList'
+    }
   }
 }
 
+rule {
+    name        'AAI-not-empty'
+    category    'VNFC Consistency'
+    description 'Check if AAI collected anything'
+    errorText   'AAI section is empty'
+    severity    'ERROR'
+    attributes  'pnfList', 'vnfList', 'networkList'
+    validate    '''
+        // expect at least one not empty list
+        return !pnfList.isEmpty() || !vnfList.isEmpty() || !networkList.isEmpty()
+                '''
+}
+
 rule {
   name        'SDC-AAI-vnfc-type'
   category    'VNFC Consistency'