import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.client.orchestration.AAIServiceInstanceResources;
import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
+import org.onap.so.client.orchestration.AAIPnfResources;
import org.onap.so.client.orchestration.AAIVolumeGroupResources;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Autowired
private AAIVnfResources aaiVnfResources;
@Autowired
+ private AAIPnfResources aaiPnfResources;
+ @Autowired
private AAIVfModuleResources aaiVfModuleResources;
@Autowired
private AAINetworkResources aaiNetworkResources;
}
}
+
+
+ public void deletePnf(BuildingBlockExecution execution) throws Exception {
+ Pnf pnf = extractPojosForBB.extractByKey(execution, ResourceKey.PNF);
+ execution.setVariable("aaiPnfRollback", false);
+ try {
+ aaiPnfResources.deletePnf(pnf);
+ execution.setVariable("aaiPnfRollback", true);
+ } catch (Exception ex) {
+ logger.error("Exception occurred in AAIDeleteTasks deletePnf process", ex);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
/**
* BPMN access method to delete the ServiceInstance from A&AI.
*