aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api
diff options
context:
space:
mode:
authorAvi Ziv <avi.ziv@amdocs.com>2017-07-18 19:45:38 +0300
committerAvi Ziv <avi.ziv@amdocs.com>2017-07-18 19:45:38 +0300
commitb8e2faf476202b6ffe61bc3a9a37df1304881d40 (patch)
treef78b8c0517d8e16c5ae610bf8b49f68ea8a312a1 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api
parent75aacbbe1acf78fa53378f07f0a8c7769449a17e (diff)
[SDC] Onboarding 1710 rebase.
Change-Id: If3b6b81d221fde13908f1e8160db6f7d9433c535 Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml.versionsBackup67
-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/VendorSoftwareProductConstants.java8
-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/ComponentArtifactDao.java (renamed from openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/MibDao.java)17
-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/ComputeDao.java21
-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/ComputeDaoFactory.java12
-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/DeploymentFlavorDao.java12
-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/DeploymentFlavorDaoFactory.java11
-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/ImageDao.java23
-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/ImageDaoFactory.java11
-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/MonitoringUploadDaoFactory.java (renamed from openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/MibDaoFactory.java)8
-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/VendorSoftwareProductDao.java47
-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/VendorSoftwareProductInfoDao.java2
-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/ComponentEntity.java6
-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/ComponentMonitoringUploadEntity.java (renamed from openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/MibEntity.java)17
-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/ComputeEntity.java132
-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/DeploymentFlavorEntity.java159
-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/ImageEntity.java175
-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/NicEntity.java4
-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/VspDetails.java11
-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/services/composition/CompositionEntityDataManager.java16
-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/services/impl/HeatFileAnalyzerRowDataImpl.java3
-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/types/composition/Component.java19
-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/types/composition/ComponentComputeAssociation.java22
-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/types/composition/ComponentData.java18
-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/types/composition/CompositionEntityType.java5
-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/types/composition/ComputeData.java52
-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/types/composition/DeploymentFlavor.java44
-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/types/composition/ExtractCompositionDataContext.java30
-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/types/composition/Image.java68
-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/types/composition/ImageData.java32
-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/types/composition/ImageFormat.java13
-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/types/composition/Nic.java17
-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/types/composition/VmSizing.java58
-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/types/questionnaire/component/compute/VmSizing.java27
-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/types/questionnaire/component/image/ImageDetails.java33
-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/types/schemagenerator/ComputeCompositionSchemaInput.java25
-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/types/schemagenerator/DeploymentFlavorCompositionSchemaInput.java39
-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/types/schemagenerator/ImageCompositionSchemaInput.java18
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json5
39 files changed, 1245 insertions, 42 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml.versionsBackup
new file mode 100644
index 0000000000..67f6a45c0d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml.versionsBackup
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-software-product-lib</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-vendor-software-product-api</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-core-lib</artifactId>
+ <type>pom</type>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-core</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.25-incubating</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-config-lib</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+
+</project> \ No newline at end of file
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/VendorSoftwareProductConstants.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java
index 8b2470a525..42dd0086c7 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,8 +37,10 @@ public final class VendorSoftwareProductConstants {
public static final String NETWORK_NAME = "Network name";
public static final String COMPONENT_NAME = "ComponentData name";
public static final String NIC_NAME = "NIC name";
+ public static final String COMPUTE_NAME = "Compute name";
public static final String ORCHESTRATION_CANDIDATE_NAME = "Orchestration Candidate name";
//public static final String COMPONENT_ARTIFACT_NAME = "ComponentArtifact name";
-
+ public static final String DEPLOYMENT_FLAVOR_NAME = "Deployment Flavor name";
+ public static final String IMAGE_NAME = "Image name";
}
}
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/MibDao.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/ComponentArtifactDao.java
index 1efd21ccbf..88b5964114 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/MibDao.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/ComponentArtifactDao.java
@@ -20,24 +20,25 @@
package org.openecomp.sdc.vendorsoftwareproduct.dao;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.MibEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentMonitoringUploadEntity;
import org.openecomp.sdc.versioning.dao.VersionableDao;
import java.util.Collection;
import java.util.Optional;
-public interface MibDao extends VersionableDao {
+public interface ComponentArtifactDao extends VersionableDao {
- Optional<MibEntity> getByType(MibEntity entity);
+ Optional<ComponentMonitoringUploadEntity> getByType(ComponentMonitoringUploadEntity entity);
- void create(MibEntity entity);
+ void create(ComponentMonitoringUploadEntity entity);
- void delete(MibEntity entity);
+ void delete(ComponentMonitoringUploadEntity entity);
- Collection<MibEntity> list(MibEntity entity);
+ Collection<ComponentMonitoringUploadEntity> list(ComponentMonitoringUploadEntity entity);
- void deleteAll(MibEntity entity);
+ void deleteAll(ComponentMonitoringUploadEntity entity);
- Collection<MibEntity> listArtifacts(MibEntity entity);
+ Collection<ComponentMonitoringUploadEntity> listArtifacts(
+ ComponentMonitoringUploadEntity entity);
}
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/ComputeDao.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/ComputeDao.java
new file mode 100644
index 0000000000..46a7f0d155
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComputeDao.java
@@ -0,0 +1,21 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ComputeDao extends VersionableDao, BaseDao<ComputeEntity> {
+
+ Collection<ComputeEntity> listByVsp(String vspId, Version version);
+
+
+ void updateQuestionnaireData(String vspId, Version version, String componentId, String computeId,
+ String questionnaireData);
+ void deleteAll(String vspId, Version version);
+
+ ComputeEntity getQuestionnaireData(String vspId, Version version, String componentId,
+ String computeId);
+}
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/ComputeDaoFactory.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/ComputeDaoFactory.java
new file mode 100644
index 0000000000..daf04f17df
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComputeDaoFactory.java
@@ -0,0 +1,12 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ComputeDaoFactory extends AbstractComponentFactory<ComputeDao> {
+
+
+ public static ComputeDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ComputeDaoFactory.class);
+ }
+}
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/DeploymentFlavorDao.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/DeploymentFlavorDao.java
new file mode 100644
index 0000000000..e27bddb881
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/DeploymentFlavorDao.java
@@ -0,0 +1,12 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+public interface DeploymentFlavorDao extends VersionableDao, BaseDao<DeploymentFlavorEntity> {
+ void deleteAll(String vspId, Version version);
+}
+
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/DeploymentFlavorDaoFactory.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/DeploymentFlavorDaoFactory.java
new file mode 100644
index 0000000000..796aa97457
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/DeploymentFlavorDaoFactory.java
@@ -0,0 +1,11 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class DeploymentFlavorDaoFactory extends AbstractComponentFactory<DeploymentFlavorDao> {
+ public static DeploymentFlavorDaoFactory getInstance() {
+ return AbstractFactory.getInstance(DeploymentFlavorDaoFactory.class);
+ }
+}
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/ImageDao.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/ImageDao.java
new file mode 100644
index 0000000000..90e591918a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ImageDao.java
@@ -0,0 +1,23 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ImageDao extends VersionableDao, BaseDao<ImageEntity> {
+
+ void updateQuestionnaireData(String vspId, Version version, String componentId, String imageId,
+ String questionnaireData);
+
+
+ void deleteByVspId(String vspId, Version version);
+
+ Collection<ImageEntity> listByVsp(String vspId, Version version);
+
+ ImageEntity getQuestionnaireData(String vspId, Version version, String componentId,
+ String imageId);
+}
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/ImageDaoFactory.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/ImageDaoFactory.java
new file mode 100644
index 0000000000..503d44b14f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ImageDaoFactory.java
@@ -0,0 +1,11 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ImageDaoFactory extends AbstractComponentFactory<ImageDao> {
+
+ public static ImageDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ImageDaoFactory.class);
+ }
+}
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/MibDaoFactory.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/MonitoringUploadDaoFactory.java
index 52c610caa6..b70b1a5245 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/MibDaoFactory.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/MonitoringUploadDaoFactory.java
@@ -23,10 +23,10 @@ package org.openecomp.sdc.vendorsoftwareproduct.dao;
import org.openecomp.core.factory.api.AbstractComponentFactory;
import org.openecomp.core.factory.api.AbstractFactory;
-public abstract class MibDaoFactory
- extends AbstractComponentFactory<MibDao> {
+public abstract class MonitoringUploadDaoFactory
+ extends AbstractComponentFactory<ComponentArtifactDao> {
- public static MibDaoFactory getInstance() {
- return AbstractFactory.getInstance(MibDaoFactory.class);
+ public static MonitoringUploadDaoFactory getInstance() {
+ return AbstractFactory.getInstance(MonitoringUploadDaoFactory.class);
}
}
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/VendorSoftwareProductDao.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/VendorSoftwareProductDao.java
index 85262db208..48d1e1606a 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/VendorSoftwareProductDao.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/VendorSoftwareProductDao.java
@@ -22,8 +22,12 @@ package org.openecomp.sdc.vendorsoftwareproduct.dao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentDependencyModelEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.versioning.dao.VersionableDao;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -33,6 +37,7 @@ import java.util.List;
public interface VendorSoftwareProductDao extends VersionableDao {
+ //VspDetails getVendorSoftwareProductInfo(VspDetails vspDetails);
Collection<ComponentEntity> listComponents(String vspId, Version version);
@@ -77,4 +82,46 @@ public interface VendorSoftwareProductDao extends VersionableDao {
Collection<ComponentDependencyModelEntity> listComponentDependencies(String vspId,Version
version);
+ void createDeploymentFlavor(DeploymentFlavorEntity deploymentFlavor);
+
+ Collection<DeploymentFlavorEntity> listDeploymentFlavors(String vspId, Version version);
+
+ DeploymentFlavorEntity getDeploymentFlavor(String vspId, Version version, String
+ deploymentFlavorId);
+ void deleteDeploymentFlavor(String vspId, Version version, String deploymentFlavorId);
+
+
+ void createImage(ImageEntity imageEntity);
+
+ Collection<ImageEntity> listImages(String vspId, Version version, String componentId);
+
+ ImageEntity getImage(String vspId, Version version, String componentId, String imageId);
+
+ Collection<ImageEntity> listImagesByVsp(String vspId, Version version);
+
+ void createCompute(ComputeEntity computeEntity);
+
+ Collection<ComputeEntity> listComputes(String vspId, Version version, String componentId);
+
+ Collection<ComputeEntity> listComputesByVsp(String vspId, Version version);
+
+ ComputeEntity getCompute(String vspId, Version version, String componentId, String
+ computeFlavorId);
+
+ void deleteImage(String vspId, Version version, String componentId, String imageId);
+
+ void updateDeploymentFlavor(DeploymentFlavorEntity deploymentFlavorEntity);
+
+ void updateImage(ImageEntity imageEntity);
+
+ void updateImageQuestionnaire(String vspId, Version activeVersion, String componentId,
+ String imageId, String questionnaireData);
+
+ void updateComputeQuestionnaire(String vspId, Version activeVersion, String componentId,
+ String computeId, String questionnaireData);
+
+ void updateCompute(ComputeEntity compute);
+
+ void deleteCompute(String vspId, Version version, String componentId, String computeFlavorId);
+
}
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/VendorSoftwareProductInfoDao.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/VendorSoftwareProductInfoDao.java
index ffb0d5eca7..0481829ebd 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/VendorSoftwareProductInfoDao.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/VendorSoftwareProductInfoDao.java
@@ -37,4 +37,6 @@ public interface VendorSoftwareProductInfoDao extends VersionableDao, BaseDao<Vs
VspQuestionnaireEntity getQuestionnaire(String vspId, Version version);
void deleteAll(String vspId, Version version);
+
+ boolean isManual(String vspId, Version version);
}
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/ComponentEntity.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/ComponentEntity.java
index 602fd6d15c..3e4f44328a 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/ComponentEntity.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/ComponentEntity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@ import java.util.List;
@Table(keyspace = "dox", name = "vsp_component")
public class ComponentEntity implements CompositionEntity {
- private static final String ENTITY_TYPE = "Vendor Software Product Component";
+ public static final String ENTITY_TYPE = "Vendor Software Product Component";
@PartitionKey
@Column(name = "vsp_id")
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/MibEntity.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/ComponentMonitoringUploadEntity.java
index f057c1745a..2517b9bfab 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/MibEntity.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/ComponentMonitoringUploadEntity.java
@@ -25,7 +25,7 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
-import org.openecomp.core.enrichment.types.ArtifactType;
+import org.openecomp.core.enrichment.types.MonitoringUploadType;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
@@ -33,7 +33,7 @@ import java.io.Serializable;
import java.nio.ByteBuffer;
@Table(keyspace = "dox", name = "vsp_component_artifact")
-public class MibEntity implements VersionableEntity, Serializable {
+public class ComponentMonitoringUploadEntity implements VersionableEntity, Serializable {
public static final String ENTITY_TYPE = "Vendor Software Product Component Artifact";
@PartitionKey
@Column(name = "vsp_id")
@@ -46,7 +46,7 @@ public class MibEntity implements VersionableEntity, Serializable {
private String componentId;
@ClusteringColumn(value = 1)
@Column(name = "artifact_type")
- private ArtifactType type;
+ private MonitoringUploadType type;
@ClusteringColumn(value = 2)
@Column(name = "artifact_id")
private String id;
@@ -54,7 +54,7 @@ public class MibEntity implements VersionableEntity, Serializable {
private String artifactName;
private ByteBuffer artifact;
- public MibEntity() {
+ public ComponentMonitoringUploadEntity() {
}
@@ -66,7 +66,8 @@ public class MibEntity implements VersionableEntity, Serializable {
* @param componentId the component id
* @param id the id
*/
- public MibEntity(String vspId, Version version, String componentId, String id) {
+ public ComponentMonitoringUploadEntity(String vspId, Version version, String componentId,
+ String id) {
this.vspId = vspId;
this.version = version;
this.componentId = componentId;
@@ -131,17 +132,17 @@ public class MibEntity implements VersionableEntity, Serializable {
this.artifact = artifact;
}
- public ArtifactType getType() {
+ public MonitoringUploadType getType() {
return type;
}
- public void setType(ArtifactType type) {
+ public void setType(MonitoringUploadType type) {
this.type = type;
}
@Override
public String toString() {
- return "MibEntity{" +
+ return "ComponentMonitoringUploadEntity{" +
"vspId='" + vspId + '\'' +
", version=" + version +
", componentId='" + componentId + '\'' +
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/ComputeEntity.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/ComputeEntity.java
new file mode 100644
index 0000000000..e16aad22ed
--- /dev/null
+++ 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/ComputeEntity.java
@@ -0,0 +1,132 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComputeData;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+@Table(keyspace = "dox", name = "vsp_component_compute")
+public class ComputeEntity implements CompositionEntity {
+ public static final String ENTITY_TYPE = "Vendor Software Product Component Compute Flavor";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "compute_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+ public ComputeEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ public ComputeEntity() {
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.compute;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(),
+ new CompositionEntityId(getComponentId(), new CompositionEntityId(getVspId(), null)));
+ }
+
+ @Override
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ @Override
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ @Override
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ public ComputeData getComputeCompositionData() {
+ return compositionData == null ? null
+ : JsonUtil.json2Object(compositionData, ComputeData.class);
+ }
+
+ public void setComputeCompositionData(ComputeData computeData){
+ this.compositionData = computeData == null ? null : JsonUtil.object2Json(computeData);
+ }
+
+
+}
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/DeploymentFlavorEntity.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/DeploymentFlavorEntity.java
new file mode 100644
index 0000000000..b20e11077f
--- /dev/null
+++ 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/DeploymentFlavorEntity.java
@@ -0,0 +1,159 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.*;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.DeploymentFlavor;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+@Table(keyspace = "dox", name = "vsp_deployment_flavor")
+public class DeploymentFlavorEntity implements CompositionEntity{
+ private static final String ENTITY_TYPE = "Vendor Software Product Deployment Flavor";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "deployment_flavor_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+
+ public DeploymentFlavorEntity(){
+
+ }
+
+ /**
+ * Instantiates a new DeploymentFlavor entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param id the id
+ */
+ public DeploymentFlavorEntity(String vspId, Version version, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.id = id;
+ }
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.deployment;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(), new CompositionEntityId(getVspId(), null));
+ }
+
+ @Override
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ @Override
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ @Override
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public DeploymentFlavor getDeploymentFlavorCompositionData() {
+ return compositionData == null ? null : JsonUtil.json2Object(compositionData, DeploymentFlavor.class);
+ }
+
+ public void setDeploymentFlavorCompositionData(DeploymentFlavor deploymentFlavor) {
+ this.compositionData = deploymentFlavor == null ? null : JsonUtil.object2Json(deploymentFlavor);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (compositionData != null ? compositionData.hashCode() : 0);
+ result = 31 * result + (questionnaireData != null ? questionnaireData.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ DeploymentFlavorEntity that = (DeploymentFlavorEntity) object;
+
+ if (vspId != null ? !vspId.equals(that.vspId) : that.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(that.version) : that.version != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(that.id) : that.id != null) {
+ return false;
+ }
+ if (compositionData != null ? !compositionData.equals(that.compositionData)
+ : that.compositionData != null) {
+ return false;
+ }
+ return questionnaireData != null ? questionnaireData.equals(that.questionnaireData)
+ : that.questionnaireData == null;
+
+ }
+} \ No newline at end of file
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/ImageEntity.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/ImageEntity.java
new file mode 100644
index 0000000000..4950229486
--- /dev/null
+++ 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/ImageEntity.java
@@ -0,0 +1,175 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Image;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+@Table(keyspace = "dox", name = "vsp_component_image")
+public class ImageEntity implements CompositionEntity {
+
+ private static final String ENTITY_TYPE = "Vendor Software Product Component Image";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "image_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+
+ public ImageEntity() {
+ }
+
+ /**
+ * Instantiates a new Image entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param id the id
+ */
+ public ImageEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.image;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(),
+ new CompositionEntityId(getComponentId(), new CompositionEntityId(getVspId(), null)));
+ }
+
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ public Image getImageCompositionData() {
+ return compositionData == null ? null : JsonUtil.json2Object(compositionData, Image.class);
+ }
+
+ public void setImageCompositionData(Image image) {
+ this.compositionData = image == null ? null : JsonUtil.object2Json(image);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (componentId != null ? componentId.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (compositionData != null ? compositionData.hashCode() : 0);
+ result = 31 * result + (questionnaireData != null ? questionnaireData.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ ImageEntity imageEntity = (ImageEntity) object;
+
+ if (vspId != null ? !vspId.equals(imageEntity.vspId) : imageEntity.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(imageEntity.version) : imageEntity.version != null) {
+ return false;
+ }
+ if (componentId != null ? !componentId.equals(imageEntity.componentId)
+ : imageEntity.componentId != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(imageEntity.id) : imageEntity.id != null) {
+ return false;
+ }
+ if (compositionData != null ? !compositionData.equals(imageEntity.compositionData)
+ : imageEntity.compositionData != null) {
+ return false;
+ }
+ return questionnaireData != null ? questionnaireData.equals(imageEntity.questionnaireData)
+ : imageEntity.questionnaireData == null;
+
+ }
+}
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/NicEntity.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/NicEntity.java
index 656693c14d..a954ada570 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/NicEntity.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/NicEntity.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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/VspDetails.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/VspDetails.java
index 0019bce477..2758e3dfe9 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/VspDetails.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/VspDetails.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -60,6 +60,7 @@ public class VspDetails implements VersionableEntity {
private Long writetimeMicroSeconds;
+ private String onboardingMethod;
public VspDetails() {
}
@@ -214,6 +215,12 @@ public class VspDetails implements VersionableEntity {
this.oldVersion = oldVersion;
}
+ public String getOnboardingMethod() {
+ return onboardingMethod;
+ }
+ public void setOnboardingMethod(String onboardingMethod) {
+ this.onboardingMethod = onboardingMethod;
+ }
@Override
public String toString() {
return String.format(
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/services/composition/CompositionEntityDataManager.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/composition/CompositionEntityDataManager.java
index 5bde801188..6c636fddf0 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/composition/CompositionEntityDataManager.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/composition/CompositionEntityDataManager.java
@@ -22,6 +22,9 @@ package org.openecomp.sdc.vendorsoftwareproduct.services.composition;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.CompositionEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
@@ -74,4 +77,17 @@ public interface CompositionEntityDataManager {
NicEntity createNic(NicEntity nic);
+ public ComputeEntity createCompute(ComputeEntity compute);
+
+ public DeploymentFlavorEntity createDeploymentFlavor(DeploymentFlavorEntity deploymentFlavor);
+
+ public ImageEntity createImage(ImageEntity image);
+
+ public void saveComputesFlavorByComponent(String vspId, Version version, Component component, String
+ componentId);
+ public void saveImagesByComponent(String vspId, Version version, Component component, String
+ componentId);
+ public void saveDeploymentFlavors(String vspId, Version version,
+ CompositionData compositionData);
+
}
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/services/impl/HeatFileAnalyzerRowDataImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/HeatFileAnalyzerRowDataImpl.java
index d26942219f..f7ca6463cb 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/HeatFileAnalyzerRowDataImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/HeatFileAnalyzerRowDataImpl.java
@@ -108,6 +108,9 @@ public class HeatFileAnalyzerRowDataImpl implements HeatFileAnalyzer {
}
analyzedZipHeatFiles.addNestedFiles(fetchFileNamesToReturn(nestedFilesNames,
foundHeatIdentifier));
+ if (Objects.nonNull(bfReader)) {
+ bfReader.close();
+ }
}
}
return analyzedZipHeatFiles;
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/types/composition/Component.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java
index b112ee2216..1e30144be3 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java
@@ -25,6 +25,8 @@ import java.util.List;
public class Component {
private ComponentData data;
private List<Nic> nics;
+ private List<Image> images;
+ private List<ComputeData> compute;
public ComponentData getData() {
return data;
@@ -41,4 +43,21 @@ public class Component {
public void setNics(List<Nic> nics) {
this.nics = nics;
}
+
+ public List<Image> getImages() {
+ return images;
+ }
+
+ public void setImages(List<Image> images) {
+ this.images = images;
+ }
+
+ public List<ComputeData> getCompute() {
+ return compute;
+ }
+
+ public void setCompute(
+ List<ComputeData> compute) {
+ this.compute = compute;
+ }
}
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/types/composition/ComponentComputeAssociation.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentComputeAssociation.java
new file mode 100644
index 0000000000..35e9bad9bd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentComputeAssociation.java
@@ -0,0 +1,22 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+
+public class ComponentComputeAssociation {
+ private String componentId;
+ private String computeFlavorId;
+
+ public String getComponentId() {
+ return componentId;
+ }
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+ public String getComputeFlavorId() {
+ return computeFlavorId;
+ }
+
+ public void setComputeFlavorId(String computeFlavorId) {
+ this.computeFlavorId = computeFlavorId;
+ }
+
+}
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/types/composition/ComponentData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java
index 28d187ec69..ba06d42fea 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java
@@ -25,6 +25,8 @@ public class ComponentData implements CompositionDataEntity {
private String description;
private String displayName;
private String vfcCode;
+ private String nfcCode;
+ private String nfcFunction;
public String getName() {
return name;
@@ -50,6 +52,22 @@ public class ComponentData implements CompositionDataEntity {
this.displayName = displayName;
}
+ public String getNfcCode() {
+ return nfcCode;
+ }
+
+ public void setNfcCode(String nfcCode) {
+ this.nfcCode = nfcCode;
+ }
+
+ public String getNfcFunction() {
+ return nfcFunction;
+ }
+
+ public void setNfcFunction(String nfcFunction) {
+ this.nfcFunction = nfcFunction;
+ }
+
@Override
public int hashCode() {
int result = name.hashCode();
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/types/composition/CompositionEntityType.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java
index 4695210de5..2b1ea16889 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java
@@ -25,5 +25,8 @@ public enum CompositionEntityType {
vsp,
network,
component,
- nic
+ deployment,
+ image,
+ nic,
+ compute
}
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/types/composition/ComputeData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComputeData.java
new file mode 100644
index 0000000000..20ae5438de
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComputeData.java
@@ -0,0 +1,52 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class ComputeData implements CompositionDataEntity {
+ private String name;
+ private String description;
+
+ public ComputeData(){}
+
+ public ComputeData(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = name.hashCode();
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (!(object instanceof ComputeData)) {
+ return false;
+ }
+
+ ComputeData that = (ComputeData) object;
+
+ if (!name.equals(that.name)) {
+ return false;
+ }
+ return description != null ? description.equals(that.description): that.description == null;
+ }
+}
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/types/composition/DeploymentFlavor.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/DeploymentFlavor.java
new file mode 100644
index 0000000000..1c84db3cf8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/DeploymentFlavor.java
@@ -0,0 +1,44 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+
+import java.util.List;
+
+public class DeploymentFlavor implements CompositionDataEntity {
+ private String model;
+ private String description;
+ private String featureGroupId;
+ private List<ComponentComputeAssociation> componentComputeAssociations;
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getFeatureGroupId() {
+ return featureGroupId;
+ }
+
+ public void setFeatureGroupId(String featureGroupId) {
+ this.featureGroupId = featureGroupId;
+ }
+
+ public List<ComponentComputeAssociation> getComponentComputeAssociations() {
+ return componentComputeAssociations;
+ }
+
+ public void setComponentComputeAssociations(List<ComponentComputeAssociation> componentComputeAssociations) {
+ this.componentComputeAssociations = componentComputeAssociations;
+ }
+
+}
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/types/composition/ExtractCompositionDataContext.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ExtractCompositionDataContext.java
index 6736512cee..3fce395f44 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ExtractCompositionDataContext.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ExtractCompositionDataContext.java
@@ -20,10 +20,6 @@
package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
-import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
-import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network;
-import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -35,6 +31,8 @@ public class ExtractCompositionDataContext {
private List<Network> networks = new ArrayList<>();
private List<Component> components = new ArrayList<>();
private Map<String, Nic> nics = new HashMap<>();
+ private Map<String, Image> images = new HashMap<>();
+ private Map<String, ComputeData> computes = new HashMap<>();
private Set<String> handledServiceTemplates = new HashSet<>();
private Set<String> createdComponents = new HashSet<>();
@@ -130,5 +128,29 @@ public class ExtractCompositionDataContext {
this.nics.put(nicId, nic);
}
+ public Map<String, Image> getImages() {
+ return images;
+ }
+
+ public void setImages(Map<String, Image> images) {
+ this.images = images;
+ }
+
+ public void addImage(String imageId, Image image) {
+ this.images.put(imageId, image);
+ }
+
+
+ public Map<String, ComputeData> getComputes() {
+ return computes;
+ }
+
+ public void setComputes(
+ Map<String, ComputeData> computes) {
+ this.computes = computes;
+ }
+ public void addCompute(String computeId, ComputeData computedata ){
+ this.computes.put(computeId,computedata);
+ }
}
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/types/composition/Image.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Image.java
new file mode 100644
index 0000000000..d35501c7d1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Image.java
@@ -0,0 +1,68 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+
+public class Image implements CompositionDataEntity {
+
+ private String fileName;
+ private String description;
+ /*private String version;
+ private String format;
+ private String md5;
+ //private String providedBy;*/
+
+ public Image(){
+ }
+
+ public Image(String fileName){
+ this.fileName=fileName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /*public String getMd5() {
+ return md5;
+ }
+
+ public void setMd5(String md5) {
+ this.md5 = md5;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }*/
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ /*public String getProvidedBy() {
+ return providedBy;
+ }
+
+ public void setProvidedBy(String providedBy) {
+ this.providedBy = providedBy;
+ }*/
+
+}
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/types/composition/ImageData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ImageData.java
new file mode 100644
index 0000000000..beb60f8767
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ImageData.java
@@ -0,0 +1,32 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class ImageData implements CompositionDataEntity {
+
+ private String fileName;
+ private String description;
+
+ public ImageData(){
+
+ }
+
+ public ImageData(String fileName, String description) {
+ this.fileName = fileName;
+ this.description = description;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
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/types/composition/ImageFormat.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ImageFormat.java
new file mode 100644
index 0000000000..6e408170cd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ImageFormat.java
@@ -0,0 +1,13 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public enum ImageFormat {
+ aki,
+ ami,
+ ari,
+ iso,
+ qcow2,
+ raw,
+ vdi,
+ vhd,
+ vmdk
+}
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/types/composition/Nic.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java
index 24832951a8..f7c3911772 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java
@@ -20,12 +20,14 @@
package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
public class Nic implements CompositionDataEntity {
private String name;
private String description;
private String networkId;
private String networkName;
private NetworkType networkType;
+ private String networkDescription;
public String getName() {
return name;
@@ -67,12 +69,21 @@ public class Nic implements CompositionDataEntity {
this.networkType = networkType;
}
+ public String getNetworkDescription(){
+ return networkDescription;
+ }
+
+ public void setNetworkDescription(String networkDescription){
+ this.networkDescription=networkDescription;
+ }
+
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (description != null ? description.hashCode() : 0);
result = 31 * result + (networkId != null ? networkId.hashCode() : 0);
result = 31 * result + (networkType != null ? networkType.hashCode() : 0);
+ result = 31 * result + (networkDescription != null ? networkDescription.hashCode() : 0);
return result;
}
@@ -96,6 +107,12 @@ public class Nic implements CompositionDataEntity {
if (networkId != null ? !networkId.equals(nic.networkId) : nic.networkId != null) {
return false;
}
+ if (networkType != null ? !networkType.equals(nic.networkType) : nic.networkType != null) {
+ return false;
+ }
+ if (networkDescription != null ? !networkDescription.equals(nic.networkDescription) : nic.networkDescription != null) {
+ return false;
+ }
return networkType == nic.networkType;
}
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/types/composition/VmSizing.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/VmSizing.java
new file mode 100644
index 0000000000..b28469fcd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/VmSizing.java
@@ -0,0 +1,58 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class VmSizing {
+ private int numOfCPUs;
+ private int fileSystemSizeGB;
+ private int persistentStorageVolumeSize;
+ private int ioOperationsPerSec;
+ private String cpuOverSubscriptionRatio;
+ private String memoryRAM;
+
+ public int getNumOfCPUs() {
+ return numOfCPUs;
+ }
+
+ public void setNumOfCPUs(int numOfCPUs) {
+ this.numOfCPUs = numOfCPUs;
+ }
+
+ public int getFileSystemSizeGB() {
+ return fileSystemSizeGB;
+ }
+
+ public void setFileSystemSizeGB(int fileSystemSizeGB) {
+ this.fileSystemSizeGB = fileSystemSizeGB;
+ }
+
+ public int getPersistentStorageVolumeSize() {
+ return persistentStorageVolumeSize;
+ }
+
+ public void setPersistentStorageVolumeSize(int persistentStorageVolumeSize) {
+ this.persistentStorageVolumeSize = persistentStorageVolumeSize;
+ }
+
+ public int getIoOperationsPerSec() {
+ return ioOperationsPerSec;
+ }
+
+ public void setIoOperationsPerSec(int ioOperationsPerSec) {
+ this.ioOperationsPerSec = ioOperationsPerSec;
+ }
+
+ public String getCpuOverSubscriptionRatio() {
+ return cpuOverSubscriptionRatio;
+ }
+
+ public void setCpuOverSubscriptionRatio(String cpuOverSubscriptionRatio) {
+ this.cpuOverSubscriptionRatio = cpuOverSubscriptionRatio;
+ }
+
+ public String getMemoryRAM() {
+ return memoryRAM;
+ }
+
+ public void setMemoryRAM(String memoryRAM) {
+ this.memoryRAM = memoryRAM;
+ }
+}
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/types/questionnaire/component/compute/VmSizing.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/questionnaire/component/compute/VmSizing.java
index 2ae7f48f33..fb4aaa61f1 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/questionnaire/component/compute/VmSizing.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/questionnaire/component/compute/VmSizing.java
@@ -20,14 +20,13 @@
package org.openecomp.sdc.vendorsoftwareproduct.types.questionnaire.component.compute;
-/**
- * Created by TALIO on 11/22/2016.
- */
public class VmSizing {
private int numOfCPUs;
- private int fileSystemSizeGB;
+ private String fileSystemSizeGB;
private int persistentStorageVolumeSize;
private int IOOperationsPerSec;
+ private String cpuOverSubscriptionRatio;
+ private String memoryRAM;
public int getNumOfCPUs() {
return numOfCPUs;
@@ -37,11 +36,11 @@ public class VmSizing {
this.numOfCPUs = numOfCPUs;
}
- public int getFileSystemSizeGB() {
+ public String getFileSystemSizeGB() {
return fileSystemSizeGB;
}
- public void setFileSystemSizeGB(int fileSystemSizeGB) {
+ public void setFileSystemSizeGB(String fileSystemSizeGB) {
this.fileSystemSizeGB = fileSystemSizeGB;
}
@@ -60,4 +59,20 @@ public class VmSizing {
public void setIOOperationsPerSec(int IOOperationsPerSec) {
this.IOOperationsPerSec = IOOperationsPerSec;
}
+
+ public String getCpuOverSubscriptionRatio() {
+ return cpuOverSubscriptionRatio;
+ }
+
+ public void setCpuOverSubscriptionRatio(String cpuOverSubscriptionRatio) {
+ this.cpuOverSubscriptionRatio = cpuOverSubscriptionRatio;
+ }
+
+ public String getMemoryRAM() {
+ return memoryRAM;
+ }
+
+ public void setMemoryRAM(String memoryRAM) {
+ this.memoryRAM = memoryRAM;
+ }
}
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/types/questionnaire/component/image/ImageDetails.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/questionnaire/component/image/ImageDetails.java
new file mode 100644
index 0000000000..d051370add
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/questionnaire/component/image/ImageDetails.java
@@ -0,0 +1,33 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.questionnaire.component.image;
+
+
+public class ImageDetails {
+
+ private String version;
+ private String format;
+ private String md5;
+
+ public String getMd5() {
+ return md5;
+ }
+
+ public void setMd5(String md5) {
+ this.md5 = md5;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
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/types/schemagenerator/ComputeCompositionSchemaInput.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/ComputeCompositionSchemaInput.java
new file mode 100644
index 0000000000..4988ec92bf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/ComputeCompositionSchemaInput.java
@@ -0,0 +1,25 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator;
+
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComputeData;
+
+public class ComputeCompositionSchemaInput implements SchemaTemplateInput {
+
+ private boolean manual;
+ private ComputeData compute;
+
+ public boolean isManual() {
+ return manual;
+ }
+
+ public void setManual(boolean manual) {
+ this.manual = manual;
+ }
+
+ public ComputeData getCompute() {
+ return compute;
+ }
+
+ public void setCompute(ComputeData compute) {
+ this.compute = compute;
+ }
+}
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/types/schemagenerator/DeploymentFlavorCompositionSchemaInput.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/DeploymentFlavorCompositionSchemaInput.java
new file mode 100644
index 0000000000..a82685e68a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/DeploymentFlavorCompositionSchemaInput.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator;
+
+
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.DeploymentFlavor;
+
+import java.util.Collection;
+
+public class DeploymentFlavorCompositionSchemaInput implements SchemaTemplateInput {
+
+ private boolean manual;
+ private DeploymentFlavor deploymentFlavor;
+ private Collection<String> featureGroupIds;
+
+ public boolean isManual() {
+ return manual;
+ }
+
+ public void setManual(boolean manual) {
+ this.manual = manual;
+ }
+
+ public DeploymentFlavor getDeploymentFlavor() {
+ return deploymentFlavor;
+ }
+
+ public void setDeploymentFlavor(
+ DeploymentFlavor deploymentFlavor) {
+ this.deploymentFlavor = deploymentFlavor;
+ }
+
+ public Collection<String> getFeatureGroupIds() {
+ return featureGroupIds;
+ }
+
+ public void setFeatureGroupIds(Collection<String> featureGroupIds) {
+ this.featureGroupIds = featureGroupIds;
+ }
+
+}
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/types/schemagenerator/ImageCompositionSchemaInput.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/ImageCompositionSchemaInput.java
new file mode 100644
index 0000000000..add08a7020
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/schemagenerator/ImageCompositionSchemaInput.java
@@ -0,0 +1,18 @@
+package org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator;
+
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Image;
+
+public class ImageCompositionSchemaInput implements SchemaTemplateInput {
+
+ public Image getImage() {
+ return image;
+ }
+
+ public void setImage(Image image) {
+ this.image = image;
+ }
+
+ private Image image;
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json
index 85177c42c1..52c6119ae6 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json
@@ -8,16 +8,19 @@
"org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.PackageInfoDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.NetworkDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ComponentDaoFactoryImpl",
- "org.openecomp.sdc.vendorsoftwareproduct.dao.MibDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.MibDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.MonitoringUploadDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.MonitoringUploadDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.NicDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.NicDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.VspQuestionnaireDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ProcessDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ProcessArtifactDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ImageDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ImageDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.QuestionnnaireDataServiceFactory": "org.openecomp.sdc.vendorsoftwareproduct.factory.QuestionnaireDataServiceFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.InformationArtifactGeneratorFactory":"org.openecomp.sdc.vendorsoftwareproduct.factory.InformationArtifactGeneratorFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.CandidateServiceFactory": "org.openecomp.sdc.vendorsoftwareproduct.factory.impl.CandidateServiceFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.CompositionDataExtractorFactory": "org.openecomp.sdc.vendorsoftwareproduct.factory.impl.CompositionDataExtractorFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.CompositionEntityDataManagerFactory": "org.openecomp.sdc.vendorsoftwareproduct.factory.impl.CompositionEntityDataManagerFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.factory.ManifestCreatorFactory": "org.openecomp.sdc.vendorsoftwareproduct.factory.impl.ManifestCreatorFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.DeploymentFlavorDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.DeploymentFlavorDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ComputeDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ComputeDaoFactoryImpl",
"org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDependencyModelDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ComponentDependencyModelDaoFactoryImpl"
} \ No newline at end of file