From f5e4cbd3128aaf05c59a4ae2a32d7d4435245556 Mon Sep 17 00:00:00 2001 From: Sebastien Premont-Tendland Date: Tue, 7 Apr 2020 12:05:24 -0400 Subject: 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 Change-Id: Ic90b74a25a5790f6d9ddb6919771735b1c081cb5 --- .../db/migration/V9.0.1__AddMissingTransitionStates.sql | 17 +++++++++++++++++ .../V9.0__AddConfiguredForVnfOrchestrationStatus.sql | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.0.1__AddMissingTransitionStates.sql 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'; -- cgit 1.2.3-korg