Merge "Remove vendor from CloudOwner"
[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.PresetAAICloudRegionAndSourceFromConfigurationPut;
6 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetModelsByOwningEntity;
7 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetModelsByProject;
8 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetPortMirroringSourcePorts;
9 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetTenants;
10 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIPostNamedQueryForViewEdit;
11 import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVfModuleInstancePost;
12 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteInstanceOrchestrationRequestGet;
13 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteNetwork;
14 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteService;
15 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteVfModule;
16 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteVnf;
17 import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteVolumeGroup;
18 import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
19 import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
20 import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
21 import vid.automation.test.Constants;
22
23 import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
24
25 public class BulkRegistration {
26
27     public static void searchExistingServiceInstance() {
28         searchExistingServiceInstance("Active");
29     }
30
31     public static void searchExistingServiceInstance(String orchStatus) {
32         genericSearchExistingServiceInstance();
33         SimulatorApi.registerExpectation(
34                 new String [] {
35                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE,
36                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID,
37                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT,
38                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_VID_TEST_444,
39                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
40                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
41     }
42
43     public static void searchExistingServiceInstanceByOEAndProject(){
44         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
45                 new PresetAAIGetModelsByOwningEntity("Wireline"),
46                 new PresetAAIGetModelsByProject("x1"),
47                 new PresetAAIGetModelsByProject("yyy1")
48                 ), APPEND);
49     }
50
51     public static void searchExistingCRServiceInstance(String orchStatus) {
52         genericSearchExistingServiceInstance();
53         SimulatorApi.registerExpectation(
54                 new String [] {
55                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE_CR,
56                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_CR_SERVICE_INSTANCE_BY_ID,
57                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_CR_VIEW_EDIT,
58                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_VID_TEST_CR,
59                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_MSO_INSTANCE_ORCH_STATUS_REQ,
60                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
61                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus, "<SERVICE_INSTANCE_ID>", "3f93c7cb-2fd0-4557-9514-e189b7testCR"), SimulatorApi.RegistrationStrategy.APPEND);
62     }
63
64     public static void searchExistingVFServiceWithVFCInstanceGroupInstance(String orchStatus) {
65         genericSearchExistingServiceInstance();
66         SimulatorApi.registerExpectation(
67                 new String [] {
68                         Constants.RegisterToSimulator.AddSubinterface.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE_VFC_IG,
69                         Constants.RegisterToSimulator.AddSubinterface.FILTER_VFC_IG_SERVICE_INSTANCE_BY_ID,
70                         Constants.RegisterToSimulator.AddSubinterface.NAMED_QUERY_VFC_IG_VIEW_EDIT,
71                         Constants.RegisterToSimulator.AddSubinterface.GET_SDC_CATALOG_SERVICE_VID_TEST_444,
72                         Constants.RegisterToSimulator.AddSubinterface.GET_MSO_VFC_IG_INSTANCE_ORCH_STATUS_REQ,
73                  }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
74     }
75
76     public static void genericSearchExistingServiceInstance() {
77         SimulatorApi.registerExpectation(
78                 new String [] {
79                         Constants.RegisterToSimulator.genericRequest.ECOMP_PORTAL_GET_SESSION_SLOT_CHECK_INTERVAL,
80                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_FULL_SUBSCRIBERS,
81                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SERVICES
82
83                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
84     }
85
86     public static void searchExistingServiceInstance2(String orchStatus) {
87         genericSearchExistingServiceInstance();
88         SimulatorApi.registerExpectation(
89                 new String [] {
90                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_FIREWALL_MISC,
91                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_2,
92                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_2
93                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
94     }
95
96     public static void searchExistingServiceInstancePortMirroring(String orchStatus, String desiredCloudRegionId) {
97         searchExistingServiceInstancePortMirroring(orchStatus, true, desiredCloudRegionId);
98     }
99
100     public static void searchExistingServiceInstancePortMirroring(String orchStatus, boolean isMirrored, String desiredCloudRegionId) {
101         genericSearchExistingServiceInstance();
102         final String configurationId = "9533-config-LB1113";
103         final String portInterfaceId = "d35bf534-7d8e-4cb4-87f9-0a8bb6cd47b2";
104         final String modelToReplaceWith ="pm1111_equip_model_rename.zip";
105
106         SimulatorApi.registerExpectationFromPreset(new PresetAAICloudRegionAndSourceFromConfigurationPut(configurationId, desiredCloudRegionId), APPEND);
107         SimulatorApi.registerExpectationFromPreset(new PresetAAIGetPortMirroringSourcePorts(configurationId, portInterfaceId, "i'm a port", isMirrored), APPEND);
108         SimulatorApi.registerExpectation(
109                 new String [] {
110                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE,
111                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_PM,
112                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_PM,
113                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SDC_CATALOG_SERVICE_PM,
114                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
115                 }, ImmutableMap.<String, Object>of(
116                         "<ORCH_STATUS>", orchStatus, "<IS_MIRRORED>", isMirrored,
117                         "pm1111.zip", modelToReplaceWith
118                         ), SimulatorApi.RegistrationStrategy.APPEND);
119     }
120
121     public static void associatePnf() {
122         SimulatorApi.registerExpectation(
123                 new String [] {
124                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
125                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
126                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP,
127                         Constants.RegisterToSimulator.pProbe.GET_ADD_PNF_RELATIONSHIP_ORCH_REQ
128                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
129     }
130
131     public static void searchPnfError() {
132         SimulatorApi.registerExpectation(
133                 new String [] {
134                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
135                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF_ERROR
136                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
137     }
138     public static void associatePnfError() {
139         SimulatorApi.registerExpectation(
140                 new String [] {
141                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
142                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
143                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP_ERROR
144                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
145     }
146
147     public static void dissociatePnf() {
148         SimulatorApi.registerExpectation(
149                 new String [] {
150                         Constants.RegisterToSimulator.pProbe.REMOVE_PNF_RELATIONSHIP,
151                         Constants.RegisterToSimulator.pProbe.GET_REMOVE_PNF_RELATIONSHIP_ORCH_REQ
152                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
153     }
154
155     public static void getAssociatedPnfs() {
156         SimulatorApi.registerExpectation(
157                 new String [] {
158                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
159                         Constants.RegisterToSimulator.pProbe.GET_LOGICAL_LINK
160                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
161     }
162
163     public static void activateServiceInstance(String action) {
164         SimulatorApi.registerExpectation(
165                 new String [] {
166                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
167                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE,
168                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ORCH_REQUEST
169                 }, ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action), SimulatorApi.RegistrationStrategy.APPEND);
170     }
171
172
173     public static void activateDeactivateConfiguration(String orchStatus, String action, String desiredCloudRegionId) {
174         SimulatorApi.registerExpectation(
175                 new String [] {
176                         Constants.RegisterToSimulator.createConfiguration.MSO_ACTIVATE_CONFIGURATION,
177                 }, ImmutableMap.<String, Object>of("<ACTION>",action,"mdt1", desiredCloudRegionId), SimulatorApi.RegistrationStrategy.APPEND);
178     }
179
180     public static void deleteConfiguration(String desiredCloudRegionId) {
181         SimulatorApi.registerExpectation(
182                 new String [] {
183                         Constants.RegisterToSimulator.createConfiguration.MSO_DELETE_CONFIGURATION,
184                         Constants.RegisterToSimulator.createConfiguration.MSO_CREATE_CONFIGURATION_ORCH_REQ
185                 }, ImmutableMap.of("mdt1", desiredCloudRegionId), SimulatorApi.RegistrationStrategy.APPEND);
186     }
187
188     public static void enableDisablePort(String action, String desiredCloudRegionId){
189         SimulatorApi.registerExpectation(
190                 new String [] {
191                         Constants.RegisterToSimulator.createConfiguration.MSO_ACTIVATE_CONFIGURATION,
192                         Constants.RegisterToSimulator.createConfiguration.MSO_ENABLE_DISABLE_PORT,
193                 }, ImmutableMap.<String, Object>of("<ACTION>", action,"mdt1", desiredCloudRegionId), SimulatorApi.RegistrationStrategy.APPEND);
194     }
195
196     public static void addNetwork() {
197         SimulatorApi.registerExpectation(
198                 new String [] {
199                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_Mobility,
200                         Constants.RegisterToSimulator.addNetwork.AAI_GET_TENANTS,
201                         Constants.RegisterToSimulator.addNetwork.AAI_NAMED_QUERY_FOR_VIEW_EDIT,
202                         Constants.RegisterToSimulator.addNetwork.FILTER_SERVICE_INSTANCE_BY_ID,
203                         //Constants.RegisterToSimulator.addNetwork.FILTER_SERVICE_INSTANCE_BY_NAME,
204                         Constants.RegisterToSimulator.addNetwork.GET_SDC_CATALOG_SERVICES_NETWORK,
205
206                 }, ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
207     }
208     public static void msoAddNetwork(String instanceName){
209         SimulatorApi.registerExpectation(
210                 new String [] {
211                     Constants.RegisterToSimulator.addNetwork.MSO_ADD_NETWORK_ORCH_REQ,
212                     Constants.RegisterToSimulator.addNetwork.MSO_ADD_NETWORK
213                 }, ImmutableMap.<String, Object>of("<SERVICE_INSTANCE_NAME>",instanceName), SimulatorApi.RegistrationStrategy.APPEND);
214     }
215     public static void msoAddNetworkError(String instanceName){
216         SimulatorApi.registerExpectation(
217                 new String [] {
218                         Constants.RegisterToSimulator.addNetwork.MSO_ADD_NETWORK_ERROR
219                 }, ImmutableMap.<String, Object>of("<SERVICE_INSTANCE_NAME>",instanceName), SimulatorApi.RegistrationStrategy.APPEND);
220     }
221     public static void activateServiceInstanceError(String action) {
222         SimulatorApi.registerExpectation(
223                 new String []{
224                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
225                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ERROR
226                 } , ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action), SimulatorApi.RegistrationStrategy.APPEND);
227     }
228
229
230     public static void createPolicyConfiguration(boolean isSuccessFlow, String desiredCloudRegionId) {
231         createConfiguration();
232         SimulatorApi.registerExpectation(
233                 new String []{
234                         Constants.RegisterToSimulator.createConfiguration.GET_PNF_INSTANCES,
235                         Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_ONE_INVARIANT_ID
236                 } , ImmutableMap.<String, Object>of("mdt1", desiredCloudRegionId), SimulatorApi.RegistrationStrategy.APPEND);
237         if (isSuccessFlow) {
238             msoCreatePProbeConfiguration();
239         } else {
240             msoCreatePProbeConfigurationError();
241         }
242     }
243
244     public static void deletePolicyConfiguration(boolean isSuccessFlow, String desiredCloudRegionId) {
245         createConfiguration();
246         SimulatorApi.registerExpectation(
247                 new String []{
248                         Constants.RegisterToSimulator.createConfiguration.GET_PNF_INSTANCES,
249                         Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_ONE_INVARIANT_ID,
250                         Constants.RegisterToSimulator.createConfiguration.MSO_DELETE_CONFIGURATION,
251
252                 } , ImmutableMap.<String, Object>of("mdt1", desiredCloudRegionId), SimulatorApi.RegistrationStrategy.APPEND);
253         if (isSuccessFlow) {
254             msoCreatePProbeConfiguration();
255         } else {
256             msoCreatePProbeConfigurationError();
257         }
258     }
259
260
261
262
263     private static void msoCreatePProbeConfiguration() {
264         SimulatorApi.registerExpectation(
265                 new String []{
266                         Constants.RegisterToSimulator.createConfiguration.MSO_CREATE_CONFIGURATION,
267                         Constants.RegisterToSimulator.createConfiguration.MSO_CREATE_CONFIGURATION_ORCH_REQ
268                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
269     }
270
271     private static void msoCreatePProbeConfigurationError() {
272         SimulatorApi.registerExpectation(
273                 new String []{
274                         Constants.RegisterToSimulator.createConfiguration.MSO_CREATE_CONFIGURATION_ERROR
275                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
276     }
277
278     public static void createConfiguration() {
279         createConfiguration("model-version-id=2a2ea15f-07c6-4b89-bfca-e8aba39a34d6&model-invariant-id=a7eac2b3-8444-40ee-92e3-b3359b32445c");
280     }
281
282     public static void createConfiguration(String model) {
283         SimulatorApi.registerExpectation(
284                 new String []{
285                         Constants.RegisterToSimulator.createConfiguration.GET_VNF_INSTANCES,
286                         Constants.RegisterToSimulator.createConfiguration.GET_MODEL_BY_2_INVARIANT_IDS
287                 } , ImmutableMap.of("model-version-id=2a2ea15f-07c6-4b89-bfca-e8aba39a34d6&model-invariant-id=a7eac2b3-8444-40ee-92e3-b3359b32445c", model), SimulatorApi.RegistrationStrategy.APPEND);
288     }
289
290     public static void getNetworkNodeFormData() {
291         SimulatorApi.registerExpectation(
292                 new String []{
293                         Constants.RegisterToSimulator.createConfiguration.GET_TENANTS
294                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
295     }
296
297     public static void createNewServiceInstance(String subscriber) {
298         SimulatorApi.registerExpectation(
299                 new String []{
300                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_FULL_SUBSCRIBES,
301                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SERVICES
302                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
303
304         switch (subscriber) {
305             case "USP VOICE": createNewServiceInstanceUspVoice(); break;
306             case "MSO_1610_ST": createNewServiceInstanceMso1610ST(); break;
307         }
308     }
309
310     private static void createNewServiceInstanceMso1610ST() {
311         SimulatorApi.registerExpectation(
312                 new String []{
313                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_MSO_1610_ST,
314                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_MODELS_BY_SERVICE_TYPE_MSO_1610_ST
315                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
316     }
317
318     private static void createNewServiceInstanceUspVoice() {
319         SimulatorApi.registerExpectation(
320                 new String []{
321                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE,
322                         Constants.RegisterToSimulator.CreateNewServiceInstance.GET_MODELS_BY_SERVICE_TYPE_USP_VOICE
323                 } , ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
324     }
325
326     public static void deployNewServiceInstance(String instanceName) {
327         SimulatorApi.registerExpectation(
328                 new String []{
329                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.SDC_GET_CATALOG,
330                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES,
331                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.MSO_CREATE_SVC_INSTANCE,
332                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.MSO_CREATE_SVC_INSTANCE_ORCH_REQ
333                 } , ImmutableMap.<String, Object>of("<INSTANCE_NAME>", instanceName), SimulatorApi.RegistrationStrategy.APPEND);
334     }
335
336     public static void searchExistingServiceInstanceWithoutModelVerId() {
337         SimulatorApi.registerExpectation(
338                 new String []{
339                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_FIREWALL_MISC,
340                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_NO_MODEL_VER_ID,
341                        // Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_NO_MODEL_VER_ID
342                 } ,  ImmutableMap.<String, Object>of(), SimulatorApi.RegistrationStrategy.APPEND);
343     }
344
345     public static void deleteExistingInstance(String orchStatus, String type) {
346         genericSearchExistingServiceInstance();
347         SimulatorApi.registerExpectation(
348                 new String [] {
349                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_USP_VOICE,
350                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT,
351                         Constants.RegisterToSimulator.CreateNewServiceInstance.deploy.GET_AIC_ZONES
352                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus), SimulatorApi.RegistrationStrategy.APPEND);
353         SimulatorApi.registerExpectationFromPresets(
354                 ImmutableList.of(
355                         new PresetAAIGetTenants(),
356                         new PresetMSODeleteInstanceOrchestrationRequestGet(type),
357                         new PresetSDCGetServiceMetadataGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", "service-Complexservice-aLaCarte-csar.zip"),
358                         new PresetSDCGetServiceToscaModelGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-Complexservice-aLaCarte-csar.zip")),
359                 SimulatorApi.RegistrationStrategy.APPEND);
360     }
361
362     public static void deleteExistingVolumeGroupInstance(String orchStatus) {
363         deleteExistingInstance(orchStatus, "Volume Group");
364         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVolumeGroup(), SimulatorApi.RegistrationStrategy.APPEND);
365     }
366
367     public static void deleteExistingVfModuleInstance(String orchStatus) {
368         deleteExistingInstance(orchStatus, "VF Module");
369         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVfModule(), SimulatorApi.RegistrationStrategy.APPEND);
370     }
371
372     public static void deleteExistingVnfInstance(String orchStatus) {
373         deleteExistingInstance(orchStatus, "Vnf");
374         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteVnf(), SimulatorApi.RegistrationStrategy.APPEND);
375     }
376
377     public static void deleteExistingNetworkInstance(String orchStatus) {
378         deleteExistingInstance(orchStatus, "Network");
379         SimulatorApi.registerExpectationFromPreset(new PresetMSODeleteNetwork(), SimulatorApi.RegistrationStrategy.APPEND);
380     }
381
382     public static void deleteExistingServiceInstance(String orchStatus) {
383         deleteExistingInstance(orchStatus, "Service");
384         SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
385                 new PresetMSODeleteService(),
386                 new PresetAAIPostNamedQueryForViewEdit("3f93c7cb-2fd0-4557-9514-e189b7b04f9d", false)), SimulatorApi.RegistrationStrategy.APPEND);
387     }
388
389     public static void resumeVfModule(String serviceInstanceId, String vnfInstanceId ){
390         BulkRegistration.searchExistingServiceInstance();
391         SimulatorApi.registerExpectationFromPresets(
392                 ImmutableList.of (
393                         new PresetAAIGetTenants(),
394                         new PresetMSOCreateVfModuleInstancePost(serviceInstanceId,vnfInstanceId),
395                         new PresetMSOOrchestrationRequestGet("COMPLETE","c0011670-0e1a-4b74-945d-8bf5aede1d9c",Constants.ViewEdit.VF_MODULE_CREATED_SUCCESSFULLY_TEXT)),
396                 SimulatorApi.RegistrationStrategy.APPEND);
397
398     }
399 }