use of org.onap.so.audit.beans.AuditInventory in project so by onap.
the class AuditTasksTest method setupAuditVariableTest.
@Test
public void setupAuditVariableTest() throws Exception {
AuditInventory expectedAuditInventory = new AuditInventory();
expectedAuditInventory.setCloudOwner("testCloudOwner");
expectedAuditInventory.setCloudRegion("testLcpCloudRegionId");
expectedAuditInventory.setHeatStackName("testVfModuleName1");
expectedAuditInventory.setVfModuleId("testVfModuleId1");
expectedAuditInventory.setTenantId("testTenantId");
expectedAuditInventory.setGenericVnfId("testVnfId1");
expectedAuditInventory.setMsoRequestId("fb06f44c-c797-4f38-9b17-b4b975344600");
auditTasks.setupAuditVariable(execution);
// assertThat((AuditInventory) execution.getVariable("auditInventory"), sameBeanAs(expectedAuditInventory));
}
use of org.onap.so.audit.beans.AuditInventory in project so by onap.
the class AuditTasks method createAuditInventory.
private AuditInventory createAuditInventory(BuildingBlockExecution execution) throws BBObjectNotFoundException {
AuditInventory auditInventory = new AuditInventory();
GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
CloudRegion cloudRegion = gBBInput.getCloudRegion();
auditInventory.setMsoRequestId(gBBInput.getRequestContext().getMsoRequestId());
auditInventory.setCloudOwner(cloudRegion.getCloudOwner());
auditInventory.setCloudRegion(cloudRegion.getLcpCloudRegionId());
auditInventory.setTenantId(cloudRegion.getTenantId());
auditInventory.setVfModuleId(vfModule.getVfModuleId());
auditInventory.setHeatStackName(vfModule.getVfModuleName());
auditInventory.setGenericVnfId(genericVnf.getVnfId());
return auditInventory;
}
Aggregations