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