aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/main/resources/db
diff options
context:
space:
mode:
authorSebastien Premont-Tendland <sebastien.premont@bell.ca>2020-04-07 12:05:24 -0400
committerSebastien Premont-Tendland <sebastien.premont@bell.ca>2020-04-07 12:05:24 -0400
commitf5e4cbd3128aaf05c59a4ae2a32d7d4435245556 (patch)
tree5fb15dd148d7188025f6610872e89879866778c3 /adapters/mso-catalog-db-adapter/src/main/resources/db
parentda123b489a80779f3162d9e007616c6a083414bc (diff)
Orchestration transitions missing for post instantiation workflow
This is a list of transition states that were added internally at Bell when working with the BB workflow and post instantiation. Those are to support Rollback and Delete even if the VNF is in the status ConfigAssigned, Configure or Configured. The missing trasition states was causing the Rollback or Delete to fail. Also update the initial script to support already existing data. Issue-ID: SO-2798 Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca> Change-Id: Ic90b74a25a5790f6d9ddb6919771735b1c081cb5
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources/db')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0.1__AddMissingTransitionStates.sql17
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0__AddConfiguredForVnfOrchestrationStatus.sql2
2 files changed, 18 insertions, 1 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0.1__AddMissingTransitionStates.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0.1__AddMissingTransitionStates.sql
new file mode 100644
index 0000000000..c0cec5da31
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0.1__AddMissingTransitionStates.sql
@@ -0,0 +1,17 @@
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGASSIGNED', 'DEACTIVATE', 'SILENT_SUCCESS') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'SILENT_SUCCES';
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGASSIGNED', 'UNASSIGN', 'CONTINUE') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'CONTINUE';
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGURE', 'DEACTIVATE', 'SILENT_SUCCESS') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'SILENT_SUCCES';
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGURE', 'UNASSIGN', 'CONTINUE') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'CONTINUE';
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGURED', 'UNASSIGN', 'CONTINUE') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'CONTINUE';
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES
+('VNF', 'CONFIGURED', 'DEACTIVATE', 'SILENT_SUCCESS') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE = 'SILENT_SUCCES';
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0__AddConfiguredForVnfOrchestrationStatus.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0__AddConfiguredForVnfOrchestrationStatus.sql
index 81e6092f5f..1d26c4c8d9 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0__AddConfiguredForVnfOrchestrationStatus.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0__AddConfiguredForVnfOrchestrationStatus.sql
@@ -1,2 +1,2 @@
INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE)
-VALUES ('VNF', 'CONFIGURED', 'ACTIVATE', 'CONTINUE');
+VALUES ('VNF', 'CONFIGURED', 'ACTIVATE', 'CONTINUE') ON DUPLICATE KEY UPDATE FLOW_DIRECTIVE='CONTINUE';