aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2019-03-21 20:32:55 -0700
committerEric Multanen <eric.w.multanen@intel.com>2019-03-22 01:16:08 -0700
commiteea8c1d2c9a830b20aacbacf9bbd0e36f664ee0f (patch)
tree3d00829bc32f773bc8087d05b1523a852f0be867 /adapters/mso-openstack-adapters/src/main
parent2061d60c2d380af5b9276ff4f86b3c95fbb7a5c1 (diff)
Multicloud VNF adapter use updated multicloud API
Update the Multicloud plugin adapter to use the the enhanced multicloud infra_workload API. Mainly involves adding the user_directives and the vf-module model IDs to the call. Change-Id: I7ab78a8a304dbd61a5743ec67bb839037861ef9d Issue-ID: SO-1446 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java34
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java1
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,