diff options
author | Steve Smokowski <ss835w@att.com> | 2019-03-22 16:31:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-22 16:31:24 +0000 |
commit | 7c0489bd1585b1a3fb97248397eccd72ee644e82 (patch) | |
tree | 89ddd9aaa1aaaa05810d18a8a249214a0e29b795 /adapters/mso-openstack-adapters/src/main/java/org | |
parent | 314bba3a72c1b1122668950005a2e754f8c5c5cc (diff) | |
parent | eea8c1d2c9a830b20aacbacf9bbd0e36f664ee0f (diff) |
Merge "Multicloud VNF adapter use updated multicloud API"
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org')
3 files changed, 21 insertions, 15 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index 8053cd6f9e..2e8c7990db 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -537,6 +537,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { "CloudOwner", tenantId, networkName, + null, template, stackParams, true, diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java index f6442b6252..b418368170 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java @@ -33,25 +33,29 @@ import org.springframework.stereotype.Component; @Component public class VfModuleCustomizationToVduMapper { - + public VduModelInfo mapVfModuleCustomizationToVdu(VfModuleCustomization vfModuleCustom) - { + { VduModelInfo vduModel = new VduModelInfo(); vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUUID()); - + vduModel.setModelUUID(vfModuleCustom.getVfModule().getModelUUID()); + vduModel.setModelInvariantUUID(vfModuleCustom.getVfModule().getModelInvariantUUID()); + // Map the cloud templates, attached files, and environment file mapCloudTemplates(vfModuleCustom.getVfModule().getModuleHeatTemplate(), vduModel); mapCloudFiles(vfModuleCustom,vduModel); mapEnvironment(vfModuleCustom.getHeatEnvironment(), vduModel); - + return vduModel; } - + public VduModelInfo mapVfModuleCustVolumeToVdu(VfModuleCustomization vfModuleCustom) - { + { VduModelInfo vduModel = new VduModelInfo(); vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUUID()); - + vduModel.setModelUUID(vfModuleCustom.getVfModule().getModelUUID()); + vduModel.setModelInvariantUUID(vfModuleCustom.getVfModule().getModelInvariantUUID()); + // Map the cloud templates, attached files, and environment file mapCloudTemplates(vfModuleCustom.getVfModule().getVolumeHeatTemplate(), vduModel); mapCloudFiles(vfModuleCustom,vduModel); @@ -62,20 +66,20 @@ public class VfModuleCustomizationToVduMapper { private void mapCloudTemplates(HeatTemplate heatTemplate, VduModelInfo vduModel) { // TODO: These catalog objects will be refactored to be non-Heat-specific - + List<VduArtifact> vduArtifacts = vduModel.getArtifacts(); - + // Main template. Also set the VDU timeout based on the main template. vduArtifacts.add(mapHeatTemplateToVduArtifact(heatTemplate, ArtifactType.MAIN_TEMPLATE)); vduModel.setTimeoutMinutes(heatTemplate.getTimeoutMinutes()); - + // Nested templates List<HeatTemplate> childTemplates = heatTemplate.getChildTemplates(); if (childTemplates != null) { for(HeatTemplate childTemplate : childTemplates){ vduArtifacts.add(mapHeatTemplateToVduArtifact(childTemplate, ArtifactType.NESTED_TEMPLATE)); } - } + } } private VduArtifact mapHeatTemplateToVduArtifact(HeatTemplate heatTemplate, ArtifactType artifactType) { @@ -85,12 +89,12 @@ public class VfModuleCustomizationToVduMapper { vduArtifact.setType(artifactType); return vduArtifact; } - + private void mapCloudFiles(VfModuleCustomization vfModuleCustom, VduModelInfo vduModel) { // TODO: These catalog objects will be refactored to be non-Heat-specific - + List<VduArtifact> vduArtifacts = vduModel.getArtifacts(); - + // Attached Files List<HeatFiles> heatFiles = vfModuleCustom.getVfModule().getHeatFiles(); if (heatFiles != null) { @@ -115,7 +119,7 @@ public class VfModuleCustomizationToVduMapper { vduArtifacts.add(mapEnvironmentFileToVduArtifact(heatEnvironment)); } } - + private VduArtifact mapEnvironmentFileToVduArtifact(HeatEnvironment heatEnv) { VduArtifact vduArtifact = new VduArtifact(); vduArtifact.setName(heatEnv.getName()); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java index 0563d6c242..3913d7f758 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java @@ -1206,6 +1206,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { cloudOwner, tenantId, vfModuleName, + null, template, goldenInputs, true, |