vid-automation selenium tests
[vid.git] / vid-automation / src / main / java / org / opencomp / simulator / presetGenerator / presets / aai / PresetAAIGetModelsByOwningEntity.java
1 package org.opencomp.simulator.presetGenerator.presets.aai;
2
3 import com.google.common.collect.ImmutableMap;
4 import org.opencomp.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
5 import org.springframework.http.HttpMethod;
6
7 import java.util.Collections;
8 import java.util.List;
9 import java.util.Map;
10
11 public class PresetAAIGetModelsByOwningEntity extends BaseAAIPreset {
12     String oeName;
13
14     public PresetAAIGetModelsByOwningEntity(String oeName) {
15         this.oeName = oeName;
16     }
17
18     @Override
19     public HttpMethod getReqMethod() {
20         return HttpMethod.GET;
21     }
22
23     @Override
24     public String getReqPath() {
25         return getRootPath() + "/business/owning-entities";
26     }
27
28     @Override
29     public Map<String, List> getQueryParams() {
30         return ImmutableMap.of(
31                 "owning-entity-id", Collections.singletonList(oeName)
32         );
33     }
34
35     @Override
36     public Object getResponseBody() {
37         return "{" +
38                 "      \"owning-entity\": [" +
39                 "        {" +
40                 "          \"owning-entity-id\": \"43b8a85a-0421-4265-9069-117dd6526b8a\"," +
41                 "          \"owning-entity-name\": \"" + oeName + "\"," +
42                 "          \"resource-version\": \"1527418700853\"," +
43                 "          \"relationship-list\": {" +
44                 "            \"relationship\": [" +
45                 "              {" +
46                 "                \"related-to\": \"service-instance\"," +
47                 "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
48                 "                \"related-link\": \"/aai/v12/business/customers/customer/MSO_1610_ST/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/af9d52f9-13b2-4657-a198-463677f82dc0\"," +
49                 "                \"relationship-data\": [" +
50                 "                  {" +
51                 "                    \"relationship-key\": \"customer.global-customer-id\"," +
52                 "                    \"relationship-value\": \"MSO_1610_ST\"" +
53                 "                  }," +
54                 "                  {" +
55                 "                    \"relationship-key\": \"service-subscription.service-type\"," +
56                 "                    \"relationship-value\": \"MSO-dev-service-type\"" +
57                 "                  }," +
58                 "                  {" +
59                 "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
60                 "                    \"relationship-value\": \"af9d52f9-13b2-4657-a198-463677f82dc0\"" +
61                 "                  }" +
62                 "                ]," +
63                 "                \"related-to-property\": [" +
64                 "                  {" +
65                 "                    \"property-key\": \"service-instance.service-instance-name\"," +
66                 "                    \"property-value\": \"xbghrftgr_shani\"" +
67                 "                  }" +
68                 "                ]" +
69                 "              }," +
70                 "              {" +
71                 "                \"related-to\": \"service-instance\"," +
72                 "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
73                 "                \"related-link\": \"/aai/v12/business/customers/customer/MSO_1610_ST/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/49769492-5def-4c89-8e73-b236f958fa40\"," +
74                 "                \"relationship-data\": [" +
75                 "                  {" +
76                 "                    \"relationship-key\": \"customer.global-customer-id\"," +
77                 "                    \"relationship-value\": \"MSO_1610_ST\"" +
78                 "                  }," +
79                 "                  {" +
80                 "                    \"relationship-key\": \"service-subscription.service-type\"," +
81                 "                    \"relationship-value\": \"MSO-dev-service-type\"" +
82                 "                  }," +
83                 "                  {" +
84                 "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
85                 "                    \"relationship-value\": \"49769492-5def-4c89-8e73-b236f958fa40\"" +
86                 "                  }" +
87                 "                ]," +
88                 "                \"related-to-property\": [" +
89                 "                  {" +
90                 "                    \"property-key\": \"service-instance.service-instance-name\"," +
91                 "                    \"property-value\": \"fghghfhgf\"" +
92                 "                  }" +
93                 "                ]" +
94                 "              }," +
95                 "              {" +
96                 "                \"related-to\": \"service-instance\"," +
97                 "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
98                 "                \"related-link\": \"/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/13695dfb-db99-4c2f-905e-fe7bf2fc7b9f\"," +
99                 "                \"relationship-data\": [" +
100                 "                  {" +
101                 "                    \"relationship-key\": \"customer.global-customer-id\"," +
102                 "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
103                 "                  }," +
104                 "                  {" +
105                 "                    \"relationship-key\": \"service-subscription.service-type\"," +
106                 "                    \"relationship-value\": \"vMOG\"" +
107                 "                  }," +
108                 "                  {" +
109                 "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
110                 "                    \"relationship-value\": \"13695dfb-db99-4c2f-905e-fe7bf2fc7b9f\"" +
111                 "                  }" +
112                 "                ]," +
113                 "                \"related-to-property\": [" +
114                 "                  {" +
115                 "                    \"property-key\": \"service-instance.service-instance-name\"," +
116                 "                    \"property-value\": \"FIRSTNET_DEMO\"" +
117                 "                  }" +
118                 "                ]" +
119                 "              }," +
120                 "              {" +
121                 "                \"related-to\": \"service-instance\"," +
122                 "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
123                 "                \"related-link\": \"/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Mobility/service-instances/service-instance/7e4f8130-5dee-47c4-8770-1abc5f5ded83\"," +
124                 "                \"relationship-data\": [" +
125                 "                  {" +
126                 "                    \"relationship-key\": \"customer.global-customer-id\"," +
127                 "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
128                 "                  }," +
129                 "                  {" +
130                 "                    \"relationship-key\": \"service-subscription.service-type\"," +
131                 "                    \"relationship-value\": \"Mobility\"" +
132                 "                  }," +
133                 "                  {" +
134                 "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
135                 "                    \"relationship-value\": \"7e4f8130-5dee-47c4-8770-1abc5f5ded83\"" +
136                 "                  }" +
137                 "                ]," +
138                 "                \"related-to-property\": [" +
139                 "                  {" +
140                 "                    \"property-key\": \"service-instance.service-instance-name\"," +
141                 "                    \"property-value\": \"Amir123\"" +
142                 "                  }" +
143                 "                ]" +
144                 "              }," +
145                 "              {" +
146                 "                \"related-to\": \"service-instance\"," +
147                 "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
148                 "                \"related-link\": \"/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Mobility/service-instances/service-instance/d849b312-03f6-4fa3-a923-a469b850ec73\"," +
149                 "                \"relationship-data\": [" +
150                 "                  {" +
151                 "                    \"relationship-key\": \"customer.global-customer-id\"," +
152                 "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
153                 "                  }," +
154                 "                  {" +
155                 "                    \"relationship-key\": \"service-subscription.service-type\"," +
156                 "                    \"relationship-value\": \"Mobility\"" +
157                 "                  }," +
158                 "                  {" +
159                 "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
160                 "                    \"relationship-value\": \"d849b312-03f6-4fa3-a923-a469b850ec73\"" +
161                 "                  }" +
162                 "                ]," +
163                 "                \"related-to-property\": [" +
164                 "                  {" +
165                 "                    \"property-key\": \"service-instance.service-instance-name\"," +
166                 "                    \"property-value\": \"edbh54\"" +
167                 "                  }" +
168                 "                ]" +
169                 "              }" +
170                 "            ]" +
171                 "          }" +
172                 "        }" +
173                 "      ]" +
174                 "    }";
175     }
176 }