use of org.onap.so.bpmn.core.domain.NetworkResource in project so by onap.
the class OofHomingTestIT method setVariables2.
private void setVariables2(Map<String, Object> variables) {
List<NetworkResource> netList = new ArrayList<NetworkResource>();
NetworkResource net = new NetworkResource();
net.setResourceId("testResourceIdNet");
ModelInfo netModel = new ModelInfo();
netModel.setModelCustomizationUuid("testModelCustomizationUuidNet");
netModel.setModelInvariantUuid("testModelInvariantIdNet");
netModel.setModelName("testModelNameNet");
netModel.setModelVersion("testModelVersionNet");
net.setModelInfo(netModel);
netList.add(net);
NetworkResource net2 = new NetworkResource();
net2.setResourceId("testResourceIdNet2");
ModelInfo netModel2 = new ModelInfo();
netModel2.setModelCustomizationUuid("testModelCustomizationUuidNet2");
netModel2.setModelCustomizationName("testModelCustomizationNameNet2");
netModel2.setModelInvariantUuid("testModelInvariantIdNet2");
netModel2.setModelName("testModelNameNet2");
netModel2.setModelVersion("testModelVersionNet2");
net2.setModelInfo(netModel2);
netList.add(net2);
serviceDecomposition.setNetworkResources(netList);
variables.put("homingService", "oof");
HashMap customerLocation = new HashMap<String, Object>();
customerLocation.put("customerLatitude", "32.89748");
customerLocation.put("customerLongitude", "-97.040443");
customerLocation.put("customerName", "xyz");
variables.put("customerLatitude", "32.89748");
variables.put("customerLongitude", "-97.040443");
variables.put("customerName", "xyz");
variables.put("customerLocation", customerLocation);
variables.put("cloudOwner", "amazon");
variables.put("cloudRegionId", "TNZED");
variables.put("isDebugLogEnabled", "true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "testServiceInstanceId");
variables.put("serviceDecomposition", serviceDecomposition);
variables.put("subscriberInfo", subscriber2);
}
use of org.onap.so.bpmn.core.domain.NetworkResource in project so by onap.
the class OofHomingIT method setVariables2.
private void setVariables2(Map<String, Object> variables) {
List<NetworkResource> netList = new ArrayList<NetworkResource>();
NetworkResource net = new NetworkResource();
net.setResourceId("testResourceIdNet");
ModelInfo netModel = new ModelInfo();
netModel.setModelCustomizationUuid("testModelCustomizationUuidNet");
netModel.setModelInvariantUuid("testModelInvariantIdNet");
netModel.setModelName("testModelNameNet");
netModel.setModelVersion("testModelVersionNet");
net.setModelInfo(netModel);
netList.add(net);
NetworkResource net2 = new NetworkResource();
net2.setResourceId("testResourceIdNet2");
ModelInfo netModel2 = new ModelInfo();
netModel2.setModelCustomizationUuid("testModelCustomizationUuidNet2");
netModel2.setModelCustomizationName("testModelCustomizationNameNet2");
netModel2.setModelInvariantUuid("testModelInvariantIdNet2");
netModel2.setModelName("testModelNameNet2");
netModel2.setModelVersion("testModelVersionNet2");
net2.setModelInfo(netModel2);
netList.add(net2);
serviceDecomposition.setNetworkResources(netList);
variables.put("homingService", "oof");
HashMap customerLocation = new HashMap<String, Object>();
customerLocation.put("customerLatitude", "32.89748");
customerLocation.put("customerLongitude", "-97.040443");
customerLocation.put("customerName", "xyz");
variables.put("customerLatitude", "32.89748");
variables.put("customerLongitude", "-97.040443");
variables.put("customerName", "xyz");
variables.put("customerLocation", customerLocation);
variables.put("cloudOwner", "amazon");
variables.put("cloudRegionId", "TNZED");
variables.put("vgMuxInfraModelInvariantId", "testModelInvariantIdAR");
variables.put("vgMuxInfraModelId", "testArModelUuid");
variables.put("isDebugLogEnabled", "true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "testServiceInstanceId123");
variables.put("serviceInstanceName", "testServiceName");
variables.put("serviceDecomposition", serviceDecomposition);
variables.put("subscriberInfo", subscriber2);
}
use of org.onap.so.bpmn.core.domain.NetworkResource in project so by onap.
the class DecomposeJsonUtilTest method testJsonToNetworkResource.
@Test
public void testJsonToNetworkResource() throws JsonDecomposingException {
networkResource = createNetworkResourceData();
NetworkResource networkResourceObj = DecomposeJsonUtil.jsonToNetworkResource(networkResource.toString());
assertEquals(networkResource.getResourceId(), networkResourceObj.getResourceId());
}
use of org.onap.so.bpmn.core.domain.NetworkResource in project so by onap.
the class DecomposeJsonUtilTest method testJsonToNetworkResource_JsonDecomposingException.
@Test
public void testJsonToNetworkResource_JsonDecomposingException() throws JsonDecomposingException {
expectedException.expect(JsonDecomposingException.class);
// wrong object
vnfResource = createVnfResourceData();
NetworkResource networkResourceObj = DecomposeJsonUtil.jsonToNetworkResource(vnfResource.toString());
}
use of org.onap.so.bpmn.core.domain.NetworkResource in project so by onap.
the class DecomposeJsonUtilTest method createNetworkResourceData.
private NetworkResource createNetworkResourceData() {
networkResource = new NetworkResource();
networkResource.setNetworkRole("networkRole");
networkResource.setResourceId("resourceId");
return networkResource;
}
Aggregations