2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.vid.aai;
23 import com.fasterxml.jackson.databind.JsonNode;
25 import java.util.List;
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.PortDetailsTranslator;
32 import org.onap.vid.aai.model.Properties;
33 import org.onap.vid.aai.model.ResourceType;
34 import org.onap.vid.model.SubscriberList;
35 import org.onap.vid.model.probes.ExternalComponentStatus;
38 * Created by Oren on 7/4/17.
40 public interface AaiClientInterface {
42 boolean isNodeTypeExistsByName(String name, ResourceType type);
44 <T> T typedAaiGet(URI path, Class<T> clz);
46 AaiResponse<SubscriberList> getAllSubscribers();
48 AaiResponse getSubscriberData(String subscriberId);
50 AaiResponse getServices();
52 AaiResponse getServicesByOwningEntityId(List<String> owningEntityIds);
54 AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType);
56 AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
58 AaiResponse getAllAicZones();
60 AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
62 AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
64 AaiResponse getVNFData(String globalSubscriberId, String serviceType);
66 AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
68 AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
70 Response getVersionByInvariantId(List<String> modelInvariantId);
72 AaiResponse getServicesByProjectNames(List<String> projectNames);
74 AaiResponse getServiceModelsByDistributionStatus();
76 AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
78 AaiResponse<Pnf> getSpecificPnf(String pnfId);
80 AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId);
82 AaiResponse getLogicalLink(String link);
84 AaiResponse<JsonNode> getCloudRegionAndSourceByPortMirroringConfigurationId(String configurationId);
86 List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID);
88 AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
90 ExternalComponentStatus probeAaiGetAllSubscribers();
92 Response doAaiGet(String uri, boolean xml);
94 String getCloudOwnerByCloudRegionId(String cloudRegionId);
96 GetTenantsResponse getHomingDataByVfModule(String vnfInstanceId, String vfModuleId);
98 void resetCache(String cacheName);
100 Map<String, Properties> getCloudRegionAndTenantByVnfId(String vnfId);