summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoServiceInstance.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java31
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java3
3 files changed, 38 insertions, 6 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoServiceInstance.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoServiceInstance.java
index bc330eeafd..b554d7a9ba 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoServiceInstance.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoServiceInstance.java
@@ -35,6 +35,8 @@ public class ModelInfoServiceInstance extends ModelInfoMetadata implements Seria
private String serviceType;
@JsonProperty("service-role")
private String serviceRole;
+ @JsonProperty("service-function")
+ private String serviceFunction;
@JsonProperty("environment-context")
private String environmentContext;
@JsonProperty("workload-context")
@@ -77,6 +79,14 @@ public class ModelInfoServiceInstance extends ModelInfoMetadata implements Seria
this.serviceRole = serviceRole;
}
+ public String getServiceFunction() {
+ return serviceFunction;
+ }
+
+ public void setServiceFunction(String serviceFunction) {
+ this.serviceFunction = serviceFunction;
+ }
+
public String getEnvironmentContext() {
return environmentContext;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
index 9de8e184f2..614401d32a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
@@ -22,18 +22,33 @@
package org.onap.so.client.aai.mapper;
-import org.modelmapper.ModelMapper;
-import org.modelmapper.PropertyMap;
-import org.onap.aai.domain.yang.RouteTargets;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.*;
-import org.springframework.stereotype.Component;
import java.util.List;
import org.modelmapper.Converter;
+import org.modelmapper.ModelMapper;
+import org.modelmapper.PropertyMap;
import org.modelmapper.spi.MappingContext;
+import org.onap.aai.domain.yang.RouteTargets;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CtagAssignment;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.HostRoute;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTarget;
import org.onap.so.bpmn.servicedecomposition.bbobjects.SegmentationAssignment;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CtagAssignment;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
+import org.springframework.stereotype.Component;
@Component
public class AAIObjectMapper {
@@ -46,6 +61,7 @@ public class AAIObjectMapper {
protected void configure() {
map().setServiceType(source.getModelInfoServiceInstance().getServiceType());
map().setServiceRole(source.getModelInfoServiceInstance().getServiceRole());
+ map().setServiceFunction(source.getModelInfoServiceInstance().getServiceFunction());
map().setModelInvariantId(source.getModelInfoServiceInstance().getModelInvariantUuid());
map().setModelVersionId(source.getModelInfoServiceInstance().getModelUuid());
map().setEnvironmentContext(source.getModelInfoServiceInstance().getEnvironmentContext());
@@ -178,6 +194,7 @@ public class AAIObjectMapper {
private Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets =
new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() {
+ @Override
public org.onap.aai.domain.yang.Subnets convert(
MappingContext<List<Subnet>, org.onap.aai.domain.yang.Subnets> context) {
return mapToAAISubNets(context.getSource());
@@ -186,6 +203,7 @@ public class AAIObjectMapper {
private Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments =
new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() {
+ @Override
public org.onap.aai.domain.yang.CtagAssignments convert(
MappingContext<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> context) {
return mapToAAICtagAssignmentList(context.getSource());
@@ -194,6 +212,7 @@ public class AAIObjectMapper {
private Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments =
new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() {
+ @Override
public org.onap.aai.domain.yang.SegmentationAssignments convert(
MappingContext<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> context) {
return mapToAAISegmentationAssignmentList(context.getSource());
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
index dc64e4ee48..1e58a83f0a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
@@ -138,6 +138,7 @@ public class AAIObjectMapperTest {
ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
modelInfoServiceInstance.setServiceType("SITYPE");
modelInfoServiceInstance.setServiceRole("SIROLE");
+ modelInfoServiceInstance.setServiceFunction("SIFUNCTION");
modelInfoServiceInstance.setModelInvariantUuid("MIUUID");
modelInfoServiceInstance.setModelUuid("MUUID");
modelInfoServiceInstance.setEnvironmentContext("EC");
@@ -163,6 +164,8 @@ public class AAIObjectMapperTest {
serviceInstance.getModelInfoServiceInstance().getEnvironmentContext());
assertEquals(AAIServiceInstance.getWorkloadContext(),
serviceInstance.getModelInfoServiceInstance().getWorkloadContext());
+ assertEquals(AAIServiceInstance.getServiceFunction(),
+ serviceInstance.getModelInfoServiceInstance().getServiceFunction());
}
@Test