aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java/org
diff options
context:
space:
mode:
authorBonkur, Venkat (vb8416) <vb8416@att.com>2019-08-01 13:11:23 -0400
committerVenkat Bonkur <vb8416@att.com>2019-08-01 17:29:54 +0000
commit31abb56177f3ceab2b49f9752c658b9e8aa42d43 (patch)
treec8b40ce4f3a92cef4bd46b974cb6ae287b4eacc6 /bpmn/so-bpmn-tasks/src/main/java/org
parent0bf3a7f44ca4f0101c972029c7254606793627ad (diff)
Add SO Update to default the controller type query as "APPC" instead of null.
Make a change to treat a return of null from a controller type query as "APPC" This can avoid the nullpointer Exception and the default is set to APPC if the entry is missing in the controller_selection_reference table. Issue-ID: SO-2170 Signed-off-by: Bonkur, Venkat (vb8416) <vb8416@att.com> Change-Id: Ia76b2d06e4dacb8b7f6984edeb4d2758472192b1
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index eddcc94e71..43790544bf 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -51,6 +51,7 @@ public class AppcRunTasks {
public static final String ROLLBACK_VNF_STOP = "rollbackVnfStop";
public static final String ROLLBACK_VNF_LOCK = "rollbackVnfLock";
public static final String ROLLBACK_QUIESCE_TRAFFIC = "rollbackQuiesceTraffic";
+ public static final String CONTROLLER_TYPE_DEFAULT = "APPC";
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -112,7 +113,12 @@ public class AppcRunTasks {
ControllerSelectionReference controllerSelectionReference = catalogDbClient
.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, action.toString());
- String controllerType = controllerSelectionReference.getControllerName();
+ String controllerType = null;
+ if (controllerSelectionReference != null) {
+ controllerType = controllerSelectionReference.getControllerName();
+ } else {
+ controllerType = CONTROLLER_TYPE_DEFAULT;
+ }
String vfModuleId = null;
VfModule vfModule = null;