aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-12-04 15:33:20 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-12-04 15:33:21 -0500
commit815bcc529480e122c270771dc974cba3d754233e (patch)
tree833c648d8218fb80aa200003a6d37fb15c783797 /bpmn/MSOCommonBPMN
parent9a3841eadc588c3b3f50f2351b741edd139ca13c (diff)
Updated Network Logic
Added logic to get aggregate route, updated unit test, fixed bugs, refactored select code. Change-Id: I3269da1967ba903dd11459f76030c3fc2aad797a Issue-ID: SO-1270 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java36
2 files changed, 24 insertions, 18 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java
index 343bd95eaa..781eba3332 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java
@@ -101,6 +101,8 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> {
private ModelInfoNetwork modelInfoNetwork;
@JsonProperty("aggregate-routes")
private List<AggregateRoute> aggregateRoutes = new ArrayList<>();
+ @JsonProperty("vpn-binding")
+ private List<VpnBinding> vpnBindings = new ArrayList<>();
public ModelInfoNetwork getModelInfoNetwork() {
return modelInfoNetwork;
@@ -261,6 +263,10 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> {
return aggregateRoutes;
}
+ public List<VpnBinding> getVpnBindings(){
+ return vpnBindings;
+ }
+
@Override
public boolean equals(final Object other) {
if (!(other instanceof L3Network)) {
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java
index 0398c87d69..d5b5cde99b 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java
@@ -290,7 +290,7 @@ public class BuildingBlockTestDataSetup{
customer.setSubscriberType("testSubscriberType" + customerCounter);
customer.setServiceSubscription(buildServiceSubscription());
-
+
return customer;
}
@@ -341,50 +341,50 @@ public class BuildingBlockTestDataSetup{
customer.setServiceSubscription(buildServiceSubscription());
gBBInput.setCustomer(customer);
-
+
return customer;
}
-
+
public Collection setCollection() {
Collection collection = new Collection();
collection.setId("testId");
-
+
ServiceInstance serviceInstance = null;
-
+
try {
serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID));
} catch(BBObjectNotFoundException e) {
serviceInstance = setServiceInstance();
}
-
+
serviceInstance.setCollection(collection);
-
+
return collection;
}
-
+
public InstanceGroup setInstanceGroup() {
InstanceGroup instanceGroup = new InstanceGroup();
instanceGroup.setId("testId");
instanceGroup.setInstanceGroupFunction("testInstanceGroupFunction");
-
+
Collection collection = null;
-
+
try {
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID));
collection = serviceInstance.getCollection();
-
+
if (collection == null) {
collection = setCollection();
}
} catch(BBObjectNotFoundException e) {
collection = setCollection();
}
-
+
collection.setInstanceGroup(instanceGroup);
-
+
return instanceGroup;
}
-
+
public VpnBinding buildVpnBinding() {
vpnBindingCounter++;
@@ -664,12 +664,12 @@ public class BuildingBlockTestDataSetup{
modelInfo.setModelUuid("testAllottedModelUuid" + uniqueIdentifier);
modelInfo.setModelVersion("testAllottedModelVersion" + uniqueIdentifier);
modelInfo.setModelInstanceName("testAllottedInstanceName" + uniqueIdentifier);
-
+
ar.setModelInfoAllottedResource(modelInfo);
-
+
return ar;
}
-
+
public Configuration setConfiguration () {
Configuration config = new Configuration();
config.setConfigurationId("testConfigurationId");
@@ -679,7 +679,7 @@ public class BuildingBlockTestDataSetup{
modelInfoConfig.setModelInvariantId("modelInvariantId");
modelInfoConfig.setPolicyName("policyName");
config.setModelInfoConfiguration(modelInfoConfig);
-
+
List<Configuration> configurations = new ArrayList<>();
configurations.add(config);
ServiceInstance serviceInstance = new ServiceInstance();