use of org.onap.so.serviceinstancebeans.CloudConfiguration in project so by onap.
the class BpmnRequestBuilderTest method test_getCloudConfigurationVfModuleReplace.
@Test
public void test_getCloudConfigurationVfModuleReplace() throws Exception {
String vnfId = "vnfId";
String vfModuleId = "vfModuleId";
GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
CloudConfiguration result = reqBuilder.getCloudConfigurationVfModuleReplace(vnfId, vfModuleId);
assertEquals("0422ffb57ba042c0800a29dc85ca70f8", result.getTenantId());
assertEquals("cloudOwner", result.getCloudOwner());
assertEquals("regionOne", result.getLcpCloudRegionId());
}
use of org.onap.so.serviceinstancebeans.CloudConfiguration in project so by onap.
the class ServiceInstancesUnitTest method setCloudConfigurationCurrentActiveRequestTest.
@Test
public void setCloudConfigurationCurrentActiveRequestTest() {
CloudConfiguration cloudConfiguration = new CloudConfiguration();
cloudConfiguration.setTenantId("tenantId");
cloudConfiguration.setLcpCloudRegionId("lcpCloudRegionId");
InfraActiveRequests currentActiveRequest = new InfraActiveRequests();
serviceInstances.setCloudConfigurationCurrentActiveRequest(cloudConfiguration, currentActiveRequest);
assertEquals("tenantId", currentActiveRequest.getTenantId());
assertEquals("lcpCloudRegionId", currentActiveRequest.getCloudRegion());
}
Aggregations