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.ModelVer;
32 import org.onap.vid.aai.model.OwningEntityResponse;
33 import org.onap.vid.aai.model.PortDetailsTranslator;
34 import org.onap.vid.aai.model.Properties;
35 import org.onap.vid.aai.model.ResourceType;
36 import org.onap.vid.model.SubscriberList;
37 import org.onap.vid.services.ProbeInterface;
38 import org.springframework.http.HttpMethod;
41 * Created by Oren on 7/4/17.
43 public interface AaiClientInterface extends ProbeInterface {
45 boolean isNodeTypeExistsByName(String name, ResourceType type);
47 <T> T typedAaiGet(URI path, Class<T> clz);
49 <T> T typedAaiRest(URI path, Class<T> clz, String payload, HttpMethod method, boolean propagateExceptions);
51 AaiResponse<SubscriberList> getAllSubscribers();
53 AaiResponse<Services> getSubscriberData(String subscriberId, boolean omitServiceInstances);
55 AaiResponse getServices();
57 AaiResponse<OwningEntityResponse> getServicesByOwningEntityId(List<String> owningEntityIds);
59 AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType);
61 AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
63 AaiResponse getAllAicZones();
65 AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
67 AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
69 AaiResponse<AaiGetVnfResponse> getVNFData(String globalSubscriberId, String serviceType);
71 AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
73 AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
75 Response getVersionByInvariantId(List<String> modelInvariantId);
77 ModelVer getLatestVersionByInvariantId(String modelInvariantId);
79 AaiResponse getServicesByProjectNames(List<String> projectNames);
81 AaiResponse getServiceModelsByDistributionStatus();
83 AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
85 AaiResponse<Pnf> getSpecificPnf(String pnfId);
87 AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId);
89 AaiResponse getLogicalLink(String link);
91 AaiResponse<JsonNode> getCloudRegionAndSourceByPortMirroringConfigurationId(String configurationId);
93 List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID);
95 AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
97 Response doAaiGet(String uri, boolean xml);
99 String getCloudOwnerByCloudRegionId(String cloudRegionId);
101 GetTenantsResponse getHomingDataByVfModule(String vnfInstanceId, String vfModuleId);
103 void resetCache(String cacheName);
105 Map<String, Properties> getCloudRegionAndTenantByVnfId(String vnfId);
107 AaiResponse<AaiGetVnfResponse> getVnfsByParamsForChangeManagement(String subscriberId, String serviceType, String nfRole, String cloudRegion);