aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/FlowManipulatorListenerRunner.java28
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PostFlowManipulator.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PreFlowManipulator.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/HomingListener.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java4
-rw-r--r--releases/1.8.0.yaml36
-rw-r--r--version.properties2
12 files changed, 106 insertions, 25 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index 0512912b9f..04c6ea4ff7 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -488,7 +488,13 @@ public class HeatBridgeImpl implements HeatBridgeApi {
for (Pserver pserver : serverHostnames.values()) {
AAIResourceUri uri = AAIUriFactory
.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserver.getHostname()));
- resourcesClient.createIfNotExists(uri, Optional.of(pserver));
+ if (resourcesClient.exists(uri)) {
+ Pserver updatePserver = new Pserver();
+ updatePserver.setPserverId(pserver.getPserverId());
+ resourcesClient.update(uri, updatePserver);
+ } else {
+ resourcesClient.create(uri, pserver);
+ }
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
index 1f6c0df90f..bbdd05bddc 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
@@ -247,8 +247,8 @@ public class AaiHelper {
Pserver pserver = new Pserver();
pserver.setInMaint(false);
pserver.setHostname(server.getHypervisorHostname());
- if (server.getId() != null) {
- pserver.setPserverId(server.getId());
+ if (server.getHostId() != null) {
+ pserver.setPserverId(server.getHostId());
}
if (server.getHost() != null) {
pserver.setPserverName2(server.getHost());
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/FlowManipulatorListenerRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/FlowManipulatorListenerRunner.java
index c02afc3327..054cc378ef 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/FlowManipulatorListenerRunner.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/FlowManipulatorListenerRunner.java
@@ -41,13 +41,18 @@ public class FlowManipulatorListenerRunner extends ListenerRunner {
private static Logger logger = LoggerFactory.getLogger(FlowManipulatorListenerRunner.class);
- protected List<FlowManipulator> flowManipulators;
+ protected List<PreFlowManipulator> flowManipulators;
+
+ protected List<PostFlowManipulator> postflowManipulators;
@PostConstruct
protected void init() {
flowManipulators = new ArrayList<>(
- Optional.ofNullable(context.getBeansOfType(FlowManipulator.class)).orElse(new HashMap<>()).values());
+ Optional.ofNullable(context.getBeansOfType(PreFlowManipulator.class)).orElse(new HashMap<>()).values());
+
+ postflowManipulators = new ArrayList<>(Optional.ofNullable(context.getBeansOfType(PostFlowManipulator.class))
+ .orElse(new HashMap<>()).values());
}
@@ -56,11 +61,26 @@ public class FlowManipulatorListenerRunner extends ListenerRunner {
do {
sequenceBeforeFlowManipulator = execution.getVariable(BBConstants.G_CURRENT_SEQUENCE);
ExecuteBuildingBlock currentBB = flowsToExecute.get(execution.getCurrentSequence());
- List<FlowManipulator> filtered = filterListeners(flowManipulators,
+ List<PreFlowManipulator> filtered = filterListeners(flowManipulators,
+ (item -> item.shouldRunFor(currentBB.getBuildingBlock().getBpmnFlowName(),
+ execution.getCurrentSequence() == 0, execution)));
+
+ logger.info("Running pre flow manipulators:\n{}",
+ filtered.stream().map(item -> item.getClass().getName()).collect(Collectors.joining("\n")));
+ filtered.forEach(item -> item.run(flowsToExecute, currentBB, execution));
+ } while (isBuildingBlockSkipped(sequenceBeforeFlowManipulator, execution));
+ }
+
+ public void postModifyFlows(List<ExecuteBuildingBlock> flowsToExecute, BuildingBlockExecution execution) {
+ int sequenceBeforeFlowManipulator;
+ do {
+ sequenceBeforeFlowManipulator = execution.getVariable(BBConstants.G_CURRENT_SEQUENCE);
+ ExecuteBuildingBlock currentBB = flowsToExecute.get(execution.getCurrentSequence() - 1);
+ List<PostFlowManipulator> filtered = filterListeners(postflowManipulators,
(item -> item.shouldRunFor(currentBB.getBuildingBlock().getBpmnFlowName(),
execution.getCurrentSequence() == 0, execution)));
- logger.info("Running flow manipulators:\n{}",
+ logger.info("Running post flow manipulators:\n{}",
filtered.stream().map(item -> item.getClass().getName()).collect(Collectors.joining("\n")));
filtered.forEach(item -> item.run(flowsToExecute, currentBB, execution));
} while (isBuildingBlockSkipped(sequenceBeforeFlowManipulator, execution));
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PostFlowManipulator.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PostFlowManipulator.java
new file mode 100644
index 0000000000..b0e259b801
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PostFlowManipulator.java
@@ -0,0 +1,5 @@
+package org.onap.so.bpmn.common.listener.flowmanipulator;
+
+public interface PostFlowManipulator extends FlowManipulator {
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PreFlowManipulator.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PreFlowManipulator.java
new file mode 100644
index 0000000000..1020f65695
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/flowmanipulator/PreFlowManipulator.java
@@ -0,0 +1,5 @@
+package org.onap.so.bpmn.common.listener.flowmanipulator;
+
+public interface PreFlowManipulator extends FlowManipulator {
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index b756772188..ec2ca74fa7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -420,15 +420,24 @@ public class WorkflowActionBBTasks {
}
public void postProcessingExecuteBB(DelegateExecution execution) {
- List<ExecuteBuildingBlock> flowsToExecute =
- (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
- String handlingCode = (String) execution.getVariable(HANDLINGCODE);
- final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE);
- int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
- ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1);
- String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName();
- if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte && "Success".equalsIgnoreCase(handlingCode)) {
- postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute);
+ try {
+ List<ExecuteBuildingBlock> flowsToExecute =
+ (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
+ String handlingCode = (String) execution.getVariable(HANDLINGCODE);
+ final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE);
+ int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
+ logger.debug("Current Sequence: {}", currentSequence);
+ ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1);
+ String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName();
+ if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte
+ && "Success".equalsIgnoreCase(handlingCode)) {
+ postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute);
+ }
+
+ flowManipulatorListenerRunner.postModifyFlows(flowsToExecute, new DelegateExecutionImpl(execution));
+ } catch (Exception ex) {
+ logger.error("Exception in postProcessingExecuteBB", ex);
+ workflowAction.buildAndThrowException(execution, "Failed to post process Execute BB");
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/HomingListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/HomingListener.java
index bc32489944..b90844a733 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/HomingListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/HomingListener.java
@@ -22,12 +22,12 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks.listeners;
import java.util.List;
import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
+import org.onap.so.bpmn.common.listener.flowmanipulator.PreFlowManipulator;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.springframework.stereotype.Component;
@Component
-public class HomingListener implements FlowManipulator {
+public class HomingListener implements PreFlowManipulator {
@Override
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
index 4cde9c1fc8..08e877956d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
@@ -26,7 +26,7 @@ import java.util.Optional;
import org.onap.so.bpmn.common.BBConstants;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.listener.db.PostCompletionRequestsDbListener;
-import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
+import org.onap.so.bpmn.common.listener.flowmanipulator.PreFlowManipulator;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
@@ -36,7 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
-public class MultiStageSkipListener implements FlowManipulator, PostCompletionRequestsDbListener {
+public class MultiStageSkipListener implements PreFlowManipulator, PostCompletionRequestsDbListener {
@Autowired
protected BBInputSetupUtils bbInputSetupUtils;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
index 564ee91fb2..3af839fbec 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java
@@ -27,7 +27,7 @@ import java.util.Set;
import org.apache.logging.log4j.util.Strings;
import org.onap.so.bpmn.common.BBConstants;
import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
+import org.onap.so.bpmn.common.listener.flowmanipulator.PreFlowManipulator;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.db.catalog.beans.PnfResourceCustomization;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
@@ -38,7 +38,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
@Component
-public class SkipCDSBuildingBlockListener implements FlowManipulator {
+public class SkipCDSBuildingBlockListener implements PreFlowManipulator {
@Autowired
private CatalogDbClient catalogDbClient;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java
index 83f61e3a4f..5ffba455b3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java
@@ -3,7 +3,7 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks.listeners;
import java.util.List;
import org.onap.so.bpmn.common.BBConstants;
import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
+import org.onap.so.bpmn.common.listener.flowmanipulator.PreFlowManipulator;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
-public class SkipConfigVnfListener implements FlowManipulator {
+public class SkipConfigVnfListener implements PreFlowManipulator {
private final CatalogDbClient catalogDbClient;
diff --git a/releases/1.8.0.yaml b/releases/1.8.0.yaml
new file mode 100644
index 0000000000..99bf277e47
--- /dev/null
+++ b/releases/1.8.0.yaml
@@ -0,0 +1,36 @@
+
+---
+distribution_type: 'container'
+container_release_tag: '1.8.0'
+project: 'so'
+log_dir: 'so-maven-docker-stage-master/635/'
+ref: '31aba9aba28d7be2417a99ba7e862a7a8c68005b'
+containers:
+ - name: 'so/vnfm-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/catalog-db-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/request-db-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/openstack-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/sdnc-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/vfc-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/sdc-controller'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/bpmn-infra'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/so-monitoring'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/api-handler-infra'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/nssmf-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/mso-cnf-adapter'
+ version: '1.8.0-20210210T0420'
+ - name: 'so/so-oof-adapter'
+ version: '1.8.0-20210215T1458'
+ - name: 'so/so-etsi-nfvo-ns-lcm'
+ version: '1.8.0-20210215T1458'
diff --git a/version.properties b/version.properties
index 11f0383267..b3f28cde3f 100644
--- a/version.properties
+++ b/version.properties
@@ -4,7 +4,7 @@
major=1
minor=8
-patch=0
+patch=1
base_version=${major}.${minor}.${patch}