aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java8
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java4
3 files changed, 11 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java
index 9c751a239d..ce918b9915 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java
@@ -23,6 +23,7 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
import java.nio.ByteBuffer;
+import java.util.Set;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
@@ -38,6 +39,8 @@ public class PackageInfo {
private String vspId;
@PartitionKey(value = 1)
private String version;
+ @Column(name = "version_id")
+ private String versionId;
@Column(name = "display_name")
private String displayName;
@Column(name = "vsp_name")
@@ -59,9 +62,12 @@ public class PackageInfo {
private ByteBuffer translatedFile;
@Column(name = "resource_type")
private String resourceType = ResourceTypeEnum.VF.name();
+ @Column(name = "models")
+ private Set<String> models;
- public PackageInfo(String packageId, Version version) {
+ public PackageInfo(final String packageId, final Version version) {
this.vspId = packageId;
this.version = version.getName();
+ this.versionId = version.getId();
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java
index 591af3c8b9..f8b75496e5 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java
@@ -76,8 +76,8 @@ public class PackageInfoDaoImpl extends CassandraBaseDao<PackageInfo> implements
@Accessor
interface PackageInfoAccessor {
- @Query("SELECT vsp_id,version,display_name,vsp_name,vsp_description,vendor_name,category"
- + " ,sub_category, vendor_release,package_checksum,package_type, resource_type FROM package_details")
+ @Query("SELECT vsp_id, version, version_id, display_name, vsp_name, vsp_description, vendor_name, category"
+ + " , sub_category, vendor_release, package_checksum, package_type, resource_type, models FROM package_details")
Result<PackageInfo> listInfo();
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
index 1118260a16..4929668753 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
@@ -87,8 +87,8 @@ public class ServiceModelDaoFactoryTest {
zusammenAdaptor);
zusammenAdaptor.setItemVersion(itemVersionmock);
- ToscaServiceModel model = getToscaServiceModel();
- serviceModelDaoZusammen.storeServiceModel(vspId, version, model);
+ ToscaServiceModel toscaServiceModel = getToscaServiceModel();
+ serviceModelDaoZusammen.storeServiceModel(vspId, version, toscaServiceModel);
}
@Test