summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2018-08-21 17:55:30 +0530
committerojasdubey <ojas.dubey@amdocs.com>2018-08-22 12:31:35 +0530
commitb111bbed40e9fe02d980fe0af360f60ca47f5ac6 (patch)
tree71c5913289347dca52a2f01f93dc222ed52d0c55 /openecomp-be/lib/openecomp-sdc-versioning-lib
parent34db62e9a6b338219980c21ba9f39029f481f866 (diff)
Bugfix - Broken Action Library APIs
1. Fix for Sev-1 bug related to broken action library APIs due to cassandra driver upgrade to 3.x 2. Updated code based on review comments Change-Id: I4e62a7f2bf30a78d1f72f3c78ad8270985bcd56e Issue-ID: SDC-1669 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml5
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java9
2 files changed, 12 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
index 88002d9b83..1642ca2b76 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
@@ -14,6 +14,11 @@
<dependencies>
<dependency>
+ <groupId>com.datastax.cassandra</groupId>
+ <artifactId>cassandra-driver-extras</artifactId>
+ <version>${datastax.cassandra.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.openecomp.sdc.core</groupId>
<artifactId>openecomp-session-lib</artifactId>
<version>${project.version}</version>
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
index 3404887dfe..4df67735be 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
@@ -16,16 +16,19 @@
package org.openecomp.sdc.versioning.dao.impl;
+import com.datastax.driver.extras.codecs.enums.EnumNameCodec;
import com.datastax.driver.mapping.Mapper;
import com.datastax.driver.mapping.Result;
import com.datastax.driver.mapping.annotations.Accessor;
import com.datastax.driver.mapping.annotations.Query;
+
+import java.util.Collection;
+
import org.openecomp.core.dao.impl.CassandraBaseDao;
import org.openecomp.core.nosqldb.api.NoSqlDb;
import org.openecomp.sdc.versioning.dao.VersionInfoDao;
import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.util.Collection;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
public class VersionInfoDaoImpl extends CassandraBaseDao<VersionInfoEntity>
implements VersionInfoDao {
@@ -40,6 +43,8 @@ public class VersionInfoDaoImpl extends CassandraBaseDao<VersionInfoEntity>
this.noSqlDb = noSqlDb;
this.mapper = this.noSqlDb.getMappingManager().mapper(VersionInfoEntity.class);
this.accessor = this.noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class);
+ this.noSqlDb.getMappingManager().getSession().getCluster().getConfiguration().getCodecRegistry()
+ .register(new EnumNameCodec<>(VersionStatus.class));
}
@Override