diff options
author | Rich Tabedzki <richard.tabedzki@att.com> | 2017-08-10 14:03:15 +0000 |
---|---|---|
committer | Rich Tabedzki <richard.tabedzki@att.com> | 2017-08-10 14:08:24 +0000 |
commit | 8c5e6335b73edd047e9f796962ced37eee5051f2 (patch) | |
tree | b0869e10cc1be8ff989133b4609961d305b939b2 /aai-service/provider/src/main/java | |
parent | 7aeb6339da8ab2bd346655438b65fa4a413c7405 (diff) |
[SDNC-30] summary
Updated code to use the latest AAI data model and latest XSD model version
Change-Id: I0dc536b543c47d363c99db1fe581361fe64db317
Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
Diffstat (limited to 'aai-service/provider/src/main/java')
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIClient.java) | 25 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIDeclarations.java) | 334 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIExecutorInterface.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIExecutorInterface.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIRequest.java) | 46 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIService.java) | 142 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceActivator.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceException.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceException.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceUtils.java | 340 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAITrinityService.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAITrinityService.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CloudRegionRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CloudRegionRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CustomQueryRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CustomQueryRequest.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/EchoRequest.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericQueryRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericQueryRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericRequest.java) | 4 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericVnfRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericVnfRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java) | 54 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java) | 46 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LInterfaceRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LInterfaceRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LagInterfacePnfRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LagInterfacePnfRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NamedQueryRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NodesQueryRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NodesQueryRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfacePnfRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfacePnfRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfaceRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfaceRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PathRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PathRequest.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PhysicalLinkRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PhysicalLinkRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/RelationshipRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SelfLinkRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SelfLinkRequest.java) | 10 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SubInterfaceRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SubInterfaceRequest.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/UpdateRequest.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/UpdateRequest.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/AAIDatum.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/AAIDatum.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/EchoResponse.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/EchoResponse.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ErrorResponse.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ErrorResponse.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/RequestError.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/RequestError.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResourceVersion.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResourceVersion.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessage.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessage.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessages.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessages.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ServiceException.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ServiceException.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/SubInterface.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/SubInterface.java) | 4 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/Variables.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/Variables.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/KeyDatum.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/KeyDatum.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/NotifyEvent.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/NotifyEvent.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Flavor.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Flavor.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Host.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Host.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Image.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Image.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/IpAddress.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/IpAddress.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Relationship.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Relationship.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipDatum.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipDatum.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipList.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipList.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/VServer.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/VServer.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryRequestData.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryRequestData.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryResultList.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryResultList.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilter.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilter.java) | 8 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilters.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilters.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQuery.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQuery.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQueryData.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQueryData.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/QueryParameters.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/QueryParameters.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/Results.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/Results.java) | 2 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Action.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Action.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/ActionDatum.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/ActionDatum.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Update.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Update.java) | 0 | ||||
-rw-r--r-- | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/UpdateNodeKey.java (renamed from aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/UpdateNodeKey.java) | 0 |
61 files changed, 667 insertions, 372 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIClient.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java index ba5ef587e..4d836b40a 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIClient.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java @@ -22,36 +22,17 @@ package org.onap.ccsdk.sli.adaptors.aai; import java.io.IOException; +import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Map; +import org.openecomp.aai.inventory.v11.*; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; import org.onap.ccsdk.sli.core.sli.SvcLogicResource; import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus; -import org.openecomp.aai.inventory.v10.AvailabilityZone; -import org.openecomp.aai.inventory.v10.Complex; -import org.openecomp.aai.inventory.v10.CtagPool; -import org.openecomp.aai.inventory.v10.DvsSwitch; -import org.openecomp.aai.inventory.v10.GenericVnf; -import org.openecomp.aai.inventory.v10.L3Network; -import org.openecomp.aai.inventory.v10.OamNetwork; -import org.openecomp.aai.inventory.v10.PInterface; -import org.openecomp.aai.inventory.v10.PhysicalLink; -import org.openecomp.aai.inventory.v10.Pserver; -import org.openecomp.aai.inventory.v10.SearchResults; -import org.openecomp.aai.inventory.v10.Service; -import org.openecomp.aai.inventory.v10.ServiceInstance; -import org.openecomp.aai.inventory.v10.SitePairSet; -import org.openecomp.aai.inventory.v10.Tenant; -import org.openecomp.aai.inventory.v10.Vce; -import org.openecomp.aai.inventory.v10.VnfImage; -import org.openecomp.aai.inventory.v10.Vpe; -import org.openecomp.aai.inventory.v10.VplsPe; -import org.openecomp.aai.inventory.v10.VpnBinding; -import org.openecomp.aai.inventory.v10.Vserver; import org.onap.ccsdk.sli.adaptors.aai.data.notify.NotifyEvent; import org.onap.ccsdk.sli.adaptors.aai.data.v1507.VServer; @@ -216,5 +197,7 @@ public interface AAIClient extends SvcLogicResource, SvcLogicJavaPlugin { public void logKeyError(String keys); public QueryStatus processResponseData(String rv, String resource, AAIRequest request, String prefix, SvcLogicContext ctx, HashMap<String, String> nameValues, String modifier) throws JsonParseException, JsonMappingException, IOException, AAIServiceException ; + public String getPathTemplateForResource(String resoourceName, String join, SvcLogicContext ctx) throws MalformedURLException; + public boolean isDeprecatedFormat(String resource, HashMap<String, String> nameValues); } diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java index 3ba453d36..73c2eebbf 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIDeclarations.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java @@ -48,23 +48,23 @@ import org.apache.commons.lang.StringUtils; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus; -import org.openecomp.aai.inventory.v10.GenericVnf; -import org.openecomp.aai.inventory.v10.InventoryResponseItem; -import org.openecomp.aai.inventory.v10.InventoryResponseItems; -import org.openecomp.aai.inventory.v10.L3Network; -import org.openecomp.aai.inventory.v10.LogicalLink; -import org.openecomp.aai.inventory.v10.Metadata; -import org.openecomp.aai.inventory.v10.Metadatum; -import org.openecomp.aai.inventory.v10.Pnf; -import org.openecomp.aai.inventory.v10.Relationship; -import org.openecomp.aai.inventory.v10.RelationshipData; -import org.openecomp.aai.inventory.v10.RelationshipList; -import org.openecomp.aai.inventory.v10.ResultData; -import org.openecomp.aai.inventory.v10.SearchResults; -import org.openecomp.aai.inventory.v10.ServiceInstance; -import org.openecomp.aai.inventory.v10.Vlan; -import org.openecomp.aai.inventory.v10.Vlans; -import org.openecomp.aai.inventory.v10.Vserver; +import org.openecomp.aai.inventory.v11.GenericVnf; +import org.openecomp.aai.inventory.v11.InventoryResponseItem; +import org.openecomp.aai.inventory.v11.InventoryResponseItems; +import org.openecomp.aai.inventory.v11.L3Network; +import org.openecomp.aai.inventory.v11.LogicalLink; +import org.openecomp.aai.inventory.v11.Metadata; +import org.openecomp.aai.inventory.v11.Metadatum; +import org.openecomp.aai.inventory.v11.Pnf; +import org.openecomp.aai.inventory.v11.Relationship; +import org.openecomp.aai.inventory.v11.RelationshipData; +import org.openecomp.aai.inventory.v11.RelationshipList; +import org.openecomp.aai.inventory.v11.ResultData; +import org.openecomp.aai.inventory.v11.SearchResults; +import org.openecomp.aai.inventory.v11.ServiceInstance; +import org.openecomp.aai.inventory.v11.Vlan; +import org.openecomp.aai.inventory.v11.Vlans; +import org.openecomp.aai.inventory.v11.Vserver; import org.onap.ccsdk.sli.adaptors.aai.AAIService.AAIRequestExecutor; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; import org.onap.ccsdk.sli.adaptors.aai.query.FormattedQueryResultList; @@ -148,10 +148,10 @@ public abstract class AAIDeclarations implements AAIClient { String vnfId = null; String vnfName = null; - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); getLogger().debug("key = "+ nameValues.toString()); - if(!checkOldFormat(resource, nameValues)) { + if(!AAIServiceUtils.isValidFormat(resource, nameValues)) { ctx.setAttribute(String.format("%s.error.message", prefix), String.format("Resource %s is not supported. Key string contains invaid identifiers", resource)); return QueryStatus.FAILURE; } @@ -392,37 +392,6 @@ public abstract class AAIDeclarations implements AAIClient { // return QueryStatus.SUCCESS; } - private boolean checkOldFormat(String resource, HashMap<String, String> nameValues) { - - switch(resource){ - case "formatted-query": - case "generic-query": - case "named-query": - case "nodes-query": - case "linterface": - case "l2-bridge-sbg": - case "l2-bridge-bgf": - case "echo": - case "test": - return true; - } - if(resource.contains(":")) { - resource = resource.substring(0, resource.indexOf(":")); - } - - Set<String> keys = nameValues.keySet(); - for(String key : keys) { - if(!key.contains(".")) { - if("depth".equals(key) || "related-to".equals(key) || "related_to".equals(key)) - continue; - else { - getLogger().warn(String.format("key %s is incompatible with resource type '%s'", key, resource)); - return false; - } - } - } - return true; - } public void writeMap(Map<String, Object> properties, String prefix, SvcLogicContext ctx) { Set<String> mapKeys = properties.keySet(); @@ -468,9 +437,9 @@ public abstract class AAIDeclarations implements AAIClient { throws SvcLogicException { getLogger().debug("AAIService.save\tresource="+resource); - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); - if(!checkOldFormat(resource, nameValues)) { + if(!AAIServiceUtils.isValidFormat(resource, nameValues)) { ctx.setAttribute(String.format("%s.error.message", prefix), String.format("Resource %s is not supported. Key string contains invaid identifiers", resource)); return QueryStatus.FAILURE; } @@ -607,9 +576,9 @@ public abstract class AAIDeclarations implements AAIClient { public QueryStatus update(String resource, String key, Map<String, String> params, String prefix, SvcLogicContext ctx) throws SvcLogicException { resource = resource.toLowerCase(); - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); getLogger().debug("key = "+ Arrays.toString(nameValues.entrySet().toArray())); - if(!checkOldFormat(resource, nameValues)) { + if(!AAIServiceUtils.isValidFormat(resource, nameValues)) { ctx.setAttribute(String.format("%s.error.message", prefix), String.format("Resource %s is not supported. Key string contains invaid identifiers", resource)); return QueryStatus.FAILURE; } @@ -668,10 +637,10 @@ public abstract class AAIDeclarations implements AAIClient { @Override public QueryStatus delete(String resource, String key, SvcLogicContext ctx) throws SvcLogicException { getLogger().debug("AAIService.delete\tresource="+resource); - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); getLogger().debug("key = "+ Arrays.toString(nameValues.entrySet().toArray())); - if(!checkOldFormat(resource, nameValues)) { + if(!AAIServiceUtils.isValidFormat(resource, nameValues)) { ctx.setAttribute(String.format("%s.error.message", "aaiData"), String.format("Resource %s is not supported. Key string contains invaid identifiers", resource)); return QueryStatus.FAILURE; } @@ -824,7 +793,7 @@ public abstract class AAIDeclarations implements AAIClient { QueryStatus retval = QueryStatus.SUCCESS; String modifier = null; - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); if(resource.contains(":")) { modifier = resource.split(":")[1]; } @@ -922,7 +891,7 @@ public abstract class AAIDeclarations implements AAIClient { response = rDatum; } - if("formatted-query".equals(resource)) { + if("formatted-query".equals(resource) || "custom-query".equals(resource)) { FormattedQueryResultList rd = FormattedQueryResultList.class.cast(response); List<Results> iRIlist = rd.getResults(); if(iRIlist == null || iRIlist.isEmpty()) { @@ -930,6 +899,20 @@ public abstract class AAIDeclarations implements AAIClient { } } + // process relationship list + // this is a temporary soluton to address the realationship handling changes added in Release 17.07 + try { + Class<?> clazz = response.getClass(); + Method getter = clazz.getMethod("getRelationshipList"); + Object obj = getter.invoke(response); + if(obj != null && obj instanceof RelationshipList) { + RelationshipList list = RelationshipList.class.cast(obj); + AAIServiceUtils.populateRelationshipDataFromPath(list); + } + } catch(Exception exc) { + getLogger().debug("Retrofiting relationship data: " + exc.getMessage()); + } + String preFix = null; if(prefix == null || prefix.isEmpty()) { preFix = ""; @@ -967,7 +950,6 @@ public abstract class AAIDeclarations implements AAIClient { if(value instanceof ArrayList) { ArrayList<?> array = ArrayList.class.cast(value); for(int i = 0; i < array.size(); i++) { -// ctx.setAttribute(String.format("%s%s[%d]", preFix, theKey, i), array.get(i).toString()); writeList(array, String.format("%s.%s", prefix, theKey), ctx); } continue; @@ -1099,13 +1081,13 @@ public abstract class AAIDeclarations implements AAIClient { throw new SvcLogicException("Method AAIService.reserve() has not been implemented yet"); } - private QueryStatus newModelSave(String resource, boolean force, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx) { + private QueryStatus newModelSave(String resource, boolean force, String key, Map<String, String> params, String prefix, SvcLogicContext ctx) { getLogger().debug("Executing newModelSave for resource : " + resource); - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); try { ArrayList<String> subResources = new ArrayList<String>(); - Set<String> set = parms.keySet(); + Set<String> set = params.keySet(); Map<String, Method> setters = new HashMap<String, Method>(); Map<String, Method> getters = new HashMap<String, Method>(); @@ -1120,14 +1102,13 @@ public abstract class AAIDeclarations implements AAIClient { for(Annotation annotation : annotations) { Class<? extends Annotation> anotationType = annotation.annotationType(); String annotationName = anotationType.getName(); -// if("com.fasterxml.jackson.annotation.JsonPropertyOrder".equals(annotationName)){ // 2. find string property setters and getters for the lists if("javax.xml.bind.annotation.XmlType".equals(annotationName)){ XmlType order = (XmlType)annotation; String[] values = order.propOrder(); for(String value : values) { - String id = camelCaseToDashedString(value); + String id = AAIServiceUtils.camelCaseToDashedString(value); Field field = resourceClass.getDeclaredField(value); Class<?> type = field.getType(); Method setter = null; @@ -1137,17 +1118,17 @@ public abstract class AAIDeclarations implements AAIClient { try { setter.setAccessible(true); Object arglist[] = new Object[1]; - arglist[0] = parms.get(id); + arglist[0] = params.get(id); if(arglist[0] != null) { if(!type.getName().equals("java.lang.String")) { // getLogger().debug(String.format("Processing %s with parameter %s", types[0].getName(), value)); if("boolean".equals(type.getName())) { - arglist[0] = valueOf(Boolean.class, parms.get(id)); + arglist[0] = valueOf(Boolean.class, params.get(id)); } else if("long".equals(type.getName())) { - arglist[0] = valueOf(Long.class, parms.get(id)); + arglist[0] = valueOf(Long.class, params.get(id)); } else { - arglist[0] = valueOf(type, parms.get(id)); + arglist[0] = valueOf(type, params.get(id)); } } Object o = setter.invoke(instance, arglist); @@ -1161,11 +1142,11 @@ public abstract class AAIDeclarations implements AAIClient { } else if(type.getName().equals("java.util.List")) { List<String> newValues = new ArrayList<String>(); String length = id+"_length"; - if(!parms.isEmpty() && parms.containsKey(length)) { - String tmp = parms.get(length).toString(); + if(!params.isEmpty() && params.containsKey(length)) { + String tmp = params.get(length).toString(); int count = Integer.valueOf(tmp); for(int i=0; i<count; i++) { - String tmpValue = parms.get(String.format("%s[%d]", id, i)); + String tmpValue = params.get(String.format("%s[%d]", id, i)); newValues.add(tmpValue); } if(!newValues.isEmpty()) { @@ -1208,7 +1189,7 @@ public abstract class AAIDeclarations implements AAIClient { Set<String> metadataKeys = new TreeSet<String>(); for(String attribute : set) { - String value = parms.get(attribute); + String value = params.get(attribute); if(attribute.startsWith("relationship-list")) { relationshipKeys.add(attribute); } else if(attribute.startsWith("vlans")) { @@ -1219,7 +1200,7 @@ public abstract class AAIDeclarations implements AAIClient { } // 3. find list property getters for(String attribute : set) { - String value = parms.get(attribute); + String value = params.get(attribute); Method method = getters.get(attribute); if(method != null) { try { @@ -1250,7 +1231,13 @@ public abstract class AAIDeclarations implements AAIClient { if( (subResources.contains("relationship-list") || subResources.contains("relationshipList")) && !relationshipKeys.isEmpty()) { RelationshipList relationshipList = null; Object obj = null; - Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + Method getRelationshipListMethod = null; + try { + getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + } catch(Exception exc) { + getLogger().debug("Retrofiting relationship data: " + exc.getMessage()); + } + if(getRelationshipListMethod != null){ try { getRelationshipListMethod.setAccessible(true); @@ -1281,35 +1268,41 @@ public abstract class AAIDeclarations implements AAIClient { int i = 0; while(true){ - int j = 0; String searchKey = "relationship-list.relationship[" + i + "].related-to"; - if(!parms.containsKey(searchKey)) + if(!params.containsKey(searchKey)) break; + int j = 0; + String relatedTo = params.get(searchKey); + String relatedLinkKey = "relationship-list.relationship[" + i + "].related-link"; + String relatedLink = null; + if(params.containsKey(relatedLinkKey)) { + relatedLink = params.get(relatedLinkKey); + } Relationship relationship = new Relationship(); relationships.add(relationship); - - String relatedTo = parms.get(searchKey); relationship.setRelatedTo(relatedTo); - - List<RelationshipData> relData = relationship.getRelationshipData(); -// if(relData == null) { -// relData = new LinkedList<RelationshipData>(); -// relationship.setRelationshipData(relData); -// } + if(relatedLink != null) { + relationship.setRelatedLink(relatedLink); + } else { +// List<RelationshipData> relData = relationship.getRelationshipData(); + Map<String, String> relParams = new HashMap<String, String>(); while(true) { String searchRelationshipKey = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-key"; String searchRelationshipValue = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-value"; - if(!parms.containsKey(searchRelationshipKey)) + if(!params.containsKey(searchRelationshipKey)) break; - RelationshipData relDatum = new RelationshipData(); - relDatum.setRelationshipKey(parms.get(searchRelationshipKey)); - relDatum.setRelationshipValue(parms.get(searchRelationshipValue)); - relData.add(relDatum); + relParams.put(params.get(searchRelationshipKey), params.get(searchRelationshipValue)); j++; } - + AAIRequest rlRequest = AAIRequest.createRequest(relatedTo, relParams); + for(String key1 : relParams.keySet()) { + rlRequest.addRequestProperty(key1, relParams.get(key1)); + } + String path = rlRequest.updatePathDataValues(null); + relationship.setRelatedLink(path); + } i++; } } @@ -1348,14 +1341,14 @@ public abstract class AAIDeclarations implements AAIClient { int i = 0; while(true){ String searchKey = "vlans.vlan[" + i + "].vlan-interface"; - if(!parms.containsKey(searchKey)) + if(!params.containsKey(searchKey)) break; - String vlanInterface = parms.get("vlans.vlan[" + i + "].vlan-interface"); - String vlanIdInner = parms.get("vlans.vlan[" + i + "].vlan-id-inner"); - String vlanIdOute = parms.get("vlans.vlan[" + i + "].vlan-id-outer"); - String speedValue = parms.get("vlans.vlan[" + i + "].speed-value"); - String speedUnits = parms.get("vlans.vlan[" + i + "].speed-units"); + String vlanInterface = params.get("vlans.vlan[" + i + "].vlan-interface"); + String vlanIdInner = params.get("vlans.vlan[" + i + "].vlan-id-inner"); + String vlanIdOute = params.get("vlans.vlan[" + i + "].vlan-id-outer"); + String speedValue = params.get("vlans.vlan[" + i + "].speed-value"); + String speedUnits = params.get("vlans.vlan[" + i + "].speed-units"); Vlan vlan = new Vlan(); vlan.setVlanInterface(vlanInterface); @@ -1419,10 +1412,10 @@ public abstract class AAIDeclarations implements AAIClient { int i = 0; while(true){ String metaKey = "metadata.metadatum[" + i + "].meta-key"; - if(!parms.containsKey(metaKey)) + if(!params.containsKey(metaKey)) break; - String metaValue = parms.get("metadata.metadatum[" + i + "].meta-value"); + String metaValue = params.get("metadata.metadatum[" + i + "].meta-value"); Metadatum vlan = new Metadatum(); vlan.setMetaname(metaKey); @@ -1483,13 +1476,6 @@ public abstract class AAIDeclarations implements AAIClient { return QueryStatus.SUCCESS; } - private static final String regex = "([A-Z][a-z,0-9]+)"; - private static final String replacement = "-$1"; - - private String camelCaseToDashedString(String propOrder) { - return propOrder.replaceAll(regex, replacement).toLowerCase(); - } - private QueryStatus newModelProcessRelationshipList(Object instance, Map<String, String> params, String prefix, SvcLogicContext ctx) throws Exception { Class resourceClass = instance.getClass(); @@ -1511,7 +1497,12 @@ public abstract class AAIDeclarations implements AAIClient { if(!relationshipKeys.isEmpty()) { RelationshipList relationshipList = null; Object obj = null; - Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + Method getRelationshipListMethod = null; + try { + getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + } catch(Exception exc) { + getLogger().debug("Retrofiting relationship data: " + exc.getMessage()); + } if(getRelationshipListMethod != null){ try { getRelationshipListMethod.setAccessible(true); @@ -1546,13 +1537,12 @@ public abstract class AAIDeclarations implements AAIClient { } int i = 0; - int j = 0; while(true){ String searchKey = "relationship-list.relationship[" + i + "].related-to"; if(!params.containsKey(searchKey)) break; - j = 0; + int j = 0; String relatedTo = params.get(searchKey); String relatedLinkKey = "relationship-list.relationship[" + i + "].related-link"; String relatedLink = null; @@ -1566,7 +1556,7 @@ public abstract class AAIDeclarations implements AAIClient { if(relatedLink != null) { relationship.setRelatedLink(relatedLink); } else { - List<RelationshipData> relData = relationship.getRelationshipData(); + Map<String, String> relParams = new HashMap<String, String>(); while(true) { String searchRelationshipKey = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-key"; @@ -1574,15 +1564,17 @@ public abstract class AAIDeclarations implements AAIClient { if(!params.containsKey(searchRelationshipKey)) break; - RelationshipData relDatum = new RelationshipData(); - relDatum.setRelationshipKey(params.get(searchRelationshipKey)); - relDatum.setRelationshipValue(params.get(searchRelationshipValue)); - relData.add(relDatum); + relParams.put(params.get(searchRelationshipKey), params.get(searchRelationshipValue)); j++; } + AAIRequest rlRequest = AAIRequest.createRequest(relatedTo, relParams); + for(String key : relParams.keySet()) { + rlRequest.addRequestProperty(key, relParams.get(key)); + } + String path = rlRequest.updatePathDataValues(null); + relationship.setRelatedLink(path); } - i++; } } @@ -1602,113 +1594,6 @@ public abstract class AAIDeclarations implements AAIClient { return null; } - protected HashMap<String,String> keyToHashMap(String key, SvcLogicContext ctx) { - if (key == null) { - return (null); - } - - getLogger().debug("Converting key [" + key + "] to where clause"); - - if (key.startsWith("'") && key.endsWith("'")) { - key = key.substring(1, key.length() - 1); - - getLogger().debug("Stripped outer single quotes - key is now [" + key + "]"); - } - - String[] keyTerms = key.split("\\s+"); - - StringBuffer whereBuff = new StringBuffer(); - String term1 = null; - String op = null; - String term2 = null; - HashMap<String, String> results = new HashMap<String, String>(); - - for (int i = 0; i < keyTerms.length; i++) { - if (term1 == null) { - if ("and".equalsIgnoreCase(keyTerms[i]) - || "or".equalsIgnoreCase(keyTerms[i])) { - // Skip over ADD/OR - } else { - term1 = resolveTerm(keyTerms[i], ctx); - } - } else if (op == null) { - if ("==".equals(keyTerms[i])) { - op = "="; - } else { - op = keyTerms[i]; - } - } else { - term2 = resolveTerm(keyTerms[i], ctx); - term2 = term2.trim().replace("'", "").replace("$", "").replace("'", ""); - results.put(term1, term2); - - term1 = null; - op = null; - term2 = null; - } - } - - return (results); - } - - private String resolveTerm(String term, SvcLogicContext ctx) { - if (term == null) { - return (null); - } - - getLogger().debug("resolveTerm: term is " + term); - - if (term.startsWith("$") && (ctx != null)) { - // Resolve any index variables. - - return ("'" + resolveCtxVariable(term.substring(1), ctx) + "'"); - } else if (term.startsWith("'") || term.startsWith("\"")) { - return (term); - } else { - return (term.replaceAll("-", "_")); - - } - - } - - private String resolveCtxVariable(String ctxVarName, SvcLogicContext ctx) { - - if (ctxVarName.indexOf('[') == -1) { - // Ctx variable contains no arrays - return (ctx.getAttribute(ctxVarName)); - } - - // Resolve any array references - StringBuffer sbuff = new StringBuffer(); - String[] ctxVarParts = ctxVarName.split("\\["); - sbuff.append(ctxVarParts[0]); - for (int i = 1; i < ctxVarParts.length; i++) { - if (ctxVarParts[i].startsWith("$")) { - int endBracketLoc = ctxVarParts[i].indexOf("]"); - if (endBracketLoc == -1) { - // Missing end bracket ... give up parsing - getLogger().warn("Variable reference " + ctxVarName - + " seems to be missing a ']'"); - return (ctx.getAttribute(ctxVarName)); - } - - String idxVarName = ctxVarParts[i].substring(1, endBracketLoc); - String remainder = ctxVarParts[i].substring(endBracketLoc); - - sbuff.append("["); - sbuff.append(ctx.getAttribute(idxVarName)); - sbuff.append(remainder); - - } else { - // Index is not a variable reference - sbuff.append("["); - sbuff.append(ctxVarParts[i]); - } - } - - return (ctx.getAttribute(sbuff.toString())); - } - public QueryStatus backup(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException { String resource = params.get("resource").toLowerCase(); @@ -1811,7 +1696,12 @@ public abstract class AAIDeclarations implements AAIClient { RelationshipList relationshipList = null; Object obj = null; - Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + Method getRelationshipListMethod = null; + try { + getRelationshipListMethod = resourceClass.getMethod("getRelationshipList"); + } catch(Exception exc) { + getLogger().debug("Retrofiting relationship data: " + exc.getMessage()); + } if(getRelationshipListMethod != null){ try { getRelationshipListMethod.setAccessible(true); diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIExecutorInterface.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIExecutorInterface.java index d315bad1c..d315bad1c 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIExecutorInterface.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIExecutorInterface.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java index 4f2181f6c..e54d1f7f1 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java @@ -43,7 +43,7 @@ import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.StringUtils; -import org.openecomp.aai.inventory.v10.GenericVnf; +import org.openecomp.aai.inventory.v11.GenericVnf; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; @@ -113,6 +113,7 @@ public abstract class AAIRequest { case "nodes-query": return new NodesQueryRequest(); case "custom-query": + case "formatted-query": return new CustomQueryRequest(); case "linterface": return new LInterfaceRequest(LInterfaceRequest.TYPE.L2_BRIDGE_SBG); @@ -146,6 +147,11 @@ public abstract class AAIRequest { private static Map<BitSet, String> bitsetPaths = new LinkedHashMap<BitSet, String>(); + public static Set<String> getResourceNames() { + return tagValues.keySet(); + } + + public static void setProperties(Properties props, AAIService aaiService) { AAIRequest.configProperties = props; AAIRequest.aaiService = aaiService; @@ -230,17 +236,23 @@ public abstract class AAIRequest { aaiService.getLogger().warn("Could not deserialize object of type " + lInterfaceRequest.getClass().getSimpleName(), exc) ; } -// public abstract URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException; - public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException { String request_url = null; - request_url = target_uri + getRequestPath(); + request_url = target_uri + updatePathDataValues(resourceVersion); - Set<String> uniqueResources = extractUniqueResourceSetFromKeys(requestProperties.stringPropertyNames()); + URL http_req_url = new URL(request_url); + + aaiService.LOGwriteFirstTrace(method, http_req_url.toString()); -// request_url = processPathData(request_url, requestProperties); + return http_req_url; + } + + public String updatePathDataValues(Object resourceVersion) throws UnsupportedEncodingException, MalformedURLException { + String request_url = getRequestPath(); + + Set<String> uniqueResources = extractUniqueResourceSetFromKeys(requestProperties.stringPropertyNames()); for(String resoourceName:uniqueResources) { AAIRequest locRequest = AAIRequest.createRequest(resoourceName, new HashMap<String, String>()); @@ -253,19 +265,14 @@ public abstract class AAIRequest { } catch (Exception e) { e.printStackTrace(); } -// request_url = locRequest.processPathData(request_url, requestProperties); } } if(resourceVersion != null) { request_url = request_url +"?resource-version="+resourceVersion; } - URL http_req_url = new URL(request_url); - aaiService.LOGwriteFirstTrace(method, http_req_url.toString()); - - - return http_req_url; + return request_url; } @@ -365,7 +372,7 @@ public abstract class AAIRequest { return AAIService.getObjectMapper(); } - protected static Class<? extends AAIDatum> getClassFromResource(String resoourceName) throws ClassNotFoundException { + public static Class<? extends AAIDatum> getClassFromResource(String resoourceName) throws ClassNotFoundException { String className = GenericVnf.class.getName(); String[] split = resoourceName.split("-"); for(int i = 0; i < split.length; i++) { @@ -414,6 +421,19 @@ public abstract class AAIRequest { return query_pairs; } + public static Map<String, String> splitPath(String path) throws UnsupportedEncodingException { + Map<String, String> query_pairs = new LinkedHashMap<String, String>(); + + if(path != null && !path.isEmpty()) { + String[] pairs = path.split("/"); + for (String pair : pairs) { + int idx = pair.indexOf("="); + query_pairs.put(URLDecoder.decode(pair.substring(0, idx), "UTF-8"), URLDecoder.decode(pair.substring(idx + 1), "UTF-8")); + } + } + return query_pairs; + } + protected boolean expectsDataFromPUTRequest() { return false; } diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIService.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java index c50178bc5..b5e452428 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIService.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java @@ -36,6 +36,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.net.HttpURLConnection; import java.net.MalformedURLException; +import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLEncoder; @@ -66,6 +67,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocketFactory; import javax.ws.rs.HttpMethod; +import javax.ws.rs.core.UriBuilder; import javax.xml.bind.annotation.XmlElement; import org.apache.commons.codec.binary.Base64; @@ -75,29 +77,29 @@ import org.onap.ccsdk.sli.core.sli.MetricLogger; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicResource; -import org.openecomp.aai.inventory.v10.AvailabilityZone; -import org.openecomp.aai.inventory.v10.Complex; -import org.openecomp.aai.inventory.v10.CtagPool; -import org.openecomp.aai.inventory.v10.DvsSwitch; -import org.openecomp.aai.inventory.v10.GenericVnf; -import org.openecomp.aai.inventory.v10.L3Network; -import org.openecomp.aai.inventory.v10.OamNetwork; -import org.openecomp.aai.inventory.v10.PInterface; -import org.openecomp.aai.inventory.v10.PhysicalLink; -import org.openecomp.aai.inventory.v10.Pserver; -import org.openecomp.aai.inventory.v10.ResultData; -import org.openecomp.aai.inventory.v10.SearchResults; -import org.openecomp.aai.inventory.v10.Service; -import org.openecomp.aai.inventory.v10.ServiceInstance; -import org.openecomp.aai.inventory.v10.SitePairSet; -import org.openecomp.aai.inventory.v10.Tenant; -import org.openecomp.aai.inventory.v10.Vce; -import org.openecomp.aai.inventory.v10.VnfImage; -import org.openecomp.aai.inventory.v10.VnfImages; -import org.openecomp.aai.inventory.v10.Vpe; -import org.openecomp.aai.inventory.v10.VplsPe; -import org.openecomp.aai.inventory.v10.VpnBinding; -import org.openecomp.aai.inventory.v10.Vserver; +import org.openecomp.aai.inventory.v11.AvailabilityZone; +import org.openecomp.aai.inventory.v11.Complex; +import org.openecomp.aai.inventory.v11.CtagPool; +import org.openecomp.aai.inventory.v11.DvsSwitch; +import org.openecomp.aai.inventory.v11.GenericVnf; +import org.openecomp.aai.inventory.v11.L3Network; +import org.openecomp.aai.inventory.v11.OamNetwork; +import org.openecomp.aai.inventory.v11.PInterface; +import org.openecomp.aai.inventory.v11.PhysicalLink; +import org.openecomp.aai.inventory.v11.Pserver; +import org.openecomp.aai.inventory.v11.ResultData; +import org.openecomp.aai.inventory.v11.SearchResults; +import org.openecomp.aai.inventory.v11.Service; +import org.openecomp.aai.inventory.v11.ServiceInstance; +import org.openecomp.aai.inventory.v11.SitePairSet; +import org.openecomp.aai.inventory.v11.Tenant; +import org.openecomp.aai.inventory.v11.Vce; +import org.openecomp.aai.inventory.v11.VnfImage; +import org.openecomp.aai.inventory.v11.VnfImages; +import org.openecomp.aai.inventory.v11.Vpe; +import org.openecomp.aai.inventory.v11.VplsPe; +import org.openecomp.aai.inventory.v11.VpnBinding; +import org.openecomp.aai.inventory.v11.Vserver; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; import org.onap.ccsdk.sli.adaptors.aai.data.ErrorResponse; import org.onap.ccsdk.sli.adaptors.aai.data.RequestError; @@ -383,7 +385,13 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe con.setRequestProperty( "Content-Type", "PATCH".equalsIgnoreCase(method) ? "application/merge-patch+json" : "application/json" ); con.setRequestProperty("X-FromAppId", application_id); con.setRequestProperty("X-TransactionId",TransactionIdTracker.getNextTransactionId()); - con.setRequestProperty(MetricLogger.REQUEST_ID, ml.getRequestID()); + String mlId = ml.getRequestID(); + if(mlId != null && !mlId.isEmpty()) { + LOG.debug(String.format("MetricLogger requestId = %s", mlId)); + con.setRequestProperty(MetricLogger.REQUEST_ID, mlId); + } else { + LOG.debug("MetricLogger requestId is null"); + } if(user_name != null && !user_name.isEmpty() && user_password != null && !user_password.isEmpty()) { String basicAuth = "Basic " + new String(Base64.encodeBase64((user_name + ":" + user_password).getBytes())); @@ -697,7 +705,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe { String encrypted_url = selection; String apnpattern = - "/aai/v10/business/customers/customer/(.+)/service-subscriptions/service-subscription/(.+)/service-instances/service-instance/(.+)/"; + "/aai/v11/business/customers/customer/(.+)/service-subscriptions/service-subscription/(.+)/service-instances/service-instance/(.+)/"; Pattern pattern = Pattern.compile(apnpattern); try { @@ -1773,8 +1781,12 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe SvcLogicContext ctx = new SvcLogicContext(); if(!key.contains(" = ") && isValidURL(key)) { key = String.format("selflink = '%s'", key); + } else + if(!key.contains(" = ") && isValidURI(key)) { + key = String.format("resource-path = '%s'", key); } - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); SelfLinkRequest request = new SelfLinkRequest(type); request.processRequestPathValues(nameValues); @@ -1974,12 +1986,12 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe @Override - public VnfImage requestVnfImageData(String att_uuid) throws AAIServiceException { + public VnfImage requestVnfImageData(String vnf_image_uuid) throws AAIServiceException { VnfImage response = null; try { AAIRequest request = AAIRequest.getRequestFromResource("vnf-image"); - request.addRequestProperty("vnf-image.att-uuid", att_uuid); + request.addRequestProperty("vnf-image.vnf-image-uuid", vnf_image_uuid); String rv = executor.get(request); if(rv != null) { @@ -2350,7 +2362,11 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe try { for (ResultData datum : resultDataList) { String data_type = datum.getResourceType(); - entity = new URL(datum.getResourceLink()); + String resourceLink = datum.getResourceLink(); + if(!resourceLink.isEmpty() && !resourceLink.toLowerCase().startsWith("http")) { + resourceLink = (new EchoRequest()).target_uri + resourceLink; + } + entity = new URL(resourceLink); } } catch (Exception e) { throw new AAIServiceException(e); @@ -2368,6 +2384,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe URL requestUrl = null; String requestId = UUID.randomUUID().toString(); + StringBuilder errorStringBuilder = new StringBuilder(); try { @@ -2449,16 +2466,14 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe errorresponse.setRequestError(requestError); throw new AAIServiceException(responseCode, errorresponse); } else { -// -// StringBuilder stringBuilder = new StringBuilder("\n"); -// String line = null; -// while( ( line = reader.readLine() ) != null ) { -// stringBuilder.append("\n").append( line ); -// } -// LOG.info(stringBuilder.toString()); -// -// ErrorResponse errorresponse = mapper.readValue(stringBuilder.toString(), ErrorResponse.class); - ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class); +// StringBuilder errorStringBuilder = new StringBuilder(); + String line = null; + while( ( line = reader.readLine() ) != null ) { + errorStringBuilder.append("\n").append( line ); + } + + ErrorResponse errorresponse = mapper.readValue(errorStringBuilder.toString(), ErrorResponse.class); +// ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class); LOGwriteEndingTrace(responseCode, responseMessage, mapper.writeValueAsString(errorresponse)); throw new AAIServiceException(responseCode, errorresponse); } @@ -2466,7 +2481,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe } catch(AAIServiceException aaiexc) { throw aaiexc; } catch (Exception exc) { - LOG.warn("GET", exc); + LOG.warn(errorStringBuilder.toString(), exc); throw new AAIServiceException(exc); } finally { if(inputStream != null){ @@ -2983,12 +2998,14 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe if(!key.contains(" = ")) { if(isValidURL(key)) { key = String.format("selflink = '%s'", key); + } else if(isValidURI(key)) { + key = String.format("resource-path = '%s'", key); } else { return response; } } - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); AAIRequest request = new SelfLinkRequest(type); if(nameValues.containsKey(PathRequest.RESOURCE_PATH.replaceAll("-", "_"))) { @@ -3021,6 +3038,21 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe return true; } + + public boolean isValidURI(String url) { + + URI u = null; + + try { + u = new URI(url); + } catch (URISyntaxException e) { + return false; + } + + return true; + } + + @Override protected boolean deleteRelationshipList(URL httpReqUrl, String json_text) throws AAIServiceException { if(httpReqUrl == null) { @@ -3146,6 +3178,9 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe break; default: + if(key.contains("selflink =")) { + break; + } if(!key.contains(String.format("%s.", normResource))) { key = rewriteKey(resource, key, ctx); } @@ -3171,6 +3206,9 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe break; default: + if(key.contains("selflink =")) { + break; + } if(!key.contains(String.format("%s.", normResource))) { key = rewriteKey(resource, key, ctx); } @@ -3196,6 +3234,9 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe break; default: + if(key.contains("selflink =")) { + break; + } if(!key.contains(String.format("%s.", normResource))) { key = rewriteKey(resource, key, ctx); } @@ -3221,6 +3262,9 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe break; default: + if(key.contains("selflink =")) { + break; + } if(!key.contains(String.format("%s.", normResource))) { key = rewriteKey(resource, key, ctx); } @@ -3258,15 +3302,16 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe fieldAnnotatedNames.add(primaryId); } - HashMap<String, String> nameValues = keyToHashMap(key, ctx); + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); Set<String> keyset = nameValues.keySet(); for(String keyName : keyset) { if(keyName.contains(".")) continue; else { String tmpKeyName = keyName.replaceAll("_", "-"); - if(fieldAnnotatedNames.contains(tmpKeyName)) { - key = key.replace(tmpKeyName, String.format("%s.%s", normResource, tmpKeyName)); + String valueToSubstitute = String.format("%s =", tmpKeyName); + if(fieldAnnotatedNames.contains(tmpKeyName) && key.contains(valueToSubstitute)) { + key = key.replace(valueToSubstitute, String.format("%s.%s =", normResource, tmpKeyName)); } } } @@ -3275,4 +3320,13 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe return key; } + @Override + public String getPathTemplateForResource(String resoourceName, String keys, SvcLogicContext ctx) throws MalformedURLException { + return AAIServiceUtils.getPathForResource(resoourceName, StringUtils.join(keys, " AND "), ctx); + } + + @Override + public boolean isDeprecatedFormat(String resource, HashMap<String, String> nameValues) { + return !AAIServiceUtils.isValidFormat(resource, nameValues); + } } diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceActivator.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java index 45c3d3d20..45c3d3d20 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceActivator.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceException.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceException.java index 8d57db43a..8d57db43a 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAIServiceException.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceException.java diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceUtils.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceUtils.java new file mode 100644 index 000000000..bd2c724a1 --- /dev/null +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceUtils.java @@ -0,0 +1,340 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.adaptors.aai; + +import java.lang.annotation.Annotation; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import javax.xml.bind.annotation.XmlType; + +import org.apache.commons.lang.StringUtils; +import org.openecomp.aai.inventory.v11.Relationship; +import org.openecomp.aai.inventory.v11.RelationshipData; +import org.openecomp.aai.inventory.v11.RelationshipList; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AAIServiceUtils { + + private static final Logger LOG = LoggerFactory.getLogger(AAIService.class); + + public static String getPrimaryIdFromClass(Class<? extends AAIDatum> resourceClass){ + // 1. find class + getLogger().debug(resourceClass.getName()); + AAIDatum instance = null; + + try { + instance = resourceClass.newInstance(); + + Annotation[] annotations = resourceClass.getAnnotations(); + for(Annotation annotation : annotations) { + Class<? extends Annotation> anotationType = annotation.annotationType(); + String annotationName = anotationType.getName(); + + // 2. find string property setters and getters for the lists + if("javax.xml.bind.annotation.XmlType".equals(annotationName)){ + XmlType order = (XmlType)annotation; + String[] values = order.propOrder(); + for(String value : values) { + String id = camelCaseToDashedString(value); + return id; + } + } + } + } catch(Exception exc) { + + } + return null; + } + + public static String getSecondaryIdFromClass(Class<? extends AAIDatum> resourceClass){ + // 1. find class + getLogger().debug(resourceClass.getName()); + AAIDatum instance = null; + + try { + instance = resourceClass.newInstance(); + + Annotation[] annotations = resourceClass.getAnnotations(); + for(Annotation annotation : annotations) { + Class<? extends Annotation> anotationType = annotation.annotationType(); + String annotationName = anotationType.getName(); + + // 2. find string property setters and getters for the lists + if("javax.xml.bind.annotation.XmlType".equals(annotationName)){ + boolean primaryIdFound = false; + XmlType order = (XmlType)annotation; + String[] values = order.propOrder(); + for(String value : values) { + String id = camelCaseToDashedString(value); + if(primaryIdFound) { + return id; + } else { + primaryIdFound = true; + } + } + } + } + } catch(Exception exc) { + + } + return null; + } + + + private static Logger getLogger() { + return LOG; + } + + + private static final String regex = "([A-Z][a-z,0-9]+)"; + private static final String replacement = "-$1"; + + public static String camelCaseToDashedString(String propOrder) { + return propOrder.replaceAll(regex, replacement).toLowerCase(); + } + + public static HashMap<String,String> keyToHashMap(String key, SvcLogicContext ctx) { + if (key == null) { + return (null); + } + + getLogger().debug("Converting key [" + key + "] to where clause"); + + if (key.startsWith("'") && key.endsWith("'")) { + key = key.substring(1, key.length() - 1); + + getLogger().debug("Stripped outer single quotes - key is now [" + key + "]"); + } + + String[] keyTerms = key.split("\\s+"); + + StringBuffer whereBuff = new StringBuffer(); + String term1 = null; + String op = null; + String term2 = null; + HashMap<String, String> results = new HashMap<String, String>(); + + for (int i = 0; i < keyTerms.length; i++) { + if (term1 == null) { + if ("and".equalsIgnoreCase(keyTerms[i]) + || "or".equalsIgnoreCase(keyTerms[i])) { + // Skip over ADD/OR + } else { + term1 = resolveTerm(keyTerms[i], ctx); + } + } else if (op == null) { + if ("==".equals(keyTerms[i])) { + op = "="; + } else { + op = keyTerms[i]; + } + } else { + term2 = resolveTerm(keyTerms[i], ctx); + term2 = term2.trim().replace("'", "").replace("$", "").replace("'", ""); + results.put(term1, term2); + + term1 = null; + op = null; + term2 = null; + } + } + + return (results); + } + + private static String resolveTerm(String term, SvcLogicContext ctx) { + if (term == null) { + return (null); + } + + getLogger().debug("resolveTerm: term is " + term); + + if (term.startsWith("$") && (ctx != null)) { + // Resolve any index variables. + + return ("'" + resolveCtxVariable(term.substring(1), ctx) + "'"); + } else if (term.startsWith("'") || term.startsWith("\"")) { + return (term); + } else { + return (term.replaceAll("-", "_")); + + } + } + + private static String resolveCtxVariable(String ctxVarName, SvcLogicContext ctx) { + + if (ctxVarName.indexOf('[') == -1) { + // Ctx variable contains no arrays + return (ctx.getAttribute(ctxVarName)); + } + + // Resolve any array references + StringBuffer sbuff = new StringBuffer(); + String[] ctxVarParts = ctxVarName.split("\\["); + sbuff.append(ctxVarParts[0]); + for (int i = 1; i < ctxVarParts.length; i++) { + if (ctxVarParts[i].startsWith("$")) { + int endBracketLoc = ctxVarParts[i].indexOf("]"); + if (endBracketLoc == -1) { + // Missing end bracket ... give up parsing + getLogger().warn("Variable reference " + ctxVarName + + " seems to be missing a ']'"); + return (ctx.getAttribute(ctxVarName)); + } + + String idxVarName = ctxVarParts[i].substring(1, endBracketLoc); + String remainder = ctxVarParts[i].substring(endBracketLoc); + + sbuff.append("["); + sbuff.append(ctx.getAttribute(idxVarName)); + sbuff.append(remainder); + + } else { + // Index is not a variable reference + sbuff.append("["); + sbuff.append(ctxVarParts[i]); + } + } + + return (ctx.getAttribute(sbuff.toString())); + } + + public static void populateRelationshipDataFromPath(RelationshipList rl) throws URISyntaxException { + List<Relationship> list = rl.getRelationship(); + if(list != null && !list.isEmpty()) { + for(Relationship relationship : list) { + if(relationship.getRelationshipData().isEmpty()){ + String link = relationship.getRelatedLink(); + URI uri = new URI(link); + link = uri.getPath(); + HashMap<String,String> contributors = pathToHashMap(link); + for(String key : contributors.keySet()) { + RelationshipData rd = new RelationshipData(); + rd.setRelationshipKey(key); + rd.setRelationshipValue(contributors.get(key)); + relationship.getRelationshipData().add(rd); + } + } + } + } + } + + protected static HashMap<String,String> pathToHashMap(String path) { + HashMap<String, String> nameValues = new HashMap<String, String>(); + + String[] split = path.split("/"); + + LinkedList<String> list = new LinkedList<String>( Arrays.asList(split)); + Iterator<String> it = list.iterator(); + + while(it.hasNext()) { + String tag = it.next(); + if(!tag.isEmpty()) { + if(AAIRequest.getResourceNames().contains(tag)){ + LOG.info(tag); + // get the class from tag + Class<? extends AAIDatum> clazz = null; + try { + clazz = AAIRequest.getClassFromResource(tag); + String fieldName = AAIServiceUtils.getPrimaryIdFromClass(clazz); + + String value = it.next(); + if(!StringUtils.isEmpty(value)){ + nameValues.put(String.format("%s.%s", tag, fieldName), value); + switch(tag) { + case "cloud-region": + case "entitlement": + case "license": + case "route-target": + case "service-capability": + case "ctag-pool": + String secondaryFieldName = AAIServiceUtils.getSecondaryIdFromClass(clazz); + if(secondaryFieldName != null) { + value = it.next(); + nameValues.put(String.format("%s.%s", tag, secondaryFieldName), value); + } + break; + default: + break; + } + } + } catch (ClassNotFoundException exc) { + LOG.info("Caught exception", exc); + } + } + } + } + return nameValues; + } + + public static String getPathForResource(String resource, String key, SvcLogicContext ctx ) throws MalformedURLException{ + HashMap<String, String> nameValues = AAIServiceUtils.keyToHashMap(key, ctx); + AAIRequest request = AAIRequest.createRequest(resource, nameValues); + + for(String name : nameValues.keySet()) { + request.addRequestProperty(name, nameValues.get(name)); + } + return request.getRequestPath(); + } + + public static boolean isValidFormat(String resource, HashMap<String, String> nameValues) { + + switch(resource){ + case "formatted-query": + case "generic-query": + case "named-query": + case "nodes-query": + case "linterface": + case "l2-bridge-sbg": + case "l2-bridge-bgf": + case "echo": + case "test": + return true; + } + if(resource.contains(":")) { + resource = resource.substring(0, resource.indexOf(":")); + } + + Set<String> keys = nameValues.keySet(); + for(String key : keys) { + if(!key.contains(".")) { + if("depth".equals(key) || "related-to".equals(key) || "related_to".equals(key) || "related-link".equals(key) || "related_link".equals(key) || "selflink".equals(key)) + continue; + else { + getLogger().warn(String.format("key %s is incompatible with resource type '%s'", key, resource)); + } + } + } + return true; + } +} diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAITrinityService.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAITrinityService.java index 6fffc6e8f..6fffc6e8f 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/AAITrinityService.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAITrinityService.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CloudRegionRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CloudRegionRequest.java index 0de0d2bd0..8086228b1 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CloudRegionRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CloudRegionRequest.java @@ -29,7 +29,7 @@ import java.util.Map; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.CloudRegion; +import org.openecomp.aai.inventory.v11.CloudRegion; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CustomQueryRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CustomQueryRequest.java index 994f1b6bf..994f1b6bf 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/CustomQueryRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/CustomQueryRequest.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/EchoRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequest.java index 86e2d5f5e..86e2d5f5e 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/EchoRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequest.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericQueryRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericQueryRequest.java index 476aed94a..b509650de 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericQueryRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericQueryRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.ResultData; +import org.openecomp.aai.inventory.v11.ResultData; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java index 427ea7e38..1d3cb00f9 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java @@ -32,8 +32,8 @@ import java.util.Set; import javax.xml.bind.annotation.XmlElement; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.L3Network; -import org.openecomp.aai.inventory.v10.L3Networks; +import org.openecomp.aai.inventory.v11.L3Network; +import org.openecomp.aai.inventory.v11.L3Networks; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericVnfRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericVnfRequest.java index 3915940f5..3f33ff6d1 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/GenericVnfRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericVnfRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.GenericVnf; +import org.openecomp.aai.inventory.v11.GenericVnf; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java index e1431bead..6cddfdb06 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv4AddressListRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.L3InterfaceIpv4AddressList; +import org.openecomp.aai.inventory.v11.L3InterfaceIpv4AddressList; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -36,28 +36,28 @@ public class L3InterfaceIpv4AddressListRequest extends AAIRequest { /* * Note: there are 3 possible paths: - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} + * /inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} */ public static final String L3_INTERFACE_IPV4_ADDRESS_LIST_PATH = "org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv4.address.list"; @@ -184,10 +184,10 @@ public class L3InterfaceIpv4AddressListRequest extends AAIRequest { // public void processRequestPathValues(Map<String, String> nameValues) { // String[] paths = // { -// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", -// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", -// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", -// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}" +// "/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", +// "/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", +// "/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}", +// "/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}" // }; // // List<String>keys = new LinkedList<String>(); diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java index 5cdc0de64..b8fdda9fd 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/L3InterfaceIpv6AddressListRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.L3InterfaceIpv6AddressList; +import org.openecomp.aai.inventory.v11.L3InterfaceIpv6AddressList; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -36,28 +36,28 @@ public class L3InterfaceIpv6AddressListRequest extends AAIRequest { /* * Note: there are 3 possible paths: - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} + * /inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} */ public static final String L3_INTERFACE_IPV6_ADDRESS_LIST_PATH = "org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv6.address.list"; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LInterfaceRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LInterfaceRequest.java index a9da4e45c..1accc82c0 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LInterfaceRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LInterfaceRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.LInterface; +import org.openecomp.aai.inventory.v11.LInterface; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LagInterfacePnfRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LagInterfacePnfRequest.java index 5f84553db..f5bbde7e3 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/LagInterfacePnfRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/LagInterfacePnfRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.LagInterface; +import org.openecomp.aai.inventory.v11.LagInterface; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NamedQueryRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java index e1528a617..c93b0f189 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NamedQueryRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.InventoryResponseItems; +import org.openecomp.aai.inventory.v11.InventoryResponseItems; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NodesQueryRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NodesQueryRequest.java index ba4da3d7e..c6aeb3119 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/NodesQueryRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NodesQueryRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.SearchResults; +import org.openecomp.aai.inventory.v11.SearchResults; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfacePnfRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfacePnfRequest.java index ea669f232..c4d078bf9 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfacePnfRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfacePnfRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.PInterface; +import org.openecomp.aai.inventory.v11.PInterface; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfaceRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfaceRequest.java index 378e125dd..8a040b2f2 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PInterfaceRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PInterfaceRequest.java @@ -26,7 +26,7 @@ import java.net.MalformedURLException; import java.net.URL; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.PInterface; +import org.openecomp.aai.inventory.v11.PInterface; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PathRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PathRequest.java index a42e045bb..a42e045bb 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PathRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PathRequest.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PhysicalLinkRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PhysicalLinkRequest.java index 4db95df1c..94dfdaf27 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/PhysicalLinkRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/PhysicalLinkRequest.java @@ -26,7 +26,7 @@ import java.net.MalformedURLException; import java.net.URL; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.PhysicalLink; +import org.openecomp.aai.inventory.v11.PhysicalLink; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/RelationshipRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java index 8c3d107cb..9ae635c67 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/RelationshipRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java @@ -26,7 +26,7 @@ import java.net.MalformedURLException; import java.net.URL; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.RelationshipList; +import org.openecomp.aai.inventory.v11.RelationshipList; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SelfLinkRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SelfLinkRequest.java index e4fd3d938..95b5c3505 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SelfLinkRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SelfLinkRequest.java @@ -23,6 +23,7 @@ package org.onap.ccsdk.sli.adaptors.aai; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; +import java.net.URI; import java.net.URL; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; @@ -48,7 +49,14 @@ public class SelfLinkRequest extends AAIRequest { String request_url = null; request_url = requestProperties.getProperty(SELFLINK); - + try { + URI uri = new URI(request_url); + if(uri.getHost() == null) { + request_url = target_uri + request_url; + } + } catch(Exception exc) { + LOG.error("SelfLinkRequest.getRequestUrl", exc); + } String query = null; if(request_url.contains("?")) { diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SubInterfaceRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SubInterfaceRequest.java index 3cbe187c0..9e0a6d53f 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/SubInterfaceRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/SubInterfaceRequest.java @@ -27,7 +27,7 @@ import java.net.URL; import java.util.Properties; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v10.LInterface; +import org.openecomp.aai.inventory.v11.LInterface; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/UpdateRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/UpdateRequest.java index 705f53d28..705f53d28 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/UpdateRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/UpdateRequest.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/AAIDatum.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/AAIDatum.java index 84323176b..84323176b 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/AAIDatum.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/AAIDatum.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/EchoResponse.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/EchoResponse.java index 576c15701..576c15701 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/EchoResponse.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/EchoResponse.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ErrorResponse.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ErrorResponse.java index 6a255fcf1..6a255fcf1 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ErrorResponse.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ErrorResponse.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/RequestError.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/RequestError.java index 9bbca18f5..9bbca18f5 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/RequestError.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/RequestError.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResourceVersion.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResourceVersion.java index f5901a8be..f5901a8be 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResourceVersion.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResourceVersion.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessage.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessage.java index db3778792..db3778792 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessage.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessage.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessages.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessages.java index a23878084..a23878084 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ResponseMessages.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ResponseMessages.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ServiceException.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ServiceException.java index b98d3d8fc..b98d3d8fc 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/ServiceException.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/ServiceException.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/SubInterface.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/SubInterface.java index f15507800..14ed86677 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/SubInterface.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/SubInterface.java @@ -31,8 +31,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openecomp.aai.inventory.v10.RelationshipList; -import org.openecomp.aai.inventory.v10.Vlans; +import org.openecomp.aai.inventory.v11.RelationshipList; +import org.openecomp.aai.inventory.v11.Vlans; @JsonInclude(JsonInclude.Include.NON_NULL) @Generated("org.jsonschema2pojo") diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/Variables.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/Variables.java index 3b03ba472..3b03ba472 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/Variables.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/Variables.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/KeyDatum.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/KeyDatum.java index 641a8abde..641a8abde 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/KeyDatum.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/KeyDatum.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/NotifyEvent.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/NotifyEvent.java index d97b35239..d97b35239 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/notify/NotifyEvent.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/notify/NotifyEvent.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Flavor.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Flavor.java index 6ffc30c45..6ffc30c45 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Flavor.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Flavor.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Host.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Host.java index 7c171ebd9..7c171ebd9 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Host.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Host.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Image.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Image.java index 0e27c5418..0e27c5418 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Image.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Image.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/IpAddress.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/IpAddress.java index 19a9bf6a9..19a9bf6a9 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/IpAddress.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/IpAddress.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Relationship.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Relationship.java index 8e04e35f5..8e04e35f5 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/Relationship.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/Relationship.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipDatum.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipDatum.java index 1ac21640c..1ac21640c 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipDatum.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipDatum.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipList.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipList.java index 3c46d21bd..3c46d21bd 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/RelationshipList.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/RelationshipList.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/VServer.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/VServer.java index 45d725530..45d725530 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/data/v1507/VServer.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/data/v1507/VServer.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryRequestData.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryRequestData.java index e533a164f..e533a164f 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryRequestData.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryRequestData.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryResultList.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryResultList.java index 248cd9597..248cd9597 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/FormattedQueryResultList.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/FormattedQueryResultList.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilter.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilter.java index ccd637294..aa32847c4 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilter.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilter.java @@ -33,10 +33,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openecomp.aai.inventory.v10.L3Network; -import org.openecomp.aai.inventory.v10.Pnf; -import org.openecomp.aai.inventory.v10.LogicalLink; -import org.openecomp.aai.inventory.v10.ServiceInstance; +import org.openecomp.aai.inventory.v11.L3Network; +import org.openecomp.aai.inventory.v11.Pnf; +import org.openecomp.aai.inventory.v11.LogicalLink; +import org.openecomp.aai.inventory.v11.ServiceInstance; @JsonInclude(JsonInclude.Include.NON_NULL) @Generated("org.jsonschema2pojo") diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilters.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilters.java index 265c1866c..265c1866c 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/InstanceFilters.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/InstanceFilters.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQuery.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQuery.java index 65350c23d..65350c23d 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQuery.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQuery.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQueryData.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQueryData.java index 8188acf23..8188acf23 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/NamedQueryData.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/NamedQueryData.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/QueryParameters.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/QueryParameters.java index c6ddbcbca..c6ddbcbca 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/QueryParameters.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/QueryParameters.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/Results.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/Results.java index ff2269a49..45d8035e4 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/query/Results.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/query/Results.java @@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.openecomp.aai.inventory.v10.*; +import org.openecomp.aai.inventory.v11.*; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Action.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Action.java index f3d509987..f3d509987 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Action.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Action.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/ActionDatum.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/ActionDatum.java index 0cd70012f..0cd70012f 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/ActionDatum.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/ActionDatum.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Update.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Update.java index 43f912dfa..43f912dfa 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/Update.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/Update.java diff --git a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/UpdateNodeKey.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/UpdateNodeKey.java index caa1de450..caa1de450 100644 --- a/aai-service/provider/src/main/java/org/onap/sli/adaptors/aai/update/UpdateNodeKey.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/update/UpdateNodeKey.java |