fdbe418ea418c3fc92960a85b402af550367b194
[vid.git] / vid-app-common / src / main / java / org / onap / vid / aai / AaiClientInterface.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.vid.aai;
22
23 import com.fasterxml.jackson.databind.JsonNode;
24 import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
25 import org.onap.vid.aai.model.AaiGetPnfs.Pnf;
26 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
27 import org.onap.vid.aai.model.CustomQuerySimpleResult;
28 import org.onap.vid.aai.model.PortDetailsTranslator;
29 import org.onap.vid.aai.model.Properties;
30 import org.onap.vid.aai.model.ResourceType;
31 import org.onap.vid.model.SubscriberList;
32 import org.onap.vid.model.probes.ExternalComponentStatus;
33
34 import javax.ws.rs.core.Response;
35 import java.net.URI;
36 import java.util.List;
37 import java.util.Map;
38
39 /**
40  * Created by Oren on 7/4/17.
41  */
42 public interface AaiClientInterface {
43
44     boolean isNodeTypeExistsByName(String name, ResourceType type);
45
46     <T> T typedAaiGet(URI path, Class<T> clz);
47
48     AaiResponse<SubscriberList> getAllSubscribers();
49
50     AaiResponse getSubscriberData(String subscriberId);
51
52     AaiResponse getServices();
53
54     AaiResponse getServicesByOwningEntityId(List<String> owningEntityIds);
55
56     AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType);
57
58     AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
59
60     AaiResponse getAllAicZones();
61
62     AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
63
64     AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
65
66     AaiResponse getVNFData(String globalSubscriberId, String serviceType);
67
68     AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
69
70     AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
71
72     Response getVersionByInvariantId(List<String> modelInvariantId);
73
74     AaiResponse getServicesByProjectNames(List<String> projectNames);
75
76     AaiResponse getServiceModelsByDistributionStatus();
77         
78     AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
79
80     AaiResponse<Pnf> getSpecificPnf(String pnfId);
81
82     AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId);
83
84     AaiResponse getLogicalLink(String link);
85
86     AaiResponse<JsonNode> getCloudRegionAndSourceByPortMirroringConfigurationId(String configurationId);
87
88     List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID);
89
90     AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
91
92     ExternalComponentStatus probeAaiGetAllSubscribers();
93
94     Response doAaiGet(String uri, boolean xml);
95
96     String getCloudOwnerByCloudRegionId(String cloudRegionId);
97
98     GetTenantsResponse getHomingDataByVfModule(String vnfInstanceId, String vfModuleId);
99
100     void resetCache(String cacheName);
101
102     Map<String, Properties> getCloudRegionAndTenantByVnfId(String vnfId);
103 }