aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorMarcus Williams <marcus.williams@intel.com>2018-09-17 19:01:22 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-17 19:01:22 +0000
commitd4c05d98beb4b8db51d876d34e3e0fae086647ea (patch)
treeeaee815b1a30f1fcf3ff7269e660e77270991ab0 /asdc-controller
parent52355663e2a14135f4fe86fe7c30dc93aa588f18 (diff)
parent08c27a288e961c1ffd4151384ef0f609bb855e10 (diff)
Merge "more stability fixes"
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java10
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java71
2 files changed, 64 insertions, 17 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 1fca9d3ff2..970cb0bf50 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
@@ -488,13 +488,11 @@ public class ToscaResourceInstaller {
.getSdcCsarHelper().getVfModulesByVf(vfCustomizationUUID);
IVfModuleData vfMetadata = vfModuleStructure.getVfModuleMetadata();
- logger.debug("Comparing VFModule Metadata CustomizationUUID : " + vfMetadata.getVfModuleModelCustomizationUUID());
- for(Group group : vfGroups){
- logger.debug("To Group VFModuleModelCustomizationUUID " + group.getMetadata().getValue("vfModuleModelCustomizationUUID"));
- }
+ logger.debug("Comparing VFModuleMetadata CustomizationUUID : " + vfMetadata.getVfModuleModelCustomizationUUID());
- Optional<org.onap.sdc.toscaparser.api.Group> matchingObject = vfGroups.stream().
- filter(group -> group.getMetadata().getValue("vfModuleModelCustomizationUUID").equals(vfMetadata.getVfModuleModelCustomizationUUID())).
+ Optional<org.onap.sdc.toscaparser.api.Group> matchingObject = vfGroups.stream()
+ .peek(group -> logger.debug("To Csar Group VFModuleModelCustomizationUUID " + group.getMetadata().getValue("vfModuleModelCustomizationUUID")))
+ .filter(group -> group.getMetadata().getValue("vfModuleModelCustomizationUUID").equals(vfMetadata.getVfModuleModelCustomizationUUID())).
findFirst();
if(matchingObject.isPresent()){
VfModuleCustomization vfModuleCustomization = createVFModuleResource(matchingObject.get(), nodeTemplate, toscaResourceStruct,
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 54977104ff..ab9c359b7f 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
@@ -201,11 +201,6 @@ public class ASDCNotificationLogging {
}
}
- buffer.append(System.lineSeparator());
- buffer.append(System.lineSeparator());
- buffer.append("VNF Level Properties:");
- buffer.append(System.lineSeparator());
-
List<NodeTemplate> vfNodeTemplatesList = toscaResourceStructure.getSdcCsarHelper().getServiceVfList();
for (NodeTemplate vfNodeTemplate : vfNodeTemplatesList) {
@@ -287,17 +282,16 @@ public class ASDCNotificationLogging {
}
-
-
- buffer.append(System.lineSeparator());
- buffer.append("VF Module Properties:");
- buffer.append(System.lineSeparator());
+
List<Group> vfGroups = toscaResourceStructure.getSdcCsarHelper().getVfModulesByVf(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)));
for(Group group : vfGroups){
Metadata vfMetadata = group.getMetadata();
+ buffer.append(System.lineSeparator());
+ buffer.append("VF Module Properties:");
+ buffer.append(System.lineSeparator());
buffer.append("ModelInvariantUuid:");
buffer.append(testNull(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELINVARIANTUUID)));
buffer.append(System.lineSeparator());
@@ -314,7 +308,62 @@ public class ASDCNotificationLogging {
buffer.append(testNull(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata, SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
buffer.append(System.lineSeparator());
}
-
+
+ List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfNodeTemplate, SdcTypes.CVFC);
+
+ for(NodeTemplate cvfcTemplate : cvfcList) {
+
+ buffer.append(System.lineSeparator());
+ buffer.append("CVNFC Properties:");
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelCustomizationUuid:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelInvariantUuid:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelName:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelUuid:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelVersion:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
+ buffer.append(System.lineSeparator());
+ buffer.append("Description:");
+ buffer.append(testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+ buffer.append(System.lineSeparator());
+
+
+ List<NodeTemplate> vfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(cvfcTemplate, SdcTypes.VFC);
+
+ for(NodeTemplate vfcTemplate : vfcList) {
+ buffer.append(System.lineSeparator());
+ buffer.append("VNFC Properties:");
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelCustomizationUuid:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelInvariantUuid:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelName:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelUuid:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)));
+ buffer.append(System.lineSeparator());
+ buffer.append("ModelVersion:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
+ buffer.append(System.lineSeparator());
+ buffer.append("Description:");
+ buffer.append(testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+ buffer.append(System.lineSeparator());
+
+ }
+
+ }
}