2 * Copyright 2016-2017 ZTE Corporation.
3 * Copyright 2020 Huawei Corporation.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package org.onap.usecaseui.server.service.lcm.domain.aai;
19 import org.onap.usecaseui.server.bean.sotn.PinterfaceRsp;
20 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAICustomer;
21 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAICustomerRsp;
22 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAIOrchestratorRsp;
23 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAIServiceSubscription;
24 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAISingleOrchestratorRsp;
25 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.SDNCControllerRsp;
26 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.ServiceSubscriptionRsp;
27 import org.onap.usecaseui.server.service.lcm.domain.aai.bean.VimInfoRsp;
30 import okhttp3.RequestBody;
31 import okhttp3.ResponseBody;
32 import retrofit2.Call;
33 import retrofit2.http.Body;
34 import retrofit2.http.DELETE;
35 import retrofit2.http.GET;
36 import retrofit2.http.Headers;
37 import retrofit2.http.PUT;
38 import retrofit2.http.Path;
39 import retrofit2.http.Query;
41 public interface AAIService {
44 "X-TransactionId: 7777",
46 "Authorization: Basic QUFJOkFBSQ==",
47 "Accept: application/json"
49 // @GET("/api/aai-business/v11/customers")
50 @GET("/api/aai-business/v13/customers")
51 Call<AAICustomerRsp> listCustomer();
54 "X-TransactionId: 7777",
56 "Authorization: Basic QUFJOkFBSQ==",
57 "Accept: application/json"
59 @GET("/api/aai-externalSystem/v16/esr-nfvo-list")
60 Call<AAIOrchestratorRsp> listOrchestrator();
63 "X-TransactionId: 7777",
65 "Authorization: Basic QUFJOkFBSQ==",
66 "Accept: application/json"
68 @GET("/api/aai-externalSystem/v16/esr-nfvo-list/esr-nfvo/{nfvo-id}?depth=all")
69 Call<AAISingleOrchestratorRsp> getOrchestrator(@Path("nfvo-id") String nfvoId);
72 "X-TransactionId: 7777",
74 "Authorization: Basic QUFJOkFBSQ==",
75 "Accept: application/json"
77 @PUT("/api/aai-business/v13/customers/customer/{global-customer-id}")
78 Call<ResponseBody> createOrUpdateCustomer(@Path("global-customer-id") String customerId,@Body RequestBody body);
81 "X-TransactionId: 7777",
83 "Authorization: Basic QUFJOkFBSQ==",
84 "Accept: application/json"
86 @DELETE("/api/aai-business/v13//customers/customer/{global-customer-id}")
87 Call<ResponseBody> deleteCustomer(@Path("global-customer-id") String customerId,@Query("resource-version") String resourceVersion);
90 "X-TransactionId: 7777",
92 "Authorization: Basic QUFJOkFBSQ==",
93 "Accept: application/json"
95 @GET("/api/aai-business/v13//customers/customer/{global-customer-id}")
96 Call<AAICustomer> getCustomerById(@Path("global-customer-id") String customerId);
99 "X-TransactionId: 7777",
101 "Authorization: Basic QUFJOkFBSQ==",
102 "Accept: application/json"
104 // @GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
105 @GET("/api/aai-business/v16/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
106 Call<ResponseBody> listServiceInstances(@Path("global-customer-id") String customerId, @Path("service-type") String serviceType);
109 "X-TransactionId: 7777",
111 "Authorization: Basic QUFJOkFBSQ==",
112 "Accept: application/json"
114 // @GET("/cloud-infrastructure/cloud-regions")
115 @GET("/api/aai-cloudInfrastructure/v11/cloud-regions")
116 Call<VimInfoRsp> listVimInfo();
119 "X-TransactionId: 7777",
121 "Authorization: Basic QUFJOkFBSQ==",
122 "Accept: application/json"
124 // @GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
125 @GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
126 Call<ServiceSubscriptionRsp> listServiceSubscriptions(@Path("global-customer-id") String customerId);
129 "X-TransactionId: 7777",
131 "Authorization: Basic QUFJOkFBSQ==",
132 "Accept: application/json"
134 //@GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
135 @PUT("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}")
136 Call<ResponseBody> createOrUpdateServiceType(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType,@Body RequestBody body);
139 "X-TransactionId: 7777",
141 "Authorization: Basic QUFJOkFBSQ==",
142 "Accept: application/json"
144 //@GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
145 @DELETE("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}")
146 Call<ResponseBody> deleteServiceType(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType,@Query("resource-version") String resourceVersion);
149 "X-TransactionId: 7777",
151 "Authorization: Basic QUFJOkFBSQ==",
152 "Accept: application/json"
154 //@GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
155 @GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}")
156 Call<AAIServiceSubscription> getServiceTypeById(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType);
159 "X-TransactionId: 7777",
161 "Authorization: Basic QUFJOkFBSQ==",
162 "Accept: application/json"
164 @GET("/api/aai-externalSystem/v11/esr-thirdparty-sdnc-list")
165 Call<SDNCControllerRsp> listSdncControllers();
168 "X-TransactionId: 7777",
170 "Authorization: Basic QUFJOkFBSQ==",
171 "Accept: application/json"
173 @GET("/api/aai-business/v11/customers/customer/{customerId}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{serviceId}")
174 Call<ResponseBody> getAAIServiceInstance(@Path("customerId") String customerId,@Path("service-type") String seviceType,@Path("serviceId") String serviceId);
177 "X-TransactionId: 7777",
179 "Authorization: Basic QUFJOkFBSQ==",
180 "Accept: application/json"
182 @GET("/api/aai-network/v14/network-resources")
183 Call<ResponseBody> listNetWorkResources();
186 "X-TransactionId: 7777",
188 "Authorization: Basic QUFJOkFBSQ==",
189 "Accept: application/json"
191 @GET("/api/aai-network/v14/pnfs/pnf/{pnfName}/p-interfaces")
192 Call<PinterfaceRsp> getPinterfaceByPnfName(@Path("pnfName") String pnfName);
195 "X-TransactionId: 9999",
197 "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
198 "Accept: application/json"
200 @GET("/aai/v24/network/logical-links")
201 Call<ResponseBody> getLogicalLinks();
204 "X-TransactionId: 7777",
206 "Authorization: Basic QUFJOkFBSQ==",
207 "Accept: application/json"
209 @GET("/api/aai-network/v14/logical-links/logical-link/{link-name}")
210 Call<ResponseBody> getSpecificLogicalLink(@Path("link-name") String linkName);
213 "X-TransactionId: 7777",
215 "Authorization: Basic QUFJOkFBSQ==",
216 "Accept: application/json"
218 @PUT("/api/aai-network/v14/network-resources/network-resource/{networkId}")
219 Call<ResponseBody> createTopoNetwork(@Body RequestBody body,@Path("networkId") String networkId);
222 "X-TransactionId: 7777",
224 "Authorization: Basic QUFJOkFBSQ==",
225 "Accept: application/json"
227 @PUT("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
228 Call<ResponseBody> createHostUrl(@Body RequestBody body,@Path("aai-id") String aaiId);
231 "X-TransactionId: 7777",
233 "Authorization: Basic QUFJOkFBSQ==",
234 "Accept: application/json"
236 @GET("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
237 Call<ResponseBody> getExtAaiId(@Path("aai-id") String aaiId);
240 "X-TransactionId: 7777",
242 "Authorization: Basic QUFJOkFBSQ==",
243 "Accept: application/json"
245 @GET("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}/esr-system-info")
246 Call<ResponseBody> getHostUrl(@Path("aai-id") String aaiId);
249 "X-TransactionId: 7777",
251 "Authorization: Basic QUFJOkFBSQ==",
252 "Accept: application/json"
254 @PUT("/api/aai-network/v14/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{tp-id}")
255 Call<ResponseBody> createTerminationPoint(@Body RequestBody body,@Path("pnfName") String pnfName,@Path("tp-id") String tpId);
258 "X-TransactionId: 7777",
260 "Authorization: Basic QUFJOkFBSQ==",
261 "Accept: application/json"
263 @PUT("/api/aai-network/v14/pnfs/pnf/{pnfname}")
264 Call<ResponseBody> createPnf(@Body RequestBody body,@Path("pnfname") String pnfname);
267 "X-TransactionId: 7777",
269 "Authorization: Basic QUFJOkFBSQ==",
270 "Accept: application/json"
272 @PUT("/api/aai-network/v14/logical-links/logical-link/{linkName}")
273 Call<ResponseBody> createLink(@Body RequestBody body,@Path("linkName") String linkName);
276 "X-TransactionId: 7777",
278 "Authorization: Basic QUFJOkFBSQ==",
279 "Accept: application/json"
281 @DELETE("/api/aai-network/v14/logical-links/logical-link/{linkName}")
282 Call<ResponseBody> deleteLink(@Path("linkName") String linkName,@Query("resource-version") String resourceVersion);
285 "X-TransactionId: 7777",
287 "Authorization: Basic QUFJOkFBSQ==",
288 "Accept: application/json"
290 @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
291 Call<ResponseBody> getServiceInstances(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType);
294 "X-TransactionId: 7777",
296 "Authorization: Basic QUFJOkFBSQ==",
297 "Accept: application/json"
299 @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
300 Call<ResponseBody> serviceInstaneInfo(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,@Query("service-instance-id") String serviceInstanceId);
303 "X-TransactionId: 7777",
305 "Authorization: Basic QUFJOkFBSQ==",
306 "Accept: application/json"
308 @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}/allotted-resources")
309 Call<ResponseBody> getAllottedResources(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,@Path("service-instance-id") String serviceInstanceId);
312 "X-TransactionId: 9999",
314 "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
315 "Accept: application/json"
317 @GET("/aai/v24/network/pnfs")
318 Call<ResponseBody> getPnfInfo(@Query("pnfName") String pnfName);
321 "X-TransactionId: 9999",
323 "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
324 "Accept: application/json"
326 @GET("/aai/v24/network/connectivities")
327 Call<ResponseBody> getConnectivityInfo(@Query("connectivity-id") String connectivityId);
330 "X-TransactionId: 9999",
332 "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
333 "Accept: application/json"
335 @GET("/aai/v24/network/vpn-bindings")
336 Call<ResponseBody> getVpnBindingInfo(@Query("vpn-id") String vpnId);
339 "X-TransactionId: 9999",
341 "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
342 "Accept: application/json"
344 @GET("/aai/v24/network/network-routes")
345 Call<ResponseBody> getNetworkRouteInfo(@Query("route-id") String routeId);
348 "X-TransactionId: 7777",
350 "Authorization: Basic QUFJOkFBSQ==",
351 "Accept: application/json"
353 @GET("/api/aai-network/v14/vpn-bindings")
354 Call<ResponseBody> getPinterfaceByVpnId(@Query("vpn-id") String vpnId);
357 "X-TransactionId: 7777",
359 "Authorization: Basic QUFJOkFBSQ==",
360 "Accept: application/json"
362 @DELETE("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
363 Call<ResponseBody> deleteExtNetwork(@Path("aai-id") String aaiId,@Query("resource-version") String resourceVersion);
367 "X-TransactionId: 7777",
369 "Authorization: Basic QUFJOkFBSQ==",
370 "Accept: application/json"
372 @PUT("/api/aai-query/v19?format=resource")
373 Call<ResponseBody> querynNetworkResourceList(@Body RequestBody body);
375 "X-TransactionId: 7777",
377 "Authorization: Basic QUFJOkFBSQ==",
378 "Accept: application/json"
380 @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}")
381 Call<ResponseBody> getServiceInstancesForEdge(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,
382 @Path("service-instance-id") String serviceinstanceid);
385 "X-TransactionId: 7777",
387 "Authorization: Basic QUFJOkFBSQ==",
388 "Accept: application/json"
390 @GET("/api/aai-network/v14/connectivities/connectivity")
391 Call<ResponseBody> getConnectivityInformation(@Query("connectivity-id") String connectivityId);
394 "X-TransactionId: 7777",
396 "Authorization: Basic QUFJOkFBSQ==",
397 "Accept: application/json"
399 @GET("/api/aai-network/v14/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{tp-id}")
400 Call<ResponseBody> getTerminationPoint(@Path("pnfName") String pnfName,@Path("tp-id") String tpId);
403 "X-TransactionId: 7777",
405 "Authorization: Basic QUFJOkFBSQ==",
406 "Accept: application/json"
408 @GET("/api/aai-business/v16/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}/allotted-resources/allotted-resource/{allotted-resource-id}")
409 Call<ResponseBody> getAllotedResourceFor5G(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,
410 @Path("service-instance-id") String serviceinstanceid,@Path("allotted-resource-id") String allottedResourceId);
412 "X-TransactionId: 7777",
414 "Authorization: Basic QUFJOkFBSQ==",
415 "Accept: application/json"
417 @GET("/api/aai-network/v14/site-resources/site-resource/{site-resource-id}")
418 Call<ResponseBody> getSiteResourceInfo(@Path("site-resource-id") String siteResourceId);
421 "X-TransactionId: 7777",
423 "Authorization: Basic QUFJOkFBSQ==",
424 "Accept: application/json"
426 @GET("/api/aai-cloudInfrastructure/v14/complexes/complex/{complex-id}")
427 Call<ResponseBody> getComplexObject(@Path("complex-id") String complexId);
430 "X-TransactionId: 7777",
432 "Authorization: Basic QUFJOkFBSQ==",
433 "Accept: application/json"
436 @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
437 Call<ResponseBody> getAllServiceInformation(@Path("global-customer-id") String customerId, @Path("service-type") String serviceType);
439 // "X-TransactionId: 7777",
440 // "X-FromAppId: uui",
441 // "Authorization: Basic QUFJOkFBSQ==",
442 // "Accept: application/json"
444 // @GET("/api/aai-network/v14/pnfs/pnf/{pnfName}")
445 // Call<ResponseBody> getPnfInfo(@Path("pnfName") String pnfName);
448 "X-TransactionId: 7777",
450 "Authorization: Basic QUFJOkFBSQ==",
451 "Accept: application/json"
454 @GET("/api/aai-business/v13/customers/customer/{global-customer-id}/service-subscriptions")
455 Call<ResponseBody> getServiceSubscription(@Path("global-customer-id") String customerID);
458 "X-TransactionId: 7777",
460 "Authorization: Basic QUFJOkFBSQ==",
461 "Accept: application/json"
464 @GET("/aai/v19/network/generic-vnfs/generic-vnf/{vnf-id}")
465 Call<ResponseBody> getVNFsDetail(@Path("vnf-id") String vnfId);
468 "X-TransactionId: 7777",
470 "Authorization: Basic QUFJOkFBSQ==",
471 "Accept: application/json"
474 @GET("/aai/v19/network/unis/uni/{uni-id}")
475 Call<ResponseBody> getUNIInfo(@Path("uni-id") String uniId);