Merge "Fix resume vfModule"
[vid.git] / vid-automation / src / main / java / vid / automation / test / services / BulkRegistration.java
1 package vid.automation.test.services;
2
3 import com.google.common.collect.ImmutableList;
4 import com.google.common.collect.ImmutableMap;
5 import org.onap.simulator.presetGenerator.presets.aai.*;
6 import org.onap.simulator.presetGenerator.presets.mso.*;
7 import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMSOActOnConfiguration;
8 import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMSOCreateConfiguration;
9 import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMSODeleteConfiguration;
10 import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMsoEnableDisablePort;
11 import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
12 import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
13 import vid.automation.test.Constants;
14 import vid.automation.test.Constants.ViewEdit;
15
16 import static org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset.DEFAULT_CLOUD_OWNER;
17 import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId.ATT_NC;
18 import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE;
19 import static vid.automation.test.infra.ModelInfo.serviceFabricSriovService;
20 import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
21
22 public class BulkRegistration {
23
24     public static void searchExistingServiceInstance() {
25         searchExistingServiceInstance("Active");
26     }
27
28     public static void searchExistingServiceInstance(String orchStatus)  {
29         searchExistingServiceInstance(orchStatus, "pending-delete");
30     }
31
32     public static void searchExistingServiceInstance(String orchStatus, String vfModuleOrchStatus) {
33         genericSearchExistingServiceInstance();
34         SimulatorApi.registerExpectation(
35                 new String [] {
36                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS,
37                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID,
38                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT,
39                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_VID_TEST_444,
40                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
41                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus, "<VF_MODULE_ORCH_STATUS>", vfModuleOrchStatus), SimulatorApi.RegistrationStrategy.APPEND);
42     }
43
44     public static void searchExistingServiceInstanceWithFabric(String orchStatus) {
45         genericSearchExistingServiceInstance();
46         SimulatorApi.registerExpectationFromPresets(
47                 ImmutableList.of(
48                         new PresetAAIFilterServiceInstanceById("e433710f-9217-458d-a79d-1c7aff376d89",
49                                  "TYLER SILVIA",
50                                 "c187e9fe-40c3-4862-b73e-84ff056205f61234"),
51                         new PresetAAIGetSubDetailsGet("e433710f-9217-458d-a79d-1c7aff376d89", orchStatus),
52                         new PresetAAIGetSubDetailsWithoutInstancesGet("e433710f-9217-458d-a79d-1c7aff376d89", true),
53                         new PresetAAIPostNamedQueryForViewEdit("c187e9fe-40c3-4862-b73e-84ff056205f61234", false, true),
54                         new PresetSDCGetServiceMetadataGet(serviceFabricSriovService),
55                         new PresetSDCGetServiceToscaModelGet(serviceFabricSriovService),
56                         new PresetAAIGetNetworkZones(),
57                         new PresetMSOActivateFabricConfiguration("c187e9fe-40c3-4862-b73e-84ff056205f61234"),
58                         new PresetMSOOrchestrationRequestGet(COMPLETE, "318cc766-b673-4a50-b9c5-471f68914584", "Success", false)),
59                 SimulatorApi.RegistrationStrategy.APPEND);
60     }
61
62     public static void searchExistingServiceInstanceByOEAndProject(){
63         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
64                 new PresetAAIGetModelsByOwningEntity("Melissa"),
65                 new PresetAAIGetModelsByProject("x1"),
66                 new PresetAAIGetModelsByProject("yyy1")
67                 ), APPEND);
68     }
69
70     public static void searchExistingCRServiceInstance(String orchStatus) {
71         genericSearchExistingServiceInstance();
72         SimulatorApi.registerExpectation(
73                 new String [] {
74                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS_CR,
75                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_CR_SERVICE_INSTANCE_BY_ID,
76                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_CR_VIEW_EDIT,
77                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_VID_TEST_CR,
78                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_MSO_INSTANCE_ORCH_STATUS_REQ,
79                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
80                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus, "<SERVICE_INSTANCE_ID>", "3f93c7cb-2fd0-4557-9514-e189b7testCR"), SimulatorApi.RegistrationStrategy.APPEND);
81     }
82
83     public static void searchExistingVFServiceWithVFCInstanceGroupInstance(String orchStatus) {
84         genericSearchExistingServiceInstance();
85         SimulatorApi.registerExpectation(
86                 new String [] {
87                         Constants.RegisterToSimulator.AddSubinterface.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS_VFC_IG,
88                         Constants.RegisterToSimulator.AddSubinterface.FILTER_VFC_IG_SERVICE_INSTANCE_BY_ID,
89                         Constants.RegisterToSimulator.AddSubinterface.NAMED_QUERY_VFC_IG_VIEW_EDIT,
90                         Constants.RegisterToSimulator.AddSubinterface.GET_SDC_CATALOG_SERVICE_VID_TEST_444,
91                         Constants.RegisterToSimulator.AddSubinterface.GET_MSO_VFC_IG_INSTANCE_ORCH_STATUS_REQ,
92                  }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
93     }
94
95     public static void genericSearchExistingServiceInstance() {
96         SimulatorApi.registerExpectation(
97                 new String [] {
98                         Constants.RegisterToSimulator.genericRequest.ECOMP_PORTAL_GET_SESSION_SLOT_CHECK_INTERVAL,
99                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SERVICES
100                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
101         SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(),SimulatorApi.RegistrationStrategy.APPEND);
102     }
103
104     public static void searchExistingServiceInstance2(String orchStatus) {
105         genericSearchExistingServiceInstance();
106         SimulatorApi.registerExpectation(
107                 new String [] {
108                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_CRAIG_ROBERTS,
109                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_2,
110                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_2
111                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
112     }
113
114     public static void searchExistingServiceInstancePortMirroring(String orchStatus, String desiredCloudRegionId) {
115         searchExistingServiceInstancePortMirroring(orchStatus, true, desiredCloudRegionId);
116     }
117
118     public static void searchExistingServiceInstancePortMirroring(String orchStatus, boolean isMirrored, String desiredCloudRegionId) {
119         genericSearchExistingServiceInstance();
120         final String configurationId = "9533-config-LB1113";
121         final String configurationId2 = "9533-config-LB1114";
122         final String portInterfaceId = "d35bf534-7d8e-4cb4-87f9-0a8bb6cd47b2";
123         final String modelToReplaceWith ="pm1111_equip_model_rename.zip";
124
125         SimulatorApi.registerExpectationFromPreset(new PresetAAICloudRegionAndSourceFromConfigurationPut(configurationId, desiredCloudRegionId), APPEND);
126         SimulatorApi.registerExpectationFromPreset(new PresetAAIGetPortMirroringSourcePorts(configurationId, portInterfaceId, ViewEdit.COMMON_PORT_MIRRORING_PORT_NAME, isMirrored), APPEND);
127         SimulatorApi.registerExpectationFromPreset(new PresetAAICloudRegionAndSourceFromConfigurationPut(configurationId2, desiredCloudRegionId), APPEND);
128         SimulatorApi.registerExpectationFromPreset(new PresetAAIGetPortMirroringSourcePorts(configurationId2, portInterfaceId, "i'm not your port", isMirrored), APPEND);
129         SimulatorApi.registerExpectationFromPreset(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC, APPEND);
130         SimulatorApi.registerExpectation(
131                 new String [] {
132                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS,
133                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_PM,
134                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_PM,
135                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_PM,
136                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
137                 }, ImmutableMap.<String, Object>of(
138                         "<ORCH_STATUS>", orchStatus, "<IS_MIRRORED>", isMirrored,
139                         "pm1111.zip", modelToReplaceWith
140                         ), SimulatorApi.RegistrationStrategy.APPEND);
141     }
142
143     public static void associatePnf() {
144         SimulatorApi.registerExpectation(
145                 new String [] {
146                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
147                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
148                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP,
149                         Constants.RegisterToSimulator.pProbe.GET_ADD_PNF_RELATIONSHIP_ORCH_REQ
150                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
151     }
152
153     public static void searchPnfError() {
154         SimulatorApi.registerExpectation(
155                 new String [] {
156                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
157                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF_ERROR
158                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
159     }
160     public static void associatePnfError() {
161         SimulatorApi.registerExpectation(
162                 new String [] {
163                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
164                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
165                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP_ERROR
166                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
167     }
168
169     public static void dissociatePnf() {
170         SimulatorApi.registerExpectation(
171                 new String [] {
172                         Constants.RegisterToSimulator.pProbe.REMOVE_PNF_RELATIONSHIP,
173                         Constants.RegisterToSimulator.pProbe.GET_REMOVE_PNF_RELATIONSHIP_ORCH_REQ
174                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
175     }
176
177     public static void getAssociatedPnfs() {
178         SimulatorApi.registerExpectation(
179                 new String [] {
180                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
181                         Constants.RegisterToSimulator.pProbe.GET_LOGICAL_LINK
182                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
183     }
184
185     public static void activateServiceInstance(String action) {
186         SimulatorApi.registerExpectation(
187                 new String [] {
188                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
189                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE,
190                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ORCH_REQUEST
191                 }, ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action), SimulatorApi.RegistrationStrategy.APPEND);
192     }
193
194
195     public static void activateDeactivateConfiguration(String action) {
196         appendWithGetStatus(new PresetMSOActOnConfiguration(action), PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC);
197     }
198
199     public static void deleteConfiguration() {
200         appendWithGetStatus(new PresetMSODeleteConfiguration(), PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC);
201     }
202
203     public static void enableDisablePort(String action){
204         appendWithGetStatus(new PresetMsoEnableDisablePort(
205                 "c187e9fe-40c3-4862-b73e-84ff056205f6",
206                 "9533-config-LB1113", action), PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC);
207     }
208
209     public static void addNetwork() {
210         SimulatorApi.registerExpectation(
211                 new String [] {
212                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_Emanuel,
213                         Constants.RegisterToSimulator.addNetwork.AAI_GET_TENANTS,
214                         Constants.RegisterToSimulator.addNetwork.AAI_NAMED_QUERY_FOR_VIEW_EDIT,
215                         Constants.RegisterToSimulator.addNetwork.FILTER_SERVICE_INSTANCE_BY_ID,
216                         //Constants.RegisterToSimulator.addNetwork.FILTER_SERVICE_INSTANCE_BY_NAME,
217                         Constants.RegisterToSimulator.addNetwork.GET_SDC_CATALOG_SERVICES_NETWORK,
218
219                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
220     }
221
222     public static void msoAddNetworkError(String instanceName){
223         SimulatorApi.registerExpectation(
224                 new String [] {
225                         Constants.RegisterToSimulator.addNetwork.MSO_ADD_NETWORK_ERROR
226                 }, ImmutableMap.<String, Object>of("<SERVICE_INSTANCE_NAME>",instanceName), SimulatorApi.RegistrationStrategy.APPEND);
227     }
228     public static void activateServiceInstanceError(String action) {
229         SimulatorApi.registerExpectation(
230                 new String []{
231                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
232                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ERROR
233                 } , ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action), SimulatorApi.RegistrationStrategy.APPEND);
234     }
235
236
237     public static void createPolicyConfiguration(boolean isSuccessFlow, String serviceType) {
238         createConfiguration();
239
240         SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.APPEND,
241                 Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_ONE_INVARIANT_ID);
242
243         SimulatorApi.registerExpectation(Constants.RegisterToSimulator.createConfiguration.GET_PNF_INSTANCES,
244                 ImmutableMap.of("<SERVICE-TYPE>", serviceType), SimulatorApi.RegistrationStrategy.APPEND);
245
246         if (isSuccessFlow) {
247             msoCreatePProbeConfiguration();
248         } else {
249             msoCreatePProbeConfigurationError();
250         }
251     }
252
253     public static void deletePolicyConfiguration(boolean isSuccessFlow) {
254         createConfiguration();
255         SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.APPEND,
256                 Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_ONE_INVARIANT_ID);
257         appendWithGetStatus(new PresetMSODeleteConfiguration(), PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC);
258     }
259
260
261
262
263     private static void msoCreatePProbeConfiguration() {
264         appendWithGetStatus(new PresetMSOCreateConfiguration("c187e9fe-40c3-4862-b73e-84ff056205f6"), PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC);
265     }
266
267     private static void appendWithGetStatus(PresetMSOBaseCreateInstancePost createInstancePreset, PresetAAIGetCloudOwnersByCloudRegionId cloudOwnerPreset) {
268         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
269                 createInstancePreset,
270                 cloudOwnerPreset,
271                 new PresetMSOOrchestrationRequestGet(COMPLETE, createInstancePreset.getRequestId(), "Success", false)),
272                 SimulatorApi.RegistrationStrategy.APPEND);
273     }
274
275     private static void msoCreatePProbeConfigurationError() {
276         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
277                 new PresetMSOCreateConfiguration("c187e9fe-40c3-4862-b73e-84ff056205f6", 500, null),
278                 PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC),
279                 SimulatorApi.RegistrationStrategy.APPEND);
280     }
281
282     public static void createConfiguration() {
283         createConfiguration("model-version-id=2a2ea15f-07c6-4b89-bfca-e8aba39a34d6&model-invariant-id=a7eac2b3-8444-40ee-92e3-b3359b32445c");
284     }
285
286     public static void createConfiguration(String model) {
287         SimulatorApi.registerExpectation(
288                 new String []{
289                         Constants.RegisterToSimulator.createConfiguration.GET_VNF_INSTANCES,
290                         Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_2_INVARIANT_IDS
291                 } , ImmutableMap.of("model-version-id=2a2ea15f-07c6-4b89-bfca-e8aba39a34d6&model-invariant-id=a7eac2b3-8444-40ee-92e3-b3359b32445c", model), SimulatorApi.RegistrationStrategy.APPEND);
292     }
293
294     public static void getNetworkNodeFormData() {
295         SimulatorApi.registerExpectation(
296                 new String []{
297                         Constants.RegisterToSimulator.createConfiguration.GET_TENANTS
298                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
299     }
300
301     public static void createNewServiceInstance(String subscriber) {
302         SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(),SimulatorApi.RegistrationStrategy.APPEND);
303         SimulatorApi.registerExpectation(Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SERVICES, SimulatorApi.RegistrationStrategy.APPEND);
304
305         switch (subscriber) {
306             case "SILVIA ROBBINS": createNewServiceInstanceUspVoice(); break;
307             case "CAR_2020_ER": createNewServiceInstanceMso1610ST(); break;
308         }
309     }
310
311     private static void createNewServiceInstanceMso1610ST() {
312         SimulatorApi.registerExpectation(
313                 new String []{
314                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_CAR_2020_ER,
315                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_MODELS_BY_SERVICE_TYPE_CAR_2020_ER
316                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
317     }
318
319     private static void createNewServiceInstanceUspVoice() {
320         SimulatorApi.registerExpectation(
321                 new String []{
322                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS,
323                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_MODELS_BY_SERVICE_TYPE_SILVIA_ROBBINS
324                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
325     }
326
327     public static void deployNewServiceInstance(String instanceName) {
328         SimulatorApi.registerExpectation(
329                 new String []{
330                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.SDC_GET_CATALOG,
331                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES,
332                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.MSO_CREATE_SVC_INSTANCE,
333                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.MSO_CREATE_SVC_INSTANCE_ORCH_REQ
334                 } , ImmutableMap.<String, Object>of("<INSTANCE_NAME>", instanceName), SimulatorApi.RegistrationStrategy.APPEND);
335     }
336
337     public static void searchExistingServiceInstanceWithoutModelVerId() {
338         SimulatorApi.registerExpectation(
339                 new String []{
340                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_CRAIG_ROBERTS,
341                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_NO_MODEL_VER_ID,
342                        // Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_NO_MODEL_VER_ID
343                 } ,  ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
344     }
345
346     public static void deleteExistingInstance(String orchStatus, String type)  {
347         deleteExistingInstance(orchStatus, type, "pending-delete");
348     }
349
350     public static void deleteExistingInstance(String orchStatus, String type, String vfModuleOrchStatus) {
351         genericSearchExistingServiceInstance();
352         SimulatorApi.registerExpectation(
353                 new String [] {
354                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_SILVIA_ROBBINS,
355                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT,
356                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
357                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus, "<VF_MODULE_ORCH_STATUS>", vfModuleOrchStatus), SimulatorApi.RegistrationStrategy.APPEND);
358         SimulatorApi.registerExpectationFromPresets(
359                 ImmutableList.of(
360                         new PresetAAIGetTenants(),
361                         new PresetMSODeleteInstanceOrchestrationRequestGet(type),
362                         new PresetSDCGetServiceMetadataGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", "service-Complexservice-aLaCarte-csar.zip"),
363                         new PresetSDCGetServiceToscaModelGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-Complexservice-aLaCarte-csar.zip"),
364                         new PresetMSODeactivateAndCloudDelete("3f93c7cb-2fd0-4557-9514-e189b7b04f9d", "c015cc0f-0f37-4488-aabf-53795fd93cd3",
365                                 "a231a99c-7e75-4d6d-a0fb-5c7d26f30f77", "c0011670-0e1a-4b74-945d-8bf5aede1d9c", "irma-aic"),
366                         PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC
367                 ),
368                 SimulatorApi.RegistrationStrategy.APPEND);
369     }
370
371     public static void deleteExistingVolumeGroupInstance(String orchStatus) {
372         deleteExistingInstance(orchStatus, "Volume Group");
373         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVolumeGroup(), SimulatorApi.RegistrationStrategy.APPEND);
374     }
375
376     public static void deleteExistingVfModuleInstance(String orchStatus) {
377         deleteExistingInstance(orchStatus, "VF Module");
378         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVfModule(), SimulatorApi.RegistrationStrategy.APPEND);
379     }
380
381     public static void deleteExistingVnfInstance(String orchStatus) {
382         deleteExistingInstance(orchStatus, "Vnf");
383         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVnf(), SimulatorApi.RegistrationStrategy.APPEND);
384     }
385
386     public static void deleteExistingNetworkInstance(String orchStatus) {
387         deleteExistingInstance(orchStatus, "Network");
388         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteNetwork(), SimulatorApi.RegistrationStrategy.APPEND);
389     }
390
391     public static void deleteExistingServiceInstance(String orchStatus) {
392         deleteExistingInstance(orchStatus, "Service");
393         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
394                 new PresetMSODeleteService(),
395                 new PresetAAIPostNamedQueryForViewEdit("3f93c7cb-2fd0-4557-9514-e189b7b04f9d", false, false)), SimulatorApi.RegistrationStrategy.APPEND);
396     }
397
398     public static void resumeWithHomingDataVfModule(String serviceOrchStatus, String vfModuleOrchStatus, String vfModuleName)  {
399         SimulatorApi.registerExpectation(Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT,
400                 ImmutableMap.<String, Object>of("<ORCH_STATUS>", serviceOrchStatus, "<VF_MODULE_ORCH_STATUS>", vfModuleOrchStatus),
401                 SimulatorApi.RegistrationStrategy.APPEND);
402
403         SimulatorApi.registerExpectationFromPresets(
404                 ImmutableList.of (
405                         new PresetAAIGetHomingForVfModule("c015cc0f-0f37-4488-aabf-53795fd93cd3", "a231a99c-7e75-4d6d-a0fb-5c7d26f30f77", "092eb9e8e4b7412e8787dd091bc58e86", "hvf6"),
406                         new PresetMSOCreateVfModule("3f93c7cb-2fd0-4557-9514-e189b7b04f9d",
407                                 "c015cc0f-0f37-4488-aabf-53795fd93cd3", DEFAULT_CLOUD_OWNER, vfModuleName,
408                                 "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", "ComplexService"),
409                         new PresetMSOOrchestrationRequestGet(
410                                 COMPLETE,
411                                 "c0011670-0e1a-4b74-945d-8bf5aede1d9c",
412                                 Constants.ViewEdit.VF_MODULE_CREATED_SUCCESSFULLY_TEXT,
413                                 false)),
414                 SimulatorApi.RegistrationStrategy.APPEND);
415     }
416
417     public static void resumeVfModule(String serviceInstanceId, String vnfInstanceId ){
418         BulkRegistration.searchExistingServiceInstance();
419         SimulatorApi.registerExpectationFromPresets(
420                 ImmutableList.of (
421                         new PresetAAIGetTenants(),
422                         PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC,
423                         new PresetMSOCreateVfModule(serviceInstanceId,vnfInstanceId, ATT_NC),
424                         new PresetMSOOrchestrationRequestGet(
425                                 COMPLETE,
426                                 "c0011670-0e1a-4b74-945d-8bf5aede1d9c",
427                                 Constants.ViewEdit.VF_MODULE_CREATED_SUCCESSFULLY_TEXT,
428                                 false)),
429                 SimulatorApi.RegistrationStrategy.APPEND);
430
431     }
432 }