summaryrefslogtreecommitdiffstats
path: root/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2020-09-21 11:38:23 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-09-23 16:32:42 -0400
commit2505a543b0e45c1c3c2fe2fb8b85664b08bf2fca (patch)
tree5f1593d45f8c9a2fb2d400b8fa58dbb3e29ef671 /adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main
parent8d68a316f303d0fc57eb7da4fef881a26d39d439 (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-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main')
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java58
1 files changed, 32 insertions, 26 deletions
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
index d9450b3472..8f95d8ab85 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
@@ -26,8 +26,8 @@ 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.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectType;
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.etsisol003adapter.lcm.v1.model.Tenant;
import org.slf4j.Logger;
@@ -49,7 +49,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public GenericVnf invokeGetGenericVnf(final String vnfId) {
return aaiClientProvider.getAaiClient()
- .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+ .get(GenericVnf.class,
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
.orElseGet(() -> {
logger.debug("No vnf found in AAI with ID: {}", vnfId);
return null;
@@ -58,9 +59,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public GenericVnfs invokeQueryGenericVnf(final String selfLink) {
- return aaiClientProvider.getAaiClient()
- .get(GenericVnfs.class,
- AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam("selflink", selfLink))
+ return aaiClientProvider.getAaiClient().get(GenericVnfs.class, AAIUriFactory
+ .createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("selflink", selfLink))
.orElseGet(() -> {
logger.debug("No vnf found in AAI with selflink: {}", selfLink);
return null;
@@ -70,7 +70,9 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public EsrVnfmList invokeGetVnfms() {
return aaiClientProvider.getAaiClient()
- .get(EsrVnfmList.class, AAIUriFactory.createResourceUri(AAIObjectType.VNFM_LIST)).orElseGet(() -> {
+ .get(EsrVnfmList.class,
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfmList()))
+ .orElseGet(() -> {
logger.debug("No VNFMs in AAI");
return null;
});
@@ -79,7 +81,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public EsrVnfm invokeGetVnfm(final String vnfmId) {
return aaiClientProvider.getAaiClient()
- .get(EsrVnfm.class, AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId).depth(Depth.ONE))
+ .get(EsrVnfm.class, AAIUriFactory
+ .createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)).depth(Depth.ONE))
.orElseGet(() -> {
logger.debug("VNFM not found in AAI");
return null;
@@ -90,7 +93,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
public EsrSystemInfoList invokeGetVnfmEsrSystemInfoList(final String vnfmId) {
return aaiClientProvider.getAaiClient()
.get(EsrSystemInfoList.class,
- AAIUriFactory.createResourceUri(AAIObjectType.VNFM_ESR_SYSTEM_INFO_LIST, vnfmId))
+ AAIUriFactory.createResourceUri(
+ AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId).esrSystemInfoList()))
.orElseGet(() -> {
logger.debug("VNFM ESR system info list not found in AAI");
return null;
@@ -99,45 +103,47 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public void invokePatchGenericVnf(final GenericVnf vnf) {
- aaiClientProvider.getAaiClient()
- .update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId()), vnf);
+ aaiClientProvider.getAaiClient().update(
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())), vnf);
}
@Override
public void invokePutGenericVnfToVnfmRelationship(final GenericVnf vnf, final String vnfmId) {
- aaiClientProvider.getAaiClient().connect(AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId),
- AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId()));
+ aaiClientProvider.getAaiClient().connect(
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)),
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())));
}
@Override
public void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenant,
final Vserver vserver) {
- aaiClientProvider.getAaiClient().create(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
- cloudRegion, tenant, vserver.getVserverId()), vserver);
+ aaiClientProvider
+ .getAaiClient().create(
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+ .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
+ vserver);
}
@Override
public void invokePutVserverToVnfRelationship(final String cloudOwner, final String cloudRegion,
final String tenant, final Vserver vserver, final String vnfId) {
- aaiClientProvider.getAaiClient()
- .connect(
- AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenant,
- vserver.getVserverId()),
- AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+ aaiClientProvider.getAaiClient().connect(
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+ .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
}
@Override
public void invokeDeleteVserver(final String cloudOwner, final String cloudRegion, final String tenant,
final String vserverId) {
- aaiClientProvider.getAaiClient().delete(
- AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenant, vserverId));
+ aaiClientProvider.getAaiClient().delete(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+ .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserverId)));
}
@Override
public Tenant invokeGetTenant(final String cloudOwner, final String cloudRegion, final String tenantId) {
- return aaiClientProvider.getAaiClient()
- .get(Tenant.class,
- AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId))
+ return aaiClientProvider.getAaiClient().get(Tenant.class, AAIUriFactory.createResourceUri(
+ AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)))
.orElseGet(() -> {
logger.debug("Tenant not found in AAI");
return null;
@@ -147,8 +153,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
@Override
public EsrSystemInfoList invokeGetCloudRegionEsrSystemInfoList(final String cloudOwner, final String cloudRegion) {
return aaiClientProvider
- .getAaiClient().get(EsrSystemInfoList.class, AAIUriFactory
- .createResourceUri(AAIObjectType.CLOUD_ESR_SYSTEM_INFO_LIST, cloudOwner, cloudRegion))
+ .getAaiClient().get(EsrSystemInfoList.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+ .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).esrSystemInfoList()))
.orElseGet(() -> {
logger.debug("Cloud esr system info list not found in AAI");
return null;