diff options
author | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2021-10-20 07:55:58 -0400 |
---|---|---|
committer | Jozsef Csongvai <jozsef.csongvai@bell.ca> | 2022-05-09 14:37:13 +0000 |
commit | 592465825549b999cc8aad811fba91736750bfaf (patch) | |
tree | 60a47f3def05668963d40a7960afd2f0dc131e9f /adapters | |
parent | e89df29768b65e4be077a8bcfe16fd1a915be3ee (diff) |
Switch over BBRollback to use DB lookups.
Issue-ID: SO-3793
Use feature provided by SO-3720.
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
Change-Id: I31f2c00df738c37d04e5ad901dd94c9c6d4b147e
Diffstat (limited to 'adapters')
2 files changed, 32 insertions, 0 deletions
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..20a404372f 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 @@ -878,3 +878,28 @@ DELETE FROM service_recipe where ACTION = 'upgradeInstance'; INSERT INTO service_recipe (ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, SERVICE_MODEL_UUID) VALUES ('upgradeInstance', '1.0', 'Gr api recipe to upgrade service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'); + +INSERT INTO building_block_rollback(BUILDING_BLOCK_NAME,ACTION,ROLLBACK_BUILDING_BLOCK_NAME,ROLLBACK_ACTION) +VALUES +('ActivateNetworkBB',NULL,'DeactivateNetworkBB',NULL), +('ActivatePnfBB',NULL,'DeactivatePnfBB',NULL), +('ActivateServiceInstanceBB',NULL,'DeactivateServiceInstanceBB',NULL), +('ActivateVfModuleBB',NULL,'DeactivateVfModuleBB',NULL), +('ActivateVnfBB',NULL,'DeactivateVnfBB',NULL), +('ActivateVolumeGroupBB',NULL,'DeactivateVolumeGroupBB',NULL), +('AssignNetworkBB',NULL,'UnassignNetworkBB',NULL), +('AssignServiceInstanceBB',NULL,'UnassignServiceInstanceBB',NULL), +('AssignVfModuleBB',NULL,'UnassignVfModuleBB',NULL), +('AssignVnfBB',NULL,'UnassignVnfBB',NULL), +('AssignVolumeGroupBB',NULL,'UnassignVolumeGroupBB',NULL), +('CreateNetworkBB',NULL,'DeleteNetworkBB',NULL), +('CreateNetworkCollectionBB',NULL,'DeleteNetworkCollectionBB',NULL), +('CreateVfModuleBB',NULL,'DeleteVfModuleBB',NULL), +('CreateVolumeGroupBB',NULL,'DeleteVolumeGroupBB',NULL), +('VNFSetInMaintFlagActivity',NULL,'VNFUnsetInMaintFlagActivity',NULL), +('VNFSetClosedLoopDisabledFlagActivity',NULL,'VNFUnsetClosedLoopDisabledFlagActivity',NULL), +('VNFLockActivity',NULL,'VNFUnlockActivity',NULL), +('VNFStopActivity',NULL,'VNFStartActivity',NULL), +('VNFQuiesceTrafficActivity',NULL,'VNFResumeTrafficActivity',NULL), +('EtsiVnfInstantiateBB',NULL,'EtsiVnfDeleteBB',NULL), +('AddFabricConfigurationBB',NULL,'DeleteFabricConfigurationBB',NULL); diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java index 8ce4051b24..4e273d5a8e 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -34,6 +34,7 @@ import org.junit.Test; import org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest; import org.onap.so.db.catalog.beans.AuthenticationType; import org.onap.so.db.catalog.beans.BBNameSelectionReference; +import org.onap.so.db.catalog.beans.BuildingBlockRollback; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.CloudifyManager; @@ -780,5 +781,11 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { assertEquals(processingFlags.getEndpoint(), "TESTENDPOINT"); } + @Test + public void testGetBuildingBlocksList() { + List<BuildingBlockRollback> rollbackEntries = client.getBuildingBlockRollbackEntries(); + assertTrue(rollbackEntries.size() > 1); + } + } |