aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json108
3 files changed, 61 insertions, 51 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java
index 099f084637..5e7a4796c4 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java
@@ -69,7 +69,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
private OwningEntity owningEntity;
@JsonProperty("serviceVnfs")
private List <VnfResource> vnfResources;
- @JsonProperty("networkResource")
+ @JsonProperty("serviceNetworks")
private List <NetworkResource> networkResources;
@JsonProperty("serviceAllottedResources")
private List <AllottedResource> allottedResources;
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java
index 82470f125b..5d8d55152c 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java
@@ -103,6 +103,8 @@ public class ServiceDecompositionTest {
serviceDecomp.addResource(allottedResource);
serviceDecomp.addResource(configResource);
+ System.out.println(serviceDecomp.toJsonString());
+
assertThat(serviceDecomp.getServiceResource(vnfResource.getResourceId()), sameBeanAs(vnfResource));
assertThat(serviceDecomp.getServiceResource(networkResource.getResourceId()), sameBeanAs(networkResource));
assertThat(serviceDecomp.getServiceResource(allottedResource.getResourceId()), sameBeanAs(allottedResource));
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json
index c424293ca2..f094e99782 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json
+++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json
@@ -1,51 +1,59 @@
{
- "serviceResources" : {
- "modelInfo" : {
- "modelName" : "modelName",
- "modelUuid" : "modelUuid",
- "modelInvariantUuid" : "modelInvariantUuid",
- "modelVersion" : "modelVersion",
- "modelCustomizationUuid" : "modelCustomizationUuid",
- "modelCustomizationName" : "modelCustomizationName",
- "modelInstanceName" : "modelInstanceName",
- "modelType" : "modelType"
- },
- "serviceType" : "serviceType",
- "serviceRole" : "serviceRole",
- "project" : {},
- "owningEntity" : {},
- "serviceInstance" : {
- "serviceInstanceId" : "serviceInstanceId"
- },
- "serviceVnfs" : [
- {
- "resourceId" : "vnfResourceId",
- "resourceType" : "VNF",
- "resourceInstance" : {},
- "homingSolution" : {
- "license" : {},
- "rehome" : false
- },
- "vfModules" : []
- }
- ],
- "networkResource" : [
- {
- "resourceId" : "networkResourceId",
- "resourceType" : "NETWORK"
- }
- ],
- "serviceAllottedResources" : [
- {
- "resourceId" : "allottedResourceId",
- "resourceType" : "ALLOTTED_RESOURCE"
- }
- ],
- "configResource" : [
- {
- "resourceId" : "configResourceId",
- "resourceType" : "CONFIGURATION"
- }
- ]
- }
-}
+ "serviceResources" : {
+ "serviceInstance" : {
+ "instanceId" : "serviceInstanceId",
+ "customer" : { }
+ },
+ "modelInfo" : {
+ "modelName" : "modelName",
+ "modelUuid" : "modelUuid",
+ "modelInvariantUuid" : "modelInvariantUuid",
+ "modelVersion" : "modelVersion",
+ "modelCustomizationUuid" : "modelCustomizationUuid",
+ "modelCustomizationName" : "modelCustomizationName",
+ "modelInstanceName" : "modelInstanceName",
+ "modelType" : "modelType"
+ },
+ "serviceType" : "serviceType",
+ "serviceRole" : "serviceRole",
+ "project" : { },
+ "owningEntity" : { },
+ "serviceVnfs" : [ {
+ "resourceId" : "vnfResourceId",
+ "resourceType" : "VNF",
+ "resourceInstance" : { },
+ "homingSolution" : {
+ "license" : { },
+ "rehome" : false
+ },
+ "vfModules" : [ ]
+ } ],
+ "serviceNetworks" : [ {
+ "resourceId" : "networkResourceId",
+ "resourceType" : "NETWORK",
+ "resourceInstance" : { },
+ "homingSolution" : {
+ "license" : { },
+ "rehome" : false
+ }
+ } ],
+ "serviceAllottedResources" : [ {
+ "resourceId" : "allottedResourceId",
+ "resourceType" : "ALLOTTED_RESOURCE",
+ "resourceInstance" : { },
+ "homingSolution" : {
+ "license" : { },
+ "rehome" : false
+ }
+ } ],
+ "configResource" : [ {
+ "resourceId" : "configResourceId",
+ "resourceType" : "CONFIGURATION",
+ "resourceInstance" : { },
+ "homingSolution" : {
+ "license" : { },
+ "rehome" : false
+ }
+ } ]
+ }
+} \ No newline at end of file