aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2020-03-24 10:28:02 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-03-24 10:28:04 -0400
commite981910b36422a9a7acf5a0ee9c60803f1d113ff (patch)
tree903c4a04cf10ce7a19d237cb8129f1757a34e23e /bpmn/so-bpmn-tasks/src
parent3b6caf9cc8e1341ea000cb55ae277f622c816dda (diff)
Ingest and Process Service Function
Intial commit of writing service function to AAI Update schema.sql table to pass all unit tests Update local sql to setup CI server for test Update schema to work and fix passwords Issue-ID: SO-2763 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I8c517a485841574cde849e1c4e86c3bb7b7dcf89
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-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
2 files changed, 28 insertions, 6 deletions
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