summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-09-08 16:04:51 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-09-08 22:33:28 -0400
commit032c4e3bffa6171e5ea0f7fd584d86cfc16ac31c (patch)
tree6614308f00a7ebd034d63d77dea288c2777a190e /bpmn/MSOCommonBPMN/src/main/java
parent8ad64f284cfcecb63dafa787df6fd8a1d2e2b91d (diff)
stability fixes
fixed bean error fixed execution variable name do not explicitly set hibernate objects Removed remaing references to tunnel-xconnect fixed virtual link case Change-Id: Ia5a59794e84beadcbf259efb899878cc4465ca57 Issue-ID: SO-997 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java29
1 files changed, 19 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index 8e36cc5f8c..fc48996b9b 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -890,7 +890,7 @@ public class BBInputSetup implements JavaDelegate {
if (bbName.contains(NETWORK) && !bbName.contains(NETWORK_COLLECTION)) {
String networkId = lookupKeyMap.get(ResourceKey.NETWORK_ID);
ModelInfo networkModelInfo = new ModelInfo();
- if(!Boolean.TRUE.equals(executeBB.getBuildingBlock().getIsVirtualLink())) {
+ if((!Boolean.TRUE.equals(executeBB.getBuildingBlock().getIsVirtualLink()))) {
NetworkResourceCustomization networkCust = getNetworkCustomizationByKey(key, service);
if (networkCust != null) {
networkModelInfo.setModelCustomizationUuid(networkCust.getModelCustomizationUUID());
@@ -901,7 +901,13 @@ public class BBInputSetup implements JavaDelegate {
}
} else {
msoLogger.debug("Orchestrating on Collection Network Resource Customization");
- serviceInstance.getNetworks().add(getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId));
+ CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key);
+ L3Network l3Network = getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId, collectionNetworkResourceCust, serviceInstance);
+ NetworkResourceCustomization networkResourceCustomization =
+ mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust);
+ if(l3Network != null) {
+ l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization));
+ }
}
} else if(bbName.contains("Configuration")) {
String configurationId = lookupKeyMap.get(ResourceKey.CONFIGURATION_ID);
@@ -917,15 +923,18 @@ public class BBInputSetup implements JavaDelegate {
}
protected L3Network getVirtualLinkL3Network(Map<ResourceKey, String> lookupKeyMap, String bbName, String key,
- String networkId) {
- CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key);
- if(collectionNetworkResourceCust != null && (bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString())
+ String networkId, CollectionNetworkResourceCustomization collectionNetworkResourceCust, ServiceInstance serviceInstance) {
+ if(collectionNetworkResourceCust != null) {
+ if((bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString())
|| bbName.equalsIgnoreCase(AssignFlows.NETWORK_MACRO.toString()))) {
- NetworkResourceCustomization networkResourceCustomization =
- mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust);
- L3Network l3Network = createNetwork(lookupKeyMap, null, networkId, null);
- l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization));
- return l3Network;
+ serviceInstance.getNetworks().add(createNetwork(lookupKeyMap, null, networkId, null));
+ } else {
+ for (L3Network network : serviceInstance.getNetworks()) {
+ if (network.getNetworkId().equalsIgnoreCase(networkId)) {
+ return network;
+ }
+ }
+ }
}
return null;
}