From a26443597d3c617dda67228cbecd77808a04a18d Mon Sep 17 00:00:00 2001 From: SagarS Date: Tue, 31 May 2022 09:37:33 +0100 Subject: [SO] Implementing CNFM API flyway corrections Change-Id: I834c95875816876822db99d700009b5aa4968584 Signed-off-by: SagarS Issue-ID: SO-3905 --- .../src/main/resources/db/migration/R__MacroData.sql | 9 ++++++--- .../main/resources/db/migration/V9.1__AddCNFMFlowmappings.sql | 10 ---------- 2 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.1__AddCNFMFlowmappings.sql (limited to 'adapters/mso-catalog-db-adapter/src') diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql index 1d77854a2a..1f2e49be54 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql @@ -40,7 +40,8 @@ INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, I ('VFModule-ScaleOut', 'scaleOut', 'VfModule', true, true, '7','7', 'DEFAULT', '*'), ('VNF-InPlaceUpdate', 'inPlaceSoftwareUpdate', 'Vnf', true, true, '7','7', 'DEFAULT', '*'), ('VNF-Config-Update', 'applyUpdatedConfig', 'Vnf', true, true, '7','7', 'DEFAULT', '*'), -('CNF-Macro-Upgrade', 'upgradeCnf', 'Vnf', false,true, '7', '7','DEFAULT', '*'); +('CNF-Macro-Upgrade', 'upgradeCnf', 'Vnf', false,true, '7', '7','DEFAULT', '*'), +('Cnf-Create', 'createInstance', 'Cnf', true, true, '7','7','DEFAULT', '*'); INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, SCOPE, ACTION, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES @@ -269,7 +270,8 @@ INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, SC ('CNF-Macro-Upgrade', '9', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'CNF-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), ('CNF-Macro-Upgrade', '10', 'ChangeModelVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'CNF-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), ('CNF-Macro-Upgrade', '11', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'CNF-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), -('CNF-Macro-Upgrade', '12', 'AAIUnsetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'CNF-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')); +('CNF-Macro-Upgrade', '12', 'AAIUnsetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'CNF-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), +('CNF-Create', '1', 'CnfInstantiateBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Cnf-Create' and CLOUD_OWNER = 'DEFAULT')); INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY, SECONDARY_POLICY, REG_EX_ERROR_MESSAGE, SERVICE_ROLE) VALUES @@ -427,7 +429,8 @@ VALUES ('ControllerExecutionBB', 'NO_VALIDATE', 'CUSTOM'), ('StatusCheckBB', 'NO_VALIDATE', 'CUSTOM'), ('HealthCheckBB', 'NO_VALIDATE', 'CUSTOM'), -('UpgradeVfModuleBB', 'NO_VALIDATE', 'CUSTOM'); +('UpgradeVfModuleBB', 'NO_VALIDATE', 'CUSTOM'), +('CnfInstantiateBB', 'CNF', 'ACTIVATE'); INSERT INTO orchestration_status_state_transition_directive (resource_type, orchestration_status, target_action, flow_directive) diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.1__AddCNFMFlowmappings.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.1__AddCNFMFlowmappings.sql deleted file mode 100644 index 80c7014d6b..0000000000 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V9.1__AddCNFMFlowmappings.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE catalogdb; - -INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, IS_TOPLEVELFLOW, MIN_API_VERSION, MAX_API_VERSION,cloud_owner,service_type) VALUES -('Cnf-Create', 'createInstance', 'Cnf', true, true, '1','1','DEFAULT', '*') - -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES -('CNF-Create', '1', 'CnfInstantiateBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Cnf-Create')) - -INSERT INTO building_block_detail (BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) VALUES -('CnfInstantiateBB', 'CNF', 'ACTIVATE') -- cgit 1.2.3-korg