aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIGetModelsByOwningEntity.java
blob: 41c35b8a5ab16d5745ddd6c1e0f5cae590963a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
package org.onap.simulator.presetGenerator.presets.aai;

import com.google.common.collect.ImmutableMap;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.onap.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
import org.springframework.http.HttpMethod;

public class PresetAAIGetModelsByOwningEntity extends BaseAAIPreset {
    String oeName;

    public PresetAAIGetModelsByOwningEntity(String oeName) {
        this.oeName = oeName;
    }

    @Override
    public HttpMethod getReqMethod() {
        return HttpMethod.GET;
    }

    @Override
    public String getReqPath() {
        return getRootPath() + "/business/owning-entities";
    }

    @Override
    public Map<String, List> getQueryParams() {
        return ImmutableMap.of(
                "owning-entity-id", Collections.singletonList(oeName)
        );
    }

    @Override
    public Object getResponseBody() {
        return "{" +
                "      \"owning-entity\": [" +
                "        {" +
                "          \"owning-entity-id\": \"43b8a85a-0421-4265-9069-117dd6526b8a\"," +
                "          \"owning-entity-name\": \"" + oeName + "\"," +
                "          \"resource-version\": \"1527418700853\"," +
                "          \"relationship-list\": {" +
                "            \"relationship\": [" +
                "              {" +
                "                \"related-to\": \"service-instance\"," +
                "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
                "                \"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\"," +
                "                \"relationship-data\": [" +
                "                  {" +
                "                    \"relationship-key\": \"customer.global-customer-id\"," +
                "                    \"relationship-value\": \"CAR_2020_ER\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-subscription.service-type\"," +
                "                    \"relationship-value\": \"MSO-dev-service-type\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
                "                    \"relationship-value\": \"af9d52f9-13b2-4657-a198-463677f82dc0\"" +
                "                  }" +
                "                ]," +
                "                \"related-to-property\": [" +
                "                  {" +
                "                    \"property-key\": \"service-instance.service-instance-name\"," +
                "                    \"property-value\": \"xbghrftgr_shani\"" +
                "                  }" +
                "                ]" +
                "              }," +
                "              {" +
                "                \"related-to\": \"service-instance\"," +
                "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
                "                \"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\"," +
                "                \"relationship-data\": [" +
                "                  {" +
                "                    \"relationship-key\": \"customer.global-customer-id\"," +
                "                    \"relationship-value\": \"CAR_2020_ER\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-subscription.service-type\"," +
                "                    \"relationship-value\": \"MSO-dev-service-type\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
                "                    \"relationship-value\": \"49769492-5def-4c89-8e73-b236f958fa40\"" +
                "                  }" +
                "                ]," +
                "                \"related-to-property\": [" +
                "                  {" +
                "                    \"property-key\": \"service-instance.service-instance-name\"," +
                "                    \"property-value\": \"fghghfhgf\"" +
                "                  }" +
                "                ]" +
                "              }," +
                "              {" +
                "                \"related-to\": \"service-instance\"," +
                "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
                "                \"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\"," +
                "                \"relationship-data\": [" +
                "                  {" +
                "                    \"relationship-key\": \"customer.global-customer-id\"," +
                "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-subscription.service-type\"," +
                "                    \"relationship-value\": \"vMOG\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
                "                    \"relationship-value\": \"13695dfb-db99-4c2f-905e-fe7bf2fc7b9f\"" +
                "                  }" +
                "                ]," +
                "                \"related-to-property\": [" +
                "                  {" +
                "                    \"property-key\": \"service-instance.service-instance-name\"," +
                "                    \"property-value\": \"FIRSTNET_DEMO\"" +
                "                  }" +
                "                ]" +
                "              }," +
                "              {" +
                "                \"related-to\": \"service-instance\"," +
                "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
                "                \"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\"," +
                "                \"relationship-data\": [" +
                "                  {" +
                "                    \"relationship-key\": \"customer.global-customer-id\"," +
                "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-subscription.service-type\"," +
                "                    \"relationship-value\": \"Emanuel\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
                "                    \"relationship-value\": \"7e4f8130-5dee-47c4-8770-1abc5f5ded83\"" +
                "                  }" +
                "                ]," +
                "                \"related-to-property\": [" +
                "                  {" +
                "                    \"property-key\": \"service-instance.service-instance-name\"," +
                "                    \"property-value\": \"Amir123\"" +
                "                  }" +
                "                ]" +
                "              }," +
                "              {" +
                "                \"related-to\": \"service-instance\"," +
                "                \"relationship-label\": \"org.onap.relationships.inventory.BelongsTo\"," +
                "                \"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\"," +
                "                \"relationship-data\": [" +
                "                  {" +
                "                    \"relationship-key\": \"customer.global-customer-id\"," +
                "                    \"relationship-value\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-subscription.service-type\"," +
                "                    \"relationship-value\": \"Emanuel\"" +
                "                  }," +
                "                  {" +
                "                    \"relationship-key\": \"service-instance.service-instance-id\"," +
                "                    \"relationship-value\": \"d849b312-03f6-4fa3-a923-a469b850ec73\"" +
                "                  }" +
                "                ]," +
                "                \"related-to-property\": [" +
                "                  {" +
                "                    \"property-key\": \"service-instance.service-instance-name\"," +
                "                    \"property-value\": \"edbh54\"" +
                "                  }" +
                "                ]" +
                "              }" +
                "            ]" +
                "          }" +
                "        }" +
                "      ]" +
                "    }";
    }
}