use of org.onap.so.bpmn.core.domain.ModuleResource in project so by onap.
the class InstnaceResourceListTest method testVFResourceWithModule.
@Test
public void testVFResourceWithModule() throws IOException {
String uuiRequest = new String(Files.readAllBytes(Paths.get(RESOURCE_PATH + "InstanceResourceList" + ".json")));
VnfResource vnfResource = new VnfResource();
vnfResource.setResourceInput("{\"a\":\"ipaddress|127.0.0.1\"}");
// Come from package org.onap.so.bpmn.core.domain.VnfResourceTest
List<ModuleResource> moduleResources;
moduleResources = new ArrayList<>();
ModuleResource moduleresource = getModuleResource();
moduleResources.add(moduleresource);
vnfResource.setModules(moduleResources);
List<Resource> instanceResourceList = InstanceResourceList.getInstanceResourceList(vnfResource, uuiRequest);
Assert.assertEquals(2, instanceResourceList.size());
Assert.assertEquals(ResourceType.VNF, instanceResourceList.get(0).getResourceType());
Assert.assertEquals(ResourceType.MODULE, instanceResourceList.get(1).getResourceType());
}
use of org.onap.so.bpmn.core.domain.ModuleResource in project so by onap.
the class InstnaceResourceListTest method getModuleResource.
private ModuleResource getModuleResource() {
ModuleResource moduleresource = new ModuleResource();
moduleresource.setVfModuleName("vfModuleName");
moduleresource.setHeatStackId("heatStackId");
moduleresource.setIsBase(true);
moduleresource.setVfModuleLabel("vfModuleLabel");
moduleresource.setInitialCount(0);
moduleresource.setVfModuleType("vfModuleType");
moduleresource.setHasVolumeGroup(true);
return moduleresource;
}
Aggregations