1 package org.onap.simulator.presetGenerator.presets.mso.configuration;
3 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
4 import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost;
5 import org.springframework.http.HttpMethod;
7 public class PresetMsoEnableDisablePort extends PresetMSOBaseCreateInstancePost {
9 private final String serviceInstanceId;
10 private final String configurationId;
11 private final String action;
14 public PresetMsoEnableDisablePort(String serviceInstanceId, String configurationId, String action) {
15 super("314cc766-b673-4a50-b9c5-471f68914585", serviceInstanceId);
16 this.serviceInstanceId = serviceInstanceId;
17 this.configurationId = configurationId;
19 this.cloudOwner = PresetAAIGetCloudOwnersByCloudRegionId.ATT_NC;
23 public HttpMethod getReqMethod() {
24 return HttpMethod.POST;
28 public String getReqPath() {
29 return getRootPath() + "/serviceInstantiation/v./serviceInstances/"+serviceInstanceId+"/configurations/"+configurationId+"/" + action;
33 public Object getRequestBody() {
35 " \"requestDetails\": {" +
36 " \"cloudConfiguration\": {" +
37 addCloudOwnerIfNeeded() +
38 " \"lcpCloudRegionId\": \"mdt1\"" +
41 " \"modelCustomizationId\": \"08a181aa-72eb-435f-9593-e88a3ad0a86b\"," +
42 " \"modelInvariantId\": \"model-invariant-id-9533\"," +
43 " \"modelVersionId\": \"model-version-id-9533\"," +
44 " \"modelType\": \"configuration\"" +
46 " \"requestInfo\": {" +
47 " \"source\": \"VID\"," +
48 " \"requestorId\": \"us16807000\"" +
50 " \"relatedInstanceList\": [" +
52 " \"relatedInstance\": {" +
53 " \"instanceId\": \""+serviceInstanceId+"\"," +
55 " \"modelType\": \"service\"," +
56 " \"modelInvariantId\": \"b7d923c9-6175-41f1-91ba-4565c4953408\"," +
57 " \"modelName\": \"ServiceContainerMultiplepProbes\"," +
58 " \"modelVersionId\": \"ee6d61be-4841-4f98-8f23-5de9da846ca7\"," +
59 " \"modelVersion\": \"1.0\"" +
64 " \"relatedInstance\": {" +
65 " \"instanceId\": \"d35bf534-7d8e-4cb4-87f9-0a8bb6cd47b2\"," +
66 " \"instanceDirection\": \"source\"," +
68 " \"modelType\": \"connectionPoint\"" +