diff options
author | 2019-03-11 09:34:34 +0200 | |
---|---|---|
committer | 2019-03-17 17:02:43 +0200 | |
commit | 66af8b9b391879be78660d6ccb0a1f1f9340b423 (patch) | |
tree | fc0d510f7ea28a437bcb1e3b950d1281ac88a4e4 /vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java | |
parent | 37ad0cc1d36ec6ff68ec39fcaaf2617eef7d08fe (diff) |
Merge automation from ECOMP's repository
Reference commit in ECOMP: 8e92a8c6
Issue-ID: VID-378
Change-Id: Ia32f4813378ef95097f788246aa5b1172e20ca48
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java new file mode 100644 index 000000000..dee516005 --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfUpdate.java @@ -0,0 +1,67 @@ +package org.onap.simulator.presetGenerator.presets.mso.changeManagement; + +import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId; +import org.springframework.http.HttpMethod; + +public class PresetMsoVnfUpdate extends PresetMsoChangeManagementBase { + + + public PresetMsoVnfUpdate(String serviceInstanceId, String vnfInstanceId) { + super(serviceInstanceId, vnfInstanceId, ""); + this.cloudOwner = PresetAAIGetCloudOwnersByCloudRegionId.ATT_NC; + } + + @Override + public HttpMethod getReqMethod() { + return HttpMethod.PUT; + } + + @Override + public String getReqPath() { + return getRootPath() + "/serviceInstantiation/v./serviceInstances/" + serviceInstanceId + "/vnfs/" + vnfInstanceId; + } + + @Override + public Object getRequestBody() { + return "{" + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelType\": \"vnf\"," + + " \"modelInvariantId\": \"ff5256d1-5a33-55df-13ab-12abad84e7ff\"," + + " \"modelVersionId\": \"254583ad-b38c-498b-bdbd-b8de5e07541b\"," + + " \"modelName\": \"vSAMP12\"," + + " \"modelVersion\": \"2.0\"," + + // TODO Ask ZITELLA, MICHAEL V if the field is mandatory. Vid currently not send it + //" \"modelCustomizationName\": \"vSAMP12 1\"," + + " \"modelCustomizationId\": \"c539433a-84a6-4082-a12e-5c9b00c3b960\"" + + " }," + + " \"cloudConfiguration\": {" + + " \"lcpCloudRegionId\": \"mdt1\"," + + addCloudOwnerIfNeeded() + + " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\"" + + " }," + + " \"requestInfo\": {" + + " \"source\": \"VID\"," + + " \"suppressRollback\": false," + + " \"requestorId\": \"az2016\"" + + " }," + + " \"relatedInstanceList\": [" + + " {" + + " \"relatedInstance\": {" + + " \"instanceId\": \""+serviceInstanceId+"\"," + + " \"modelInfo\": {" + + " \"modelType\": \"service\"," + + " \"modelInvariantId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\"," + + " \"modelVersionId\": \"9ebb1521-2e74-47a4-aac7-e71a79f73a79\"," + + " \"modelName\": \"fakeModelName\"," + + " \"modelVersion\": \"2.0\"" + + " }" + + " }" + + " }" + + " ]," + + " \"requestParameters\": {" + + " \"usePreload\": true" + + " }" + + "}}"; + } +} |