aboutsummaryrefslogtreecommitdiffstats
path: root/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows
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 /so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows
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 'so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows')
-rw-r--r--so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
index 049746c6ab..c48d10bb69 100644
--- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
+++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
@@ -22,9 +22,10 @@ package org.onap.so.etsi.nfvo.ns.lcm.bpmn.flows.extclients.aai;
import java.util.Optional;
import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectType;
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.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,8 +48,9 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
public void createServiceInstance(final String globalCustomerId, final String serviceType,
final ServiceInstance aaiServiceInstance) {
logger.info("Creating service instance in AAI: {}", aaiServiceInstance);
- final AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
- globalCustomerId, serviceType, aaiServiceInstance.getServiceInstanceId());
+ final AAIResourceUri serviceInstanceURI =
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId)
+ .serviceSubscription(serviceType).serviceInstance(aaiServiceInstance.getServiceInstanceId()));
aaiClientProvider.getAaiClient().createIfNotExists(serviceInstanceURI, Optional.of(aaiServiceInstance));
}
@@ -57,9 +59,10 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
public void createGenericVnfAndConnectServiceInstance(final String serviceInstanceId, final String vnfId,
final GenericVnf genericVnf) {
logger.info("Creating GenericVnf in AAI: {}", genericVnf);
- final AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+ final AAIResourceUri genericVnfURI =
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
final AAIResourceUri serviceInstanceURI =
- AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+ AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
aaiClientProvider.getAaiClient().createIfNotExists(genericVnfURI, Optional.of(genericVnf))
.connect(genericVnfURI, serviceInstanceURI);
@@ -69,15 +72,16 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
public void connectGenericVnfToTenant(final String vnfId, final String cloudOwner, final String cloudRegion,
final String tenantId) {
logger.info("Connecting GenericVnf {} to {}/{}/{} in AAI", vnfId, cloudOwner, cloudRegion, tenantId);
- final AAIResourceUri tenantURI =
- AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId);
- final AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+ final AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(
+ AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId));
+ final AAIResourceUri genericVnfURI =
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
aaiClientProvider.getAaiClient().connect(tenantURI, genericVnfURI);
}
@Override
public Optional<GenericVnf> getGenericVnf(final String vnfId) {
return aaiClientProvider.getAaiClient().get(GenericVnf.class,
- AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+ AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
}
}