diff options
Diffstat (limited to 'so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows')
2 files changed, 5 insertions, 3 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 78cdc797bc..0da53a09c2 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,6 +22,7 @@ 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; @@ -88,7 +89,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider { @Override public void deleteGenericVnf(final String vnfId) { logger.info("Deleting GenericVnf with id: {} from AAI.", vnfId); - final AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId); + final AAIResourceUri aaiResourceUri = + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)); aaiClientProvider.getAaiClient().delete(aaiResourceUri); } } 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/service/JobExecutorService.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/service/JobExecutorService.java index f240fa33ef..31e3011c0e 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/service/JobExecutorService.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/service/JobExecutorService.java @@ -289,7 +289,7 @@ public class JobExecutorService { JobStatusEnum currentJobStatus = null; while (timeOutTime > System.currentTimeMillis()) { - final Optional<NfvoJob> optional = databaseServiceProvider.getJob(jobId); + final Optional<NfvoJob> optional = databaseServiceProvider.getRefreshedJob(jobId); if (optional.isEmpty()) { logger.error("Unable to find Job using jobId: {}", jobId); @@ -299,7 +299,7 @@ public class JobExecutorService { final NfvoJob nfvoJob = optional.get(); currentJobStatus = nfvoJob.getStatus(); logger.debug("Received job status response: \n {}", nfvoJob); - if (jobFinishedStates.contains(nfvoJob.getStatus())) { + if (jobFinishedStates.contains(currentJobStatus)) { logger.info("Job finished \n {}", currentJobStatus); return ImmutablePair.of(nfvoJob.getProcessInstanceId(), currentJobStatus); } |