aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-20 16:19:39 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-21 13:29:05 -0400
commite8689688629582187b2484eda21524ee70abbb9f (patch)
tree49ee8dc72349a4929dc2bfd45bc6ef203f1d1e88 /asdc-controller/src/main
parent353782a4d50f3764f71916385dc062401aa7456d (diff)
Corrected hibernate for cfvc customization table
fix two tests that did not ignore some properties fix schema sql file that was missing fields Properly wire hibernate entities, clean up db tables Update schema.sql files to be consistent add junit for customization linked to same cvnfc Change-Id: I4bc0a83cb3908f5b34224416e75446b6cd166b9e Issue-ID: SO-1689 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'asdc-controller/src/main')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java19
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java59
2 files changed, 63 insertions, 15 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 ef0b4921e4..5af427a81a 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
@@ -1487,8 +1487,6 @@ public class ToscaResourceInstaller {
List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfTemplate, SdcTypes.CVFC);
for(NodeTemplate cvfcTemplate : cvfcList) {
-
- CvnfcCustomization existingCvnfcCustomization = findExistingCvfc(existingCvnfcSet, cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
if(vfModuleMemberName != null && vfModuleMemberName.equalsIgnoreCase(cvfcTemplate.getName())){
@@ -1529,13 +1527,8 @@ public class ToscaResourceInstaller {
// This check is needed incase the VFC subcategory is something other than Abstract. In that case we want to skip adding that record to our DB.
if(vnfcCustomization.getModelCustomizationUUID() != null){
- CvnfcCustomization cvnfcCustomization = null;
-
- if(existingCvnfcCustomization != null){
- cvnfcCustomization = existingCvnfcCustomization;
- }
- else{
-
+ CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
+
cvnfcCustomization = new CvnfcCustomization();
cvnfcCustomization.setModelCustomizationUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
cvnfcCustomization.setModelInstanceName(cvfcTemplate.getName());
@@ -1562,7 +1555,6 @@ public class ToscaResourceInstaller {
cvnfcCustomizations.add(cvnfcCustomization);
existingCvnfcSet.add(cvnfcCustomization);
- }
//*****************************************************************************************************************************************
//* Extract Fabric Configuration
@@ -1586,18 +1578,15 @@ public class ToscaResourceInstaller {
VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = createVfCnvfConfigCustomization(fabricTemplate, toscaResourceStructure,
vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig, vfTemplate, vfModuleMemberName);
-
vnfVfmoduleCvnfcConfigurationCustomizations.add(vnfVfmoduleCvnfcConfigurationCustomization);
}
-
+ cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizations);
}
}
}
-
}
-
vfModuleCustomization.setCvnfcCustomization(cvnfcCustomizations);
vfModuleCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizations);
@@ -1609,7 +1598,7 @@ public class ToscaResourceInstaller {
ConfigurationResource configResource, NodeTemplate vfTemplate, String vfModuleMemberName) {
Metadata fabricMetadata = fabricTemplate.getMetaData();
-
+
VnfVfmoduleCvnfcConfigurationCustomization vfModuleToCvnfc = new VnfVfmoduleCvnfcConfigurationCustomization();
vfModuleToCvnfc.setConfigurationResource(configResource);
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 de28ca2446..0d75c56c58 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
@@ -323,9 +323,67 @@ public class ASDCNotificationLogging {
buffer.append(System.lineSeparator());
}
+ buffer.append(System.lineSeparator());
+ buffer.append("VF Module Customization Properties:");
+ buffer.append(System.lineSeparator());
+ buffer.append("Model Customization UUID:");
+ buffer.append(testNull(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, SdcPropertyNames.PROPERTY_NAME_VFMODULECUSTOMIZATIONUUID)));
+ buffer.append(System.lineSeparator());
}
+ List<NodeTemplate> vfConfigList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfNodeTemplate, SdcTypes.CONFIGURATION);
+
+ if(vfConfigList != null){
+ for (NodeTemplate configNodeTemplate : vfConfigList) {
+
+ buffer.append(System.lineSeparator());
+ buffer.append(System.lineSeparator());
+ buffer.append("Fabric Configuration Properties:");
+ buffer.append(System.lineSeparator());
+
+ buffer.append("Model Name:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+ buffer.append(System.lineSeparator());
+ buffer.append("Model UUID:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+ buffer.append(System.lineSeparator());
+ buffer.append("Description:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
+ buffer.append(System.lineSeparator());
+ buffer.append("Version:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
+ buffer.append(System.lineSeparator());
+ buffer.append("InvariantUuid:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ buffer.append(System.lineSeparator());
+ buffer.append("Tosca Node Type:");
+ buffer.append(configNodeTemplate.getType());
+
+ buffer.append(System.lineSeparator());
+ buffer.append(System.lineSeparator());
+ buffer.append("Fabric Configuration Customization Properties:");
+ buffer.append(System.lineSeparator());
+
+ buffer.append("Model Customization UUID:");
+ buffer.append(configNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ buffer.append(System.lineSeparator());
+ buffer.append("Model Instance Name:");
+ buffer.append(configNodeTemplate.getName());
+ buffer.append(System.lineSeparator());
+ buffer.append("NFFunction:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(configNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION));
+ buffer.append(System.lineSeparator());
+ buffer.append("NFRole:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(configNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE));
+ buffer.append(System.lineSeparator());
+ buffer.append("NFType:");
+ buffer.append(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(configNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE));
+ buffer.append(System.lineSeparator());
+
+ }
+ }
+
List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfNodeTemplate, SdcTypes.CVFC);
for(NodeTemplate cvfcTemplate : cvfcList) {
@@ -523,6 +581,7 @@ public class ASDCNotificationLogging {
buffer.append(System.lineSeparator());
}
+
List<Group> groupList = toscaResourceStructure.getSdcCsarHelper().getGroupsOfOriginOfNodeTemplateByToscaGroupType(crNode, "org.openecomp.groups.NetworkCollection");