Learn to get all model versions sorted from high to low
[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 java.net.URI;
25 import java.util.List;
26 import java.util.Map;
27 import javax.ws.rs.core.Response;
28 import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
29 import org.onap.vid.aai.model.AaiGetPnfs.Pnf;
30 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
31 import org.onap.vid.aai.model.ModelVer;
32 import org.onap.vid.aai.model.OwningEntityResponse;
33 import org.onap.vid.aai.model.PortDetailsTranslator;
34 import org.onap.vid.aai.model.ProjectResponse;
35 import org.onap.vid.aai.model.Properties;
36 import org.onap.vid.aai.model.ResourceType;
37 import org.onap.vid.model.SubscriberList;
38 import org.onap.vid.services.ProbeInterface;
39 import org.springframework.http.HttpMethod;
40
41 /**
42  * Created by Oren on 7/4/17.
43  */
44 public interface AaiClientInterface extends ProbeInterface {
45
46     boolean isNodeTypeExistsByName(String name, ResourceType type);
47
48     <T> T typedAaiGet(URI path, Class<T> clz);
49
50     <T> T typedAaiRest(URI path, Class<T> clz, String payload, HttpMethod method, boolean propagateExceptions);
51
52     AaiResponse<SubscriberList> getAllSubscribers();
53
54     AaiResponse<Services> getSubscriberData(String subscriberId, boolean omitServiceInstances);
55
56     AaiResponse getServices();
57
58     AaiResponse<OwningEntityResponse> getServicesByOwningEntityId(List<String> owningEntityIds);
59
60     AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType);
61
62     AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
63
64     AaiResponse getAllAicZones();
65
66     AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
67
68     AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
69
70     AaiResponse<AaiGetVnfResponse> getVNFData(String globalSubscriberId, String serviceType);
71
72     AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
73
74     AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
75
76     Response getVersionByInvariantId(List<String> modelInvariantId);
77
78     ModelVer getLatestVersionByInvariantId(String modelInvariantId);
79
80     List<ModelVer> getSortedVersionsByInvariantId(String modelInvariantId);
81
82     AaiResponse<ProjectResponse> getServicesByProjectNames(List<String> projectNames);
83
84     AaiResponse getServiceModelsByDistributionStatus();
85
86     AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
87
88     AaiResponse<Pnf> getSpecificPnf(String pnfId);
89
90     AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId);
91
92     AaiResponse getLogicalLink(String link);
93
94     AaiResponse<JsonNode> getCloudRegionAndSourceByPortMirroringConfigurationId(String configurationId);
95
96     List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID);
97
98     AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
99
100     Response doAaiGet(String uri, boolean xml);
101
102     String getCloudOwnerByCloudRegionId(String cloudRegionId);
103
104     GetTenantsResponse getHomingDataByVfModule(String vnfInstanceId, String vfModuleId);
105
106     void resetCache(String cacheName);
107
108     Map<String, Properties> getCloudRegionAndTenantByVnfId(String vnfId);
109
110     AaiResponse<AaiGetVnfResponse> getVnfsByParamsForChangeManagement(String subscriberId, String serviceType, String nfRole, String cloudRegion);
111 }