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