update MSO configuration URL
[vid.git] / vid-automation / src / main / java / org / onap / simulator / presetGenerator / presets / mso / configuration / PresetMSOActOnConfiguration.java
1 package org.onap.simulator.presetGenerator.presets.mso.configuration;
2
3 import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost;
4
5 public class PresetMSOActOnConfiguration extends PresetMSOBaseCreateInstancePost {
6
7     private final String action;
8
9     public PresetMSOActOnConfiguration(String action) {
10         this.action = action;
11         this.cloudOwner = "att-nc";
12     }
13
14     public PresetMSOActOnConfiguration(String action, String requestId, String responseInstanceId) {
15         super(requestId, responseInstanceId);
16         this.action = action;
17         this.cloudOwner = "att-nc";
18     }
19
20
21     @Override
22     public boolean isStrictMatch() {
23         return true;
24     }
25
26     @Override
27     public String getReqPath() {
28         return getRootPath() + "/serviceInstantiation/v./serviceInstances/c187e9fe-40c3-4862-b73e-84ff056205f6/configurations/9533-config-LB1113/" + action;
29     }
30
31     @Override
32     public Object getRequestBody() {
33         return "" +
34                 "{" +
35                 "  \"requestDetails\": {" +
36                 "    \"modelInfo\": {" +
37                 "      \"modelType\": \"configuration\"," +
38                 "      \"modelInvariantId\": \"model-invariant-id-9533\"," +
39                 "      \"modelVersionId\": \"model-version-id-9533\"," +
40                 "      \"modelCustomizationId\": \"08a181aa-72eb-435f-9593-e88a3ad0a86b\"" +
41                 "    }," +
42                 "    \"cloudConfiguration\": {" +
43                 addCloudOwnerIfNeeded() +
44                 "      \"lcpCloudRegionId\": \"mdt1\"," +
45                 "    }," +
46                 "    \"requestInfo\": {" +
47                 "      \"source\": \"VID\"," +
48                 "      \"requestorId\": \"us16807000\"" +
49                 "    }," +
50                 "    \"relatedInstanceList\": [{" +
51                 "        \"relatedInstance\": {" +
52                 "          \"instanceId\": \"c187e9fe-40c3-4862-b73e-84ff056205f6\"," +
53                 "          \"modelInfo\": {" +
54                 "            \"modelType\": \"service\"," +
55                 "            \"modelInvariantId\": \"b7d923c9-6175-41f1-91ba-4565c4953408\"," +
56                 "            \"modelVersionId\": \"ee6d61be-4841-4f98-8f23-5de9da846ca7\"," +
57                 "            \"modelName\": \"ServiceContainerMultiplepProbes\"," +
58                 "            \"modelVersion\": \"1.0\"" +
59                 "          }" +
60                 "        }" +
61                 "      }" +
62                 "    ]," +
63                 "    \"requestParameters\": {" +
64                 "      \"userParams\": []" +
65                 "    }" +
66                 "  }" +
67                 "}";
68     }
69
70 }