org.onap migration
[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.ImmutableMap;
4 import vid.automation.test.Constants;
5
6 public class BulkRegistration {
7
8     public static void searchExistingServiceInstance() {
9         searchExistingServiceInstance("Active");
10     }
11     public static void searchExistingServiceInstance(String orchStatus) {
12         SimulatorApi.registerExpectation(
13                 new String [] {
14                         Constants.RegisterToSimulator.genericRequest.ECOMP_PORTAL_GET_SESSION_SLOT_CHECK_INTERVAL,
15                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_FULL_SUBSCRIBERS,
16                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SERVICES,
17                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER,
18                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID,
19                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT
20
21                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus));
22     }
23
24     public static void searchExistingServiceInstance2(String orchStatus) {
25         SimulatorApi.registerExpectation(
26                 new String [] {
27                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_FULL_SUBSCRIBERS,
28                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SERVICES,
29                         Constants.RegisterToSimulator.SearchForServiceInstance.GET_SUBSCRIBERS_FOR_CUSTOMER_2,
30                         Constants.RegisterToSimulator.SearchForServiceInstance.FILTER_SERVICE_INSTANCE_BY_ID_2,
31                         Constants.RegisterToSimulator.SearchForServiceInstance.NAMED_QUERY_VIEW_EDIT_2
32                 }, ImmutableMap.<String, Object>of("<ORCH_STATUS>", orchStatus));
33     }
34
35     public static void associatePnf() {
36         SimulatorApi.registerExpectation(
37                 new String [] {
38                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
39                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
40                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP,
41                         Constants.RegisterToSimulator.pProbe.GET_ADD_PNF_RELATIONSHIP_ORCH_REQ
42                 }, ImmutableMap.<String, Object>of());
43     }
44
45     public static void searchPnfError() {
46         SimulatorApi.registerExpectation(
47                 new String [] {
48                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
49                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF_ERROR
50                 }, ImmutableMap.<String, Object>of());
51     }
52     public static void associatePnfError() {
53         SimulatorApi.registerExpectation(
54                 new String [] {
55                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
56                         Constants.RegisterToSimulator.pProbe.GET_SPECIFIC_PNF,
57                         Constants.RegisterToSimulator.pProbe.ADD_PNF_RELATIONSHIP_ERROR
58                 }, ImmutableMap.<String, Object>of());
59     }
60
61     public static void dissociatePnf() {
62         SimulatorApi.registerExpectation(
63                 new String [] {
64                         Constants.RegisterToSimulator.pProbe.REMOVE_PNF_RELATIONSHIP,
65                         Constants.RegisterToSimulator.pProbe.GET_REMOVE_PNF_RELATIONSHIP_ORCH_REQ
66                 }, ImmutableMap.<String, Object>of());
67     }
68
69     public static void getAssociatedPnfs() {
70         SimulatorApi.registerExpectation(
71                 new String [] {
72                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
73                         Constants.RegisterToSimulator.pProbe.GET_LOGICAL_LINK
74                 }, ImmutableMap.<String, Object>of());
75     }
76
77     public static void activateServiceInstance(String action) {
78         SimulatorApi.registerExpectation(
79                 new String [] {
80                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
81                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE,
82                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ORCH_REQUEST
83                 }, ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action));
84     }
85
86     public static void activateServiceInstanceError(String action) {
87         SimulatorApi.registerExpectation(
88                 new String []{
89                         Constants.RegisterToSimulator.pProbe.GET_SERVICE_INSTANCE_WITH_LOGICAL_LINKS,
90                         Constants.RegisterToSimulator.activateDeactivate.ACTIVATE_SERVICE_INSTANCE_ERROR
91                 } , ImmutableMap.<String, Object>of("<ACTIVE_ACTION>", action));
92     }
93
94 }