aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-08-30 12:21:15 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-30 12:21:15 +0000
commit6a53a568abadf59dac64fc832741259563c0b572 (patch)
tree9e082eebdffad0acc5e5f877e71c5c3a12f7a4e9 /asdc-controller/src/main/java
parentd2e4461afce4673244388f36977f02d0b4414b1f (diff)
parentc60db692b4fdf36bb89a7470a4c0f98b46e4ab46 (diff)
Merge "- Make association from the cvnfc to the fabric"
Diffstat (limited to 'asdc-controller/src/main/java')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java39
1 files changed, 24 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 9d07670d0b..da989b0155 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
@@ -2153,6 +2153,7 @@ public class ToscaResourceInstaller {
cvnfcCustomization.setNfcNamingCode(getLeafPropertyValue(cvfcEntity, "nfc_naming_code"));
cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
+
// *****************************************************************************************************************************************
// * Extract Fabric Configuration
// *****************************************************************************************************************************************
@@ -2161,31 +2162,39 @@ public class ToscaResourceInstaller {
getEntityDetails(toscaResourceStructure, EntityQuery.newBuilder(SdcTypes.CONFIGURATION),
TopologyTemplateQuery.newBuilder(SdcTypes.VF), false);
-
for (IEntityDetails fabricEntity : fabricEntityList) {
- ConfigurationResource fabricConfig = null;
+ Map<String, RequirementAssignment> requirements = fabricEntity.getRequirements();
+
+ for (RequirementAssignment requirement : requirements.values()) {
+
+ if (requirement.getNodeTemplateName().equals(cvfcEntity.getName())) {
+
+ ConfigurationResource fabricConfig = null;
- ConfigurationResource existingConfig =
- findExistingConfiguration(existingCvnfcConfigurationCustom,
+ ConfigurationResource existingConfig = findExistingConfiguration(
+ existingCvnfcConfigurationCustom,
fabricEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
- if (existingConfig == null) {
+ if (existingConfig == null) {
- fabricConfig = createFabricConfiguration(fabricEntity, toscaResourceStructure);
+ fabricConfig = createFabricConfiguration(fabricEntity, toscaResourceStructure);
- } else {
- fabricConfig = existingConfig;
- }
+ } else {
+ fabricConfig = existingConfig;
+ }
+
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization =
+ createCvnfcConfigurationCustomization(fabricEntity, toscaResourceStructure,
+ vnfResource, vfModuleCustomization, cvnfcCustomization,
+ fabricConfig, vfModuleMemberName);
- CvnfcConfigurationCustomization cvnfcConfigurationCustomization =
- createCvnfcConfigurationCustomization(fabricEntity, toscaResourceStructure,
- vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig,
- vfModuleMemberName);
+ cvnfcConfigurationCustomizations.add(cvnfcConfigurationCustomization);
- cvnfcConfigurationCustomizations.add(cvnfcConfigurationCustomization);
+ existingCvnfcConfigurationCustom.add(cvnfcConfigurationCustomization);
- existingCvnfcConfigurationCustom.add(cvnfcConfigurationCustomization);
+ }
+ }
}
cvnfcCustomization.setCvnfcConfigurationCustomization(cvnfcConfigurationCustomizations);