diff options
author | 2017-03-03 12:51:13 -0500 | |
---|---|---|
committer | 2017-03-03 12:57:20 -0500 | |
commit | 2e87b3421f826b345e4422524c312cc88e2e10d7 (patch) | |
tree | 56fcbf6dc45b5bb35dc86461fff7ca240de410a7 /packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt | |
parent | 828fb05f1efb4e022dd6dc6b9e5d3ac4136371e5 (diff) |
update hardcoded policies with latest template.
Change-Id: Ic57aae242f8a038527e3b4eeac98f3cf3f7f1b0b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt')
-rw-r--r-- | packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt index 42b67999f..102c293e9 100644 --- a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt +++ b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt @@ -25,6 +25,7 @@ package org.openecomp.policy.controlloop; +import java.util.List; import java.util.LinkedList; import java.util.Map; import java.util.HashMap; @@ -522,17 +523,45 @@ rule "BRMSParamvFWDemoPolicy.EVENT.MANAGER.AAINQF199RESPONSE" serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion; serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue; // + // Find the index for base vf module and non-base vf module + // + int baseIndex = -1; + int nonBaseIndex = -1; + List<AAINQF199InventoryResponseItem> inventoryItems = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems; + for (AAINQF199InventoryResponseItem m : inventoryItems) { + if (m.vfModule != null && m.vfModule.isBaseVfModule == true) { + baseIndex = inventoryItems.indexOf(m); + } else if (m.vfModule != null && m.vfModule.isBaseVfModule == false && m.vfModule.orchestrationStatus == null) { + nonBaseIndex = inventoryItems.indexOf(m); + } + // + if (baseIndex != -1 && nonBaseIndex != -1) { + break; + } + } + // + // Report the error if either base vf module or non-base vf module is not found + // + if (baseIndex == -1 || nonBaseIndex == -1) { + System.err.println("Either base or non-base vf module is not found from AAI response."); + retract($aainqf199RequestWrapper); + retract($aainqf199ResponseWrapper); + retract($manager); + retract($event); + return; + } + // // This comes from the base module // - vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName; + vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(baseIndex).vfModule.vfModuleName; vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace("Vfmodule", "vDNS"); // // vfModuleItem - NOT the base module // - vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId; - vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion; - vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue; - vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue; + vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.personaModelId; + vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).vfModule.personaModelVersion; + vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(0).propertyValue; + vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(nonBaseIndex).extraProperties.extraProperty.get(4).propertyValue; // // tenantItem // @@ -1105,8 +1134,8 @@ rule "Params" params.setAaiURL("null"); params.setMsoPassword("null"); params.setClosedLoopControlName("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8"); - params.setAaiUsername("null"); params.setMsoURL("null"); + params.setAaiUsername("null"); params.setActor("APPC"); params.setMsoUsername("null"); params.setAaiNamedQueryUUID("null"); |