diff options
author | Merkel, Jeff <jeff.merkel@att.com> | 2019-08-27 13:26:30 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-08-29 15:38:49 -0400 |
commit | c60db692b4fdf36bb89a7470a4c0f98b46e4ab46 (patch) | |
tree | 8026a08530620b702cd69fb541b4cb4c46ee55ad /asdc-controller/src | |
parent | 130be60e9b0244174cefed4353d1fb59c46c95e2 (diff) |
- Make association from the cvnfc to the fabric
- Make association from the cvnfc to the fabric config.
Issue-ID: SO-2262
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I8d9c1e5b738ec36fb3c6d9bae4acfef155b0e058
Diffstat (limited to 'asdc-controller/src')
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java | 39 |
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 08aee1ab4e..8894df044b 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 @@ -2154,6 +2154,7 @@ public class ToscaResourceInstaller { cvnfcCustomization.setNfcNamingCode(getLeafPropertyValue(cvfcEntity, "nfc_naming_code")); cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization); + // ***************************************************************************************************************************************** // * Extract Fabric Configuration // ***************************************************************************************************************************************** @@ -2162,31 +2163,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); |