diff options
author | 2019-03-18 10:07:02 +0000 | |
---|---|---|
committer | 2019-03-18 10:07:02 +0000 | |
commit | a036637a4d466662128cde1823816578e76c69e0 (patch) | |
tree | d58add45a75701717e67de676463fc6b15068f9d /vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java | |
parent | 756a9c041981e05a3f5bd740ebc0d3fc22579003 (diff) | |
parent | 66af8b9b391879be78660d6ccb0a1f1f9340b423 (diff) |
Merge "Merge automation from ECOMP's repository"
Diffstat (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java new file mode 100644 index 000000000..72538fc11 --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModule.java @@ -0,0 +1,78 @@ +package org.onap.simulator.presetGenerator.presets.mso; + +public class PresetMSOCreateVfModule extends PresetMSOBaseCreateInstancePost { + private String serviceInstanceId; + private String vnfInstanceId; + private String instanceName; + private String modelVersionId; + private String modelInvariantId; + private String serviceName; + + public PresetMSOCreateVfModule(String serviceInstanceId, String vnfInstanceId, String cloudOwner) { + this(serviceInstanceId, vnfInstanceId, cloudOwner, "aa", "240376de-870e-48df-915a-31f140eedd2c", + "709d1be4-9a3f-4a29-8c4d-a20465e808a3", "Demo Service 1"); + } + + public PresetMSOCreateVfModule(String serviceInstanceId, String vnfInstanceId, + String cloudOwner, String instanceName, String modelVersionId, String modelInvariantId, String serviceName) { + this.serviceInstanceId = serviceInstanceId; + this.vnfInstanceId = vnfInstanceId; + this.cloudOwner = cloudOwner; + this.instanceName = instanceName; + this.modelVersionId = modelVersionId; + this.modelInvariantId = modelInvariantId; + this.serviceName = serviceName; + } + + @Override + public String getReqPath() { + return getRootPath() + "/serviceInstantiation/v./serviceInstances/" + serviceInstanceId + "/vnfs/"+vnfInstanceId+"/vfModules"; + } + + @Override + public Object getRequestBody() { + return "{" + + "\"requestDetails\":{" + + "\"requestInfo\":{" + + "\"instanceName\":\"" + instanceName + "\"," + + "\"source\":\"VID\"," + + "\"suppressRollback\":false," + + "\"requestorId\":\"us16807000\"" + + "}," + + "\"modelInfo\":{" + + "\"modelType\":\"vfModule\"," + + "\"modelInvariantId\":\"\"," + + "\"modelVersionId\":\"\"," + + "\"modelName\":\"\"," + + "\"modelVersion\":\"\"," + + "\"modelCustomizationId\":\"\"," + + "\"modelCustomizationName\":\"\"" + + "}," + + "\"requestParameters\":{" + + "\"userParams\":[" + + "]," + + "\"usePreload\":false" + + "}," + + "\"cloudConfiguration\":{" + + "\"lcpCloudRegionId\":\"mdt1\"," + + addCloudOwnerIfNeeded() + + "\"tenantId\":\"092eb9e8e4b7412e8787dd091bc58e86\"" + + "}," + + "\"relatedInstanceList\":[" + + "{" + + "\"relatedInstance\":{" + + "\"instanceId\":\"" + serviceInstanceId + "\","+ + "\"modelInfo\":{" + + "\"modelType\":\"service\"," + + "\"modelName\":\"" + serviceName + "\","+ + "\"modelInvariantId\":\"" + modelInvariantId + "\","+ + "\"modelVersion\":\"1.0\"," + + "\"modelVersionId\":\"" + modelVersionId + "\"" + + "}" + + "}" + + "}" + + "]" + + "}" + + "}"; + } +} |