diff options
author | 2017-09-20 14:08:19 +0300 | |
---|---|---|
committer | 2017-09-20 14:14:56 +0300 | |
commit | 1ba64a4a45f26e8bdb58e866e540aa58f32e2e52 (patch) | |
tree | dac3ada662bb141fe986526d13b2436032e5012e /vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java | |
parent | cbdd17f586a4914890bd2b26ee91be135568f38c (diff) |
Change management and PNF support
Issue-ID: VID-44, VID-48, VID-49, VID-50, VID-51, VID-52
Change-Id: I83e940aad2e4e294a0927b546c4c08ca8e539a65
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java')
-rw-r--r-- | vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java index 38b670fe5..cb0962869 100644 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java @@ -1,12 +1,17 @@ package org.openecomp.vid.services; import org.ecomp.aai.model.AaiAICZones.AicZones; +import org.openecomp.portalsdk.core.util.SystemProperties; import org.openecomp.vid.aai.*; import org.openecomp.vid.aai.model.AaiGetServicesRequestModel.*; import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; import org.openecomp.vid.model.*; import org.openecomp.vid.roles.RoleValidator; +import org.openecomp.vid.scheduler.SchedulerProperties; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; + +import javax.ws.rs.core.Response; import java.util.List; @@ -37,13 +42,23 @@ public class AaiServiceImpl implements AaiService { String subscriberGlobalId = subscriberResponse.getT().globalCustomerId; for (ServiceSubscription serviceSubscription : subscriberResponse.getT().serviceSubscriptions.serviceSubscription) { String serviceType = serviceSubscription.serviceType; - serviceSubscription.isPermitted = roleProvider.isServicePermitted(subscriberGlobalId,serviceType);; + serviceSubscription.isPermitted = roleProvider.isServicePermitted(subscriberGlobalId,serviceType); } return subscriberResponse; } @Override + public Response getVersionByInvariantId(List<String> modelInvariantId) { + try { + return aaiClient.getVersionByInvariantId(modelInvariantId); + }catch (Exception e){ + e.printStackTrace(); + } + return null; + } + + @Override public AaiResponse getServices(RoleValidator roleValidator) { AaiResponse<GetServicesAAIRespone> subscriberResponse = aaiClient.getServices(); for (org.openecomp.vid.aai.model.AaiGetServicesRequestModel.Service service :subscriberResponse.getT().service){ @@ -62,9 +77,25 @@ public class AaiServiceImpl implements AaiService { return aaiGetTenantsResponse; } - @Override + @Override + public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) { + return aaiClient.getVNFData(globalSubscriberId,serviceType,serviceInstanceId); + } + + @Override + public Response getVNFData(String globalSubscriberId, String serviceType) { + return aaiClient.getVNFData(globalSubscriberId,serviceType); + } + + @Override public AaiResponse getAaiZones() { AaiResponse<AicZones> response = aaiClient.getAllAicZones(); return response; } + + @Override + public AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId) { + AaiResponse<AicZones> response = aaiClient.getAicZoneForPnf(globalCustomerId , serviceType , serviceId); + return response; + } } |