aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoVnfReplace.java
blob: cbdb8f5f66a3d16082d8862a72f4d7b565e6a150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package org.onap.simulator.presetGenerator.presets.mso.changeManagement;

import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
import org.springframework.http.HttpMethod;

public class PresetMsoVnfReplace extends PresetMsoChangeManagementBase {

    public PresetMsoVnfReplace(String serviceInstanceId, String vnfInstanceId) {
        super(serviceInstanceId, vnfInstanceId, "replace");
        this.cloudOwner = PresetAAIGetCloudOwnersByCloudRegionId.ATT_NC;
    }

    @Override
    public HttpMethod getReqMethod() {
        return HttpMethod.POST;
    }

    @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\"," +
                "      \"modelCustomizationId\": \"c539433a-84a6-4082-a12e-5c9b00c3b960\"" +
                "    }," +
                "    \"cloudConfiguration\": {" +
                "      \"lcpCloudRegionId\": \"mdt1\"," +
                        addCloudOwnerIfNeeded() +
                "      \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\"" +
                "    }," +
                "    \"requestInfo\": {" +
                "      \"source\": \"VID\"," +
                "      \"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\": {" +
                "      \"rebuildVolumeGroups\": false" +
                "    }" +
                "  }" +
                "}";
    }
}