diff options
author | Benjamin, Max <max.benjamin@att.com> | 2020-09-21 11:38:23 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-09-23 16:32:42 -0400 |
commit | 2505a543b0e45c1c3c2fe2fb8b85664b08bf2fca (patch) | |
tree | 5f1593d45f8c9a2fb2d400b8fa58dbb3e29ef671 /adapters/etsi-sol002-adapter/src/main/java | |
parent | 8d68a316f303d0fc57eb7da4fef881a26d39d439 (diff) |
removed references to AAIObjectType
removed references to AAIObjectType and AAIObjectPlurals
additional corrections for removal of aai object type
corrected additional java files
updated groovy files to match aai fluent builder style
Issue-ID: SO-3259
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ifdf12fcacb34cc648548eb18b638afd06dad67a9
Diffstat (limited to 'adapters/etsi-sol002-adapter/src/main/java')
-rw-r--r-- | adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java index 3995185f23..f326d92927 100644 --- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java +++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java @@ -25,11 +25,22 @@ import java.util.LinkedList; import java.util.List; import java.util.Optional; import org.apache.logging.log4j.util.Strings; -import org.onap.aai.domain.yang.*; -import org.onap.aaiclient.client.aai.AAIObjectType; +import org.onap.aai.domain.yang.EsrSystemInfo; +import org.onap.aai.domain.yang.EsrSystemInfoList; +import org.onap.aai.domain.yang.EsrVnfm; +import org.onap.aai.domain.yang.EsrVnfmList; +import org.onap.aai.domain.yang.GenericVnf; +import org.onap.aai.domain.yang.GenericVnfs; +import org.onap.aai.domain.yang.RelatedToProperty; +import org.onap.aai.domain.yang.Relationship; +import org.onap.aai.domain.yang.RelationshipData; +import org.onap.aai.domain.yang.RelationshipList; +import org.onap.aai.domain.yang.Vserver; import org.onap.aaiclient.client.aai.AAIResourcesClient; +import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; +import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; import org.onap.aaiclient.client.graphinventory.entities.uri.Depth; import org.onap.so.adapters.vevnfm.exception.VeVnfmException; import org.slf4j.Logger; @@ -104,7 +115,7 @@ public class AaiConnection { } private List<EsrSystemInfo> receiveVnfmInternal() { - final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VNFM_LIST); + final AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfmList()); final Optional<EsrVnfmList> response = getResourcesClient().get(EsrVnfmList.class, resourceUri); if (response.isPresent()) { @@ -127,7 +138,7 @@ public class AaiConnection { private List<EsrSystemInfo> receiveVnfmServiceUrl(final String vnfmId) { final Optional<EsrVnfm> response = getResourcesClient().get(EsrVnfm.class, - AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId).depth(Depth.ONE)); + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)).depth(Depth.ONE)); if (response.isPresent()) { final EsrVnfm esrVnfm = response.get(); @@ -143,8 +154,8 @@ public class AaiConnection { } public String receiveGenericVnfId(final String href) { - final AAIResourceUri resourceUri = - AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam(SELFLINK, href); + final AAIPluralResourceUri resourceUri = + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam(SELFLINK, href); final Optional<GenericVnfs> response = getResourcesClient().get(GenericVnfs.class, resourceUri); if (response.isPresent()) { @@ -165,7 +176,7 @@ public class AaiConnection { } public String receiveVserverName(final String genericId) { - final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericId); + final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericId)); final Optional<GenericVnf> response = getResourcesClient().get(GenericVnf.class, resourceUri); if (response.isPresent()) { @@ -199,7 +210,7 @@ public class AaiConnection { private String receiveVserverNameFromParams(final String cloudOwner, final String cloudId, final String tenantId, final String vserverId) { final AAIResourceUri resourceUri = - AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudId, tenantId, vserverId); + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudId).tenant(tenantId).vserver(vserverId)); final Optional<Vserver> response = getResourcesClient().get(Vserver.class, resourceUri); if (response.isPresent()) { |