X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=kubernetes%2Fpomba%2Fcharts%2Fpomba-validation-service%2Fresources%2Fbundleconfig%2Fetc%2Frules%2Fpoa-event%2Fdefault-rules.groovy;h=4a7f30452f5d3cf45361594c5442acc1d47034ea;hb=c1b40a1f0739d127189dacc160e53e74ae7ae6c4;hp=95206cf984911059246edb37c904ed814615eb5b;hpb=8cc3cc09f296c7290ad64d8d4ff3c7627aaa8df2;p=oom.git diff --git a/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy b/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy index 95206cf984..4a7f30452f 100644 --- a/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy +++ b/kubernetes/pomba/charts/pomba-validation-service/resources/bundleconfig/etc/rules/poa-event/default-rules.groovy @@ -76,6 +76,12 @@ entity { name 'Attribute-comparison' attributes 'context-list.ndcb.vnfList[*].vfModuleList[*].vmList[*]', 'context-list.aai.vnfList[*].vfModuleList[*].vmList[*]' } + + // NDCB-AAI comparison: P-Interface list + useRule { + name 'Attribute-comparison' + attributes 'context-list.ndcb.pnfList[*].pInterfaceList[*]', 'context-list.aai.pnfList[*].pInterfaceList[*]' + } // SDNC-AAI comparison: Context level @@ -212,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'