1 package org.opencomp.simulator.presetGenerator.presets.mso;
 
   5 import static org.opencomp.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.*;
 
   7 public abstract class PresetMSOServiceInstanceGen2WithNames extends PresetMSOBaseCreateServiceInstancePost{
 
  10         SERVICE_NAME, VNF_NAME, VFM_NAME1, VFM_NAME2, VG_NAME
 
  13     private final Map<Keys, String> names;
 
  15     private final String suffix;
 
  17     public PresetMSOServiceInstanceGen2WithNames(Map<Keys, String> names, int suffix) {
 
  19         this.suffix = "_" + String.format("%03d", suffix);
 
  23     public Object getRequestBody() {
 
  25                 "  \"requestDetails\": {" +
 
  27                 "      \"modelInvariantId\": \"300adb1e-9b0c-4d52-bfb5-fa5393c4eabb\"," +
 
  28                 "      \"modelVersionId\": \"5c9e863f-2716-467b-8799-4a67f378dcaa\"," +
 
  29                 "      \"modelName\": \"AIM_TRANSPORT_00004\"," +
 
  30                 "      \"modelType\": \"service\"," +
 
  31                 "      \"modelVersion\": \"1.0\"" +
 
  33                 "    \"owningEntity\": {" +
 
  34                 "      \"owningEntityId\": \"someID\"," +
 
  35                 "      \"owningEntityName\": \"someName\"" +
 
  37                 "    \"subscriberInfo\": {" +
 
  38                 "      \"globalSubscriberId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
 
  41                 "      \"projectName\": \"myProject\"" +
 
  43                 "    \"requestInfo\": {" +
 
  44                 "      \"instanceName\": \""+ names.get(SERVICE_NAME) + suffix + "\"," +
 
  45                 "      \"productFamilyId\": \"myProductFamilyId\"," +
 
  46                 "      \"source\": \"VID\"," +
 
  47                 "      \"suppressRollback\": false," +
 
  48                 "      \"requestorId\": \"ab2222\"" +
 
  50                 "    \"requestParameters\": {" +
 
  51                 "      \"subscriptionServiceType\": \"mySubType\"," +
 
  52                 "      \"aLaCarte\": false," +
 
  53                 "      \"userParams\": [" +
 
  57                 "              \"modelVersionId\": \"5c9e863f-2716-467b-8799-4a67f378dcaa\"," +
 
  58                 "              \"modelName\": \"AIM_TRANSPORT_00004\"," +
 
  59                 "              \"modelType\": \"service\"" +
 
  61                 "            \"instanceName\": \""+ names.get(SERVICE_NAME) + suffix + "\"," +
 
  62                 "            \"instanceParams\": []," +
 
  67                 "                    \"modelCustomizationName\": \"2016-73_MOW-AVPN-vPE-BV-L 0\"," +
 
  68                 "                    \"modelCustomizationId\": \"ab153b6e-c364-44c0-bef6-1f2982117f04\"," +
 
  69                 "                    \"modelVersionId\": \"7f40c192-f63c-463e-ba94-286933b895f8\"," +
 
  70                 "                    \"modelName\": \"2016-73_MOW-AVPN-vPE-BV-L\"," +
 
  71                 "                    \"modelType\": \"vnf\"" +
 
  73                 "                  \"cloudConfiguration\": {" +
 
  74                 "                    \"lcpCloudRegionId\": \"mtn3\"," +
 
  75                 "                    \"tenantId\": \"greatTenant\"" +
 
  78                 "                    \"platformName\": \"platformName\"" +
 
  80                 "                  \"lineOfBusiness\": {" +
 
  81                 "                    \"lineOfBusinessName\": \"lineOfBusinessName\"" +
 
  83                 "                  \"productFamilyId\": \"myProductFamilyId\"," +
 
  84                 "                  \"instanceParams\": []," +
 
  88                 "                        \"modelCustomizationId\": \"a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f\"," +
 
  89                 "                        \"modelVersionId\": \"4c75f813-fa91-45a4-89d0-790ff5f1ae79\"," +
 
  90                 "                        \"modelName\": \"201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0\"," +
 
  91                 "                        \"modelType\": \"vfModule\"" +
 
  93                 "                      \"instanceName\": \""+ names.get(VFM_NAME1)  + suffix +"\"," +
 
  94                 "                      \"instanceParams\": [" +
 
  96                 "                          \"vmx_int_net_len\": \"24\"" +
 
 101                 "                      \"modelInfo\": {" +
 
 102                 "                        \"modelCustomizationId\": \"72d9d1cd-f46d-447a-abdb-451d6fb05fa8\"," +
 
 103                 "                        \"modelVersionId\": \"56e2b103-637c-4d1a-adc8-3a7f4a6c3240\"," +
 
 104                 "                        \"modelName\": \"201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1\"," +
 
 105                 "                        \"modelType\": \"vfModule\"" +
 
 107                 "                      \"instanceName\": \"" + names.get(VFM_NAME2) + suffix + "\"," +
 
 108                 "                      \"volumeGroupInstanceName\" : \"" + names.get(VG_NAME) + suffix + "\"," +
 
 109                 "                      \"instanceParams\": [" +
 
 111                 "                          \"vre_a_volume_size_0\": \"100\"," +
 
 112                 "                          \"availability_zone_0\": \"mtpocdv-kvm-az01\"" +
 
 117                 "                  \"instanceName\": \"" + names.get(VNF_NAME)+ suffix + "\"" +