aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2021-10-20 07:55:58 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2022-05-09 14:37:13 +0000
commit592465825549b999cc8aad811fba91736750bfaf (patch)
tree60a47f3def05668963d40a7960afd2f0dc131e9f /mso-catalog-db
parente89df29768b65e4be077a8bcfe16fd1a915be3ee (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 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java11
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql24
2 files changed, 35 insertions, 0 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java
index 798604e4fb..67a19c005d 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java
@@ -65,6 +65,17 @@ public class BuildingBlockRollback implements Serializable {
@Column(name = "ROLLBACK_ACTION", length = 200)
private String rollbackAction;
+ public BuildingBlockRollback() {}
+
+ public BuildingBlockRollback(Integer id, String buildingBlockName, String action, String rollbackBuildingBlockName,
+ String rollbackAction) {
+ this.id = id;
+ this.buildingBlockName = buildingBlockName;
+ this.action = action;
+ this.rollbackBuildingBlockName = rollbackBuildingBlockName;
+ this.rollbackAction = rollbackAction;
+ }
+
public Integer getId() {
return id;
}
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index db800b2b49..cf1b188a21 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -1424,3 +1424,27 @@ CREATE TABLE IF NOT EXISTS `building_block_rollback` (
`ROLLBACK_ACTION` varchar(200) NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+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);