summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java/org
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-19 17:51:14 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-19 17:51:31 -0500
commit66ec6f8f0513e7b16da8de18a88817fb945084f9 (patch)
treeaa3c22c5241d4d99faa597fe893a96cda9e98bf5 /asdc-controller/src/main/java/org
parentfb37bbac02e3e404e61fbae88c17d91a8172d874 (diff)
Update to set correct cvnfc code
- Update testcase naming code to oamfw for testCvnfc. - Update to set correct cvnfc nfc_function and nfc_naming_code Change-Id: I13eca10d4d76a24753eca99e3f6ff96d0cc408f4 Issue-ID: SO-1532 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'asdc-controller/src/main/java/org')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java28
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java23
2 files changed, 39 insertions, 12 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index f8d9d6c96c..d13fff4801 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -1481,8 +1481,8 @@ public class ToscaResourceInstaller {
cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
}
- cvnfcCustomization.setNfcFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vfTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION));
- cvnfcCustomization.setNfcNamingCode(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vfTemplate, "nf_naming_code"));
+ cvnfcCustomization.setNfcFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_function"));
+ cvnfcCustomization.setNfcNamingCode(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_naming_code"));
cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
cvnfcCustomization.setVnfResourceCustomization(vnfResource);
@@ -1510,7 +1510,7 @@ public class ToscaResourceInstaller {
}
VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = createVfCnvfConfigCustomization(fabricTemplate, toscaResourceStructure,
- vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig, vfTemplate);
+ vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig, vfTemplate, vfModuleMemberName);
vnfVfmoduleCvnfcConfigurationCustomizations.add(vnfVfmoduleCvnfcConfigurationCustomization);
}
@@ -1531,7 +1531,7 @@ public class ToscaResourceInstaller {
protected VnfVfmoduleCvnfcConfigurationCustomization createVfCnvfConfigCustomization(NodeTemplate fabricTemplate, ToscaResourceStructure toscaResourceStruct,
VnfResourceCustomization vnfResource, VfModuleCustomization vfModuleCustomization, CvnfcCustomization cvnfcCustomization,
- ConfigurationResource configResource, NodeTemplate vfTemplate) {
+ ConfigurationResource configResource, NodeTemplate vfTemplate, String vfModuleMemberName) {
Metadata fabricMetadata = fabricTemplate.getMetaData();
@@ -1550,14 +1550,20 @@ public class ToscaResourceInstaller {
if(policyList != null){
for(Policy policy : policyList){
- Map<String, Object> propMap = policy.getPolicyProperties();
+ for(String policyCvfcTarget : policy.getTargets()){
+
+ if(policyCvfcTarget.equalsIgnoreCase(vfModuleMemberName)){
+
+ Map<String, Object> propMap = policy.getPolicyProperties();
- if(propMap.get("type").toString().equalsIgnoreCase("Fabric Policy")){
- vfModuleToCvnfc.setPolicyName(propMap.get("name").toString());
- }
- }
- }
-
+ if(propMap.get("type").toString().equalsIgnoreCase("Fabric Policy")){
+ vfModuleToCvnfc.setPolicyName(propMap.get("name").toString());
+ }
+ }
+ }
+ }
+ }
+
vfModuleToCvnfc.setConfigurationFunction(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "function"));
vfModuleToCvnfc.setConfigurationRole(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "role"));
vfModuleToCvnfc.setConfigurationType(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "type"));
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
index f886ce7a3e..de28ca2446 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
@@ -35,6 +35,7 @@ import org.onap.sdc.toscaparser.api.NodeTemplate;
import org.onap.sdc.toscaparser.api.elements.Metadata;
import org.onap.so.asdc.installer.IVfModuleData;
import org.onap.so.asdc.installer.ToscaResourceStructure;
+import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
public class ASDCNotificationLogging {
@@ -426,7 +427,27 @@ public class ASDCNotificationLogging {
buffer.append(System.lineSeparator());
buffer.append("Description:");
buffer.append(testNull(vlNode.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
- buffer.append(System.lineSeparator());
+ buffer.append(System.lineSeparator());
+
+
+ buffer.append(System.lineSeparator());
+ buffer.append("NETWORK Customization Properties:");
+ buffer.append(System.lineSeparator());
+ buffer.append("CustomizationUUID:");
+ buffer.append(vlNode.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ buffer.append(System.lineSeparator());
+ buffer.append("Network Technology:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vlNode, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY));
+ buffer.append(System.lineSeparator());
+ buffer.append("Network Type:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vlNode, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE));
+ buffer.append(System.lineSeparator());
+ buffer.append("Network Role:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vlNode, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE));
+ buffer.append(System.lineSeparator());
+ buffer.append("Network Scope:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vlNode, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE));
+ buffer.append(System.lineSeparator());
}