aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorArthur Martella <amartell@research.att.com>2017-09-08 13:27:46 -0400
committerArthur Martella <amartell@research.att.com>2017-09-08 13:32:24 -0400
commit62cd6aaaf74aa91ee0037c0e155c8e7284f07567 (patch)
tree68c0c53c9156f5aa3c6b3599ac940770f986633d /mso-catalog-db
parentfa1a211d28a912892fcd888569df033900eb01ee (diff)
1710 Rebase - Second Attempt
This commit rebases changes from openecomp-mso/internal-staging-1710 up to and including this codecloud commit: 54483fc6606ddb1591a2e9da61bff8712325f924 Wed Sep 6 18:12:56 2017 -0400 Rebasing was done on a branch on top of this commit in so/master in ONAP: 93fbdfbe46104f8859d4754040f979cb7997c157 Thu Sep 7 16:42:59 2017 +0000 Change-Id: I4ad9abf40da32bf5bdca43e868b8fa2dbcd9dc59 Issue-id: SO-107 Signed-off-by: Arthur Martella <amartell@research.att.com>
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/pom.xml17
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java2728
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDbSessionFactoryManager.java (renamed from mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/HibernateUtilsCatalogDb.java)4
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResource.java93
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java124
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java77
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java60
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java14
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java70
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java81
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java48
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java5
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java6
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java17
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java114
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java128
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java5
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java102
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java33
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java41
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java25
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java25
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java110
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java99
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java113
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java211
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java151
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java49
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java17
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java5
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java89
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java230
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java138
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java4
-rw-r--r--mso-catalog-db/src/main/resources/AllottedResource.hbm.xml52
-rw-r--r--mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml43
-rw-r--r--mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml21
-rw-r--r--mso-catalog-db/src/main/resources/HeatFiles.hbm.xml49
-rw-r--r--mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml6
-rw-r--r--mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml50
-rw-r--r--mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml20
-rw-r--r--mso-catalog-db/src/main/resources/NetworkResource.hbm.xml38
-rw-r--r--mso-catalog-db/src/main/resources/NetworkResourceCustomization.hbm.xml36
-rw-r--r--mso-catalog-db/src/main/resources/Service.hbm.xml69
-rw-r--r--mso-catalog-db/src/main/resources/ServiceRecipe.hbm.xml52
-rw-r--r--mso-catalog-db/src/main/resources/ServiceToResourceCustomization.hbm.xml37
-rw-r--r--mso-catalog-db/src/main/resources/TempNetworkHeatTemplateLookup.hbm.xml41
-rw-r--r--mso-catalog-db/src/main/resources/ToscaCsar.hbm.xml43
-rw-r--r--mso-catalog-db/src/main/resources/VfModule.hbm.xml76
-rw-r--r--mso-catalog-db/src/main/resources/VfModuleCustomization.hbm.xml59
-rw-r--r--mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml6
-rw-r--r--mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml6
-rw-r--r--mso-catalog-db/src/main/resources/VnfResCustomToVfModuleCustom.hbm.xml39
-rw-r--r--mso-catalog-db/src/main/resources/VnfResource.hbm.xml126
-rw-r--r--mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml48
-rw-r--r--mso-catalog-db/src/main/resources/hibernate-catalog-core-mysql.cfg.xml31
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java1307
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java1093
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java214
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java77
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java245
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java268
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java171
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java83
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java397
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java111
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java154
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java78
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java271
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java106
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java287
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java77
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java80
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java228
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java183
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java296
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java80
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java261
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java97
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java239
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java95
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java81
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java95
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java81
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java978
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java128
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java83
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java247
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java83
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java125
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java80
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java94
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java80
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java636
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java80
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java105
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java8
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java71
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java79
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java193
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java78
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java23
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java81
110 files changed, 4490 insertions, 12051 deletions
diff --git a/mso-catalog-db/pom.xml b/mso-catalog-db/pom.xml
index 7051ab7071..606c878c3e 100644
--- a/mso-catalog-db/pom.xml
+++ b/mso-catalog-db/pom.xml
@@ -29,8 +29,10 @@
<configuration>
<hibernateDialect>org.hibernate.dialect.MySQL5Dialect</hibernateDialect>
<hibernateMapping>
+ ${project.basedir}/src/main/resources/AllottedResource.hbm.xml,
${project.basedir}/src/main/resources/AllottedResourceCustomization.hbm.xml,
${project.basedir}/src/main/resources/HeatEnvironment.hbm.xml,
+ ${project.basedir}/src/main/resources/HeatFiles.hbm.xml,
${project.basedir}/src/main/resources/HeatNestedTemplate.hbm.xml,
${project.basedir}/src/main/resources/HeatTemplate.hbm.xml,
${project.basedir}/src/main/resources/ModelRecipe.hbm.xml,
@@ -38,14 +40,21 @@
${project.basedir}/src/main/resources/NetworkResource.hbm.xml,
${project.basedir}/src/main/resources/NetworkResourceCustomization.hbm.xml,
${project.basedir}/src/main/resources/Service.hbm.xml,
+ ${project.basedir}/src/main/resources/ServiceRecipe.hbm.xml,
${project.basedir}/src/main/resources/ServiceToAllottedResources.hbm.xml,
${project.basedir}/src/main/resources/ServiceToNetworks.hbm.xml,
+ ${project.basedir}/src/main/resources/ServiceToResourceCustomization.hbm.xml,
+ ${project.basedir}/src/main/resources/TempNetworkHeatTemplateLookup.hbm.xml,
+ ${project.basedir}/src/main/resources/ToscaCsar.hbm.xml,
${project.basedir}/src/main/resources/VfModule.hbm.xml,
+ ${project.basedir}/src/main/resources/VfModuleCustomization.hbm.xml,
${project.basedir}/src/main/resources/VfModuleToHeatFiles.hbm.xml,
${project.basedir}/src/main/resources/VnfComponent.hbm.xml,
${project.basedir}/src/main/resources/VnfComponentsRecipe.hbm.xml,
${project.basedir}/src/main/resources/VnfRecipe.hbm.xml,
- ${project.basedir}/src/main/resources/VnfResource.hbm.xml
+ ${project.basedir}/src/main/resources/VnfResCustomToVfModuleCustom.hbm.xml,
+ ${project.basedir}/src/main/resources/VnfResource.hbm.xml,
+ ${project.basedir}/src/main/resources/VnfResourceCustomization.hbm.xml
</hibernateMapping>
<target>SCRIPT</target>
<skip>false</skip>
@@ -158,12 +167,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.evosuite</groupId>
- <artifactId>evosuite-standalone-runtime</artifactId>
- <version>${evosuiteVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.openecomp.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index 7ddaedcd30..a78ac10d90 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -27,17 +27,40 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.openecomp.mso.db.catalog.beans.*;
+
import org.hibernate.HibernateException;
-import org.hibernate.NonUniqueResultException;
import org.hibernate.Query;
import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.service.ServiceRegistry;
-import org.hibernate.service.ServiceRegistryBuilder;
-
-import org.openecomp.mso.db.HibernateUtils;
+import org.openecomp.mso.db.AbstractSessionFactoryManager;
+import org.openecomp.mso.db.catalog.beans.AllottedResource;
+import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatNestedTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.openecomp.mso.db.catalog.beans.Model;
+import org.openecomp.mso.db.catalog.beans.ModelRecipe;
+import org.openecomp.mso.db.catalog.beans.NetworkRecipe;
+import org.openecomp.mso.db.catalog.beans.NetworkResource;
+import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder;
+import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
+import org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources;
+import org.openecomp.mso.db.catalog.beans.ServiceToNetworks;
+import org.openecomp.mso.db.catalog.beans.ServiceToResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.TempNetworkHeatTemplateLookup;
+import org.openecomp.mso.db.catalog.beans.ToscaCsar;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
+import org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles;
+import org.openecomp.mso.db.catalog.beans.VnfComponent;
+import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfResCustomToVfModuleCustom;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator;
import org.openecomp.mso.db.catalog.utils.RecordNotFoundException;
import org.openecomp.mso.logger.MessageEnum;
@@ -52,12 +75,14 @@ import org.openecomp.mso.logger.MsoLogger;
*/
public class CatalogDatabase implements Closeable {
- protected static HibernateUtils hibernateUtils = new HibernateUtilsCatalogDb ();
+ protected final AbstractSessionFactoryManager sessionFactoryCatalogDB;
private static final String NETWORK_TYPE = "networkType";
private static final String ACTION = "action";
private static final String VNF_TYPE = "vnfType";
private static final String SERVICE_TYPE = "serviceType";
+ private static final String SERVICE_ID= "serviceId";
+ private static final String MODEL_UUID= "modelUUID";
private static final String VNF_COMPONENT_TYPE = "vnfComponentType";
private static final String MODEL_ID = "modelId";
private static final String MODEL_NAME = "modelName";
@@ -65,22 +90,26 @@ public class CatalogDatabase implements Closeable {
private static final String MODEL_TYPE = "modelType";
private static final String MODEL_VERSION_ID = "modelVersionId";
private static final String MODEL_CUSTOMIZATION_UUID = "modelCustomizationUuid";
+ private static final String VF_MODULE_MODEL_UUID = "vfModuleModelUUId";
private static final String VF_MODULE_ID = "vfModuleId";
- private static final String SERVICE_NAME_VERSION_ID= "serviceNameVersionId";
protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
protected Session session = null;
- public CatalogDatabase () {
+ protected CatalogDatabase (AbstractSessionFactoryManager sessionFactoryCatalog) {
+ sessionFactoryCatalogDB = sessionFactoryCatalog;
}
-
-
+
+ public static CatalogDatabase getInstance() {
+ return new CatalogDatabase(new CatalogDbSessionFactoryManager ());
+ }
+
private Session getSession () {
if (session == null) {
try {
- session = hibernateUtils.getSessionFactory ().openSession ();
+ session = sessionFactoryCatalogDB.getSessionFactory ().openSession ();
session.beginTransaction ();
} catch (HibernateException he) {
LOGGER.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Error creating Hibernate Session: " + he, "", "", MsoLogger.ErrorCode.DataError, "Error creating Hibernate Session: " + he);
@@ -143,6 +172,7 @@ public class CatalogDatabase implements Closeable {
* @param templateId
* @return HeatTemplate object or null if none found
*/
+ @Deprecated
public HeatTemplate getHeatTemplate (int templateId) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get Heat template with id " + templateId);
@@ -215,6 +245,114 @@ public class CatalogDatabase implements Closeable {
}
/**
+ * Return a specific Heat Template by ARTIFACT_UUID).
+ *
+ * @param artifactUuid
+ * @return HeatTemplate object or null if none found
+ */
+
+ public HeatTemplate getHeatTemplateByArtifactUuid(String artifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Heat template with artifactUuid " + artifactUuid);
+
+ // Will this work if the id is a string?
+ HeatTemplate template = (HeatTemplate) getSession ().get (HeatTemplate.class, artifactUuid);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+ return template;
+ }
+
+ /**
+ * Return a specific Heat Template by ARTIFACT_UUID using standard query method. unique record expected.
+ *
+ * @param artifactUuid
+ * @return HeatTemplate object or null if none found
+ */
+ public HeatTemplate getHeatTemplateByArtifactUuidRegularQuery(String artifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Heat template (regular query) with artifactUuid " + artifactUuid);
+
+ String hql = "FROM HeatTemplate WHERE artifactUuid = :artifactUuidValue";
+ HashMap<String, String> variables = new HashMap<String, String>();
+ variables.put("artifactUuidValue", artifactUuid);
+ //Query query = getSession().createQuery(hql);
+ //query.setParameter ("artifactUuidValue", artifactUuid);
+ HeatTemplate template = (HeatTemplate) this.executeQuerySingleRow(hql.toString(), variables, true);
+
+ if (template == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getHeatTemplateByArtifactUuidRegularQuery", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplateByArtifactUuidRegularQuery", null);
+ }
+ return template;
+ }
+
+ public List<HeatTemplateParam> getParametersForHeatTemplate(String heatTemplateArtifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getParametersForHeatTemplate with artifactUuid " + heatTemplateArtifactUuid);
+
+ String hql = "FROM HeatTemplateParams WHERE artifactUuid = :artifactUuidValue";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("artifactUuidValue", heatTemplateArtifactUuid);
+ List<HeatTemplateParam> resultList = null;
+ try {
+ resultList = query.list ();
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching HeatTemplateParams for: heatTemplateArtifactUuid='" + heatTemplateArtifactUuid + "'" + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching HeatTemplateParams for artifactUuid=" + heatTemplateArtifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for artifactUuid=" + heatTemplateArtifactUuid);
+ resultList = new ArrayList<HeatTemplateParam>();
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching HeatTemplateParam for: artifactUuid='" + heatTemplateArtifactUuid + "'" + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching HeatTemplate for artifactUuid=" + heatTemplateArtifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for artifactUuid=" + heatTemplateArtifactUuid);
+ resultList = new ArrayList<HeatTemplateParam>();
+ throw e;
+ }
+
+ return resultList;
+
+ }
+
+ /**
+ * Return a specific Heat Environment by ARTIFACT_UUID using standard query method. unique record expected.
+ *
+ * @param artifactUuid
+ * @return HeatEnvironment object or null if none found
+ */
+ public HeatEnvironment getHeatEnvironmentByArtifactUuid(String artifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Heat Environment with artifactUuid " + artifactUuid);
+
+ String hql = "FROM HeatEnvironment WHERE artifactUuid = :artifactUuidValue";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("artifactUuidValue", artifactUuid);
+ HeatEnvironment environment = null;
+ try {
+ environment = (HeatEnvironment) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row for Envt - data integrity error: artifactUuid='" + artifactUuid +"'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for heatEnvironment artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for artifactUuid==" + artifactUuid);
+ environment = null;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for envt: artifactUuid='" + artifactUuid + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching envt for artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching envt for artifactUuid=" + artifactUuid);
+ environment = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: artifactUuid='" + artifactUuid + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching envt for artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching envt for artifactUuid=" + artifactUuid);
+ environment = null;
+ throw e;
+ }
+
+ if (environment == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getHeatEnvironmentByArtifactUuid", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatEnvironmentByArtifactUuid", null);
+ }
+ return environment;
+ }
+
+ /**
* Fetch a Service definition by InvariantUUID
*/
public Service getServiceByInvariantUUID (String modelInvariantUUID) {
@@ -244,30 +382,30 @@ public class CatalogDatabase implements Closeable {
/**
* Fetch a Service definition
*/
- public Service getService (String serviceName) {
+ public Service getService (String modelName) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get service with name " + serviceName);
+ LOGGER.debug ("Catalog database - get service with name " + modelName);
- String hql = "FROM Service WHERE serviceName = :service_name";
+ String hql = "FROM Service WHERE modelName = :MODEL_NAME";
Query query = getSession ().createQuery (hql);
- query.setParameter ("service_name", serviceName);
+ query.setParameter ("MODEL_NAME", modelName);
Service service = null;
try {
service = (Service) query.uniqueResult ();
} catch (org.hibernate.NonUniqueResultException nure) {
- LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceName='" + serviceName + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceName=" + serviceName);
- return null;
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelName='" + modelName + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelName=" + modelName, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelName=" + modelName);
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceName + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceName=" + serviceName);
- return null;
+ LOGGER.debug("Hibernate Exception - while searching for: modelName='" + modelName + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelName=" + modelName, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelName=" + modelName);
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: serviceName='" + serviceName);
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceName=" + serviceName);
- return null;
+ LOGGER.debug("Generic Exception - while searching for: modelName='" + modelName + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelName=" + modelName, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelName=" + modelName);
+ throw e;
}
if (service == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
@@ -278,38 +416,39 @@ public class CatalogDatabase implements Closeable {
return service;
}
- /**
- * Fetch a Service definition
- */
- public Service getServiceByUUID (String serviceNameVersionId) {
+ public Service getServiceByModelUUID (String modelUUID) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get service with UUID " + serviceNameVersionId);
+ LOGGER.debug ("Catalog database - get service with Model UUID " + modelUUID);
- String hql = "FROM Service WHERE serviceNameVersionId = :service_id";
- Query query = getSession ().createQuery (hql);
- query.setParameter ("service_id", serviceNameVersionId);
+ String hql = "FROM Service WHERE modelUUID = :MODEL_UUID";
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("MODEL_UUID", modelUUID);
- Service service = null;
+
+ Service service = this.executeQuerySingleRow(hql, parameters, true);
+
+ /*
try {
service = (Service) query.uniqueResult ();
} catch (org.hibernate.NonUniqueResultException nure) {
- LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceNameVersionId='" + serviceNameVersionId + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceNameVersionId=" + serviceNameVersionId);
- return null;
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelUUID='" + modelUUID + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelUUID=" + modelUUID, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelUUID=" + modelUUID);
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceNameVersionId + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceNameVersionId=" + serviceNameVersionId);
- return null;
+ LOGGER.debug("Hibernate Exception - while searching for: modelUUID='" + modelUUID + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelUUID=" + modelUUID, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelUUID=" + modelUUID);
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: serviceName='" + serviceNameVersionId);
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceNameVersionId=" + serviceNameVersionId);
- return null;
+ LOGGER.debug("Generic Exception - while searching for: modelUUID='" + modelUUID + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelUUID=" + modelUUID, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelUUID=" + modelUUID);
+ throw e;
}
+ */
if (service == null) {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getServiceByModelUUID", null);
} else {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getService", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByModelUUID", null);
}
return service;
@@ -326,11 +465,11 @@ public class CatalogDatabase implements Closeable {
String serviceVersion = "not_set";
if(serviceNameVersionId != null && serviceNameVersionId.length() > 0){
- LOGGER.debug ("Catalog database - get serviceNameVersionId with id " + serviceNameVersionId);
+ LOGGER.debug ("Catalog database - get service modelUUID with id " + serviceNameVersionId);
- String hql = "FROM Service WHERE service_name_version_id = :service_name_version_id and http_method = :http_method";
+ String hql = "FROM Service WHERE MODEL_UUID = :MODEL_UUID and http_method = :http_method";
query = getSession ().createQuery (hql);
- query.setParameter ("service_name_version_id", serviceNameVersionId);
+ query.setParameter ("MODEL_UUID", serviceNameVersionId);
} else {
serviceId = map.get("serviceId");
serviceVersion = map.get("serviceVersion");
@@ -352,14 +491,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - data integrity error: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for service_id=" + serviceId);
service = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for service_id=" + serviceId);
service = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
+ LOGGER.debug("Generic Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for service_id=" + serviceId);
service = null;
+ throw e;
}
if (service == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
@@ -372,30 +514,30 @@ public class CatalogDatabase implements Closeable {
/**
* Return the newest version of a Service (queried by Name).
*
- * @param serviceName
+ * @param modelName
* @return Service object or null if none found
*/
- public Service getServiceByName (String serviceName) {
+ public Service getServiceByModelName (String modelName){
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get service with name " + serviceName);
+ LOGGER.debug ("Catalog database - get service with name " + modelName);
- String hql = "FROM Service WHERE serviceName = :service_name";
+ String hql = "FROM Service WHERE modelName = :MODEL_NAME";
Query query = getSession ().createQuery (hql);
- query.setParameter ("service_name", serviceName);
+ query.setParameter ("MODEL_NAME", modelName);
@SuppressWarnings("unchecked")
List <Service> resultList = query.list ();
// See if something came back.
if (resultList.isEmpty ()) {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByName", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByModelName", null);
return null;
}
Collections.sort (resultList, new MavenLikeVersioningComparator ());
Collections.reverse (resultList);
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByName", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByModelName", null);
return resultList.get (0);
}
@@ -427,74 +569,75 @@ public class CatalogDatabase implements Closeable {
}
/**
- * Return a Service recipe that matches a given SERVICE_NAME_VERSION_ID
- * (MODEL_VERSION_ID) and ACTION
+ * Return a newest version of Service recipe that matches a given SERVICE_ID and ACTION
*
- * @param modelVersionId
- * @param action
+ * @param serviceModelUUID
+ * @param action *
* @return ServiceRecipe object or null if none found
*/
- public ServiceRecipe getServiceRecipe(String modelVersionId,
- String action) {
+ @Deprecated
+ public ServiceRecipe getServiceRecipe (int serviceModelUUID, String action) {
+
+ StringBuilder hql = null;
- long startTime = System.currentTimeMillis();
- LOGGER.debug("Catalog database - get Service recipe with modeVersionId=" + modelVersionId
- + " and action=" + action);
+ if(action == null){
+ hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceModelUUID = :serviceModelUUID");
+ }else {
+ hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceModelUUID = :serviceModelUUID AND action = :action ");
+ }
- try {
- String hql;
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Service recipe with serviceModelUUID " + Integer.toString(serviceModelUUID)
+ + " and action "
+ + action
+ );
- hql = "SELECT new ServiceRecipe(SR.id, SR.serviceId, SR.action, SR.description, " +
- "SR.orchestrationUri, SR.serviceParamXSD, case when SR.recipeTimeout is null then 0 else SR.recipeTimeout end, " +
- "case when SR.serviceTimeoutInterim is null then 0 else SR.serviceTimeoutInterim end, SR.created) " +
- "FROM Service as S RIGHT OUTER JOIN S.recipes SR " +
- "WHERE SR.serviceId = S.id AND S.serviceNameVersionId = :serviceNameVersionId AND SR.action = :action";
- Query query = getSession().createQuery(hql);
- query.setParameter(SERVICE_NAME_VERSION_ID, modelVersionId);
- query.setParameter(ACTION, action);
+ Query query = getSession ().createQuery (hql.toString ());
+ query.setParameter ("serviceModelUUID", serviceModelUUID);
+ if(action != null){
+ query.setParameter (ACTION, action);
+ }
@SuppressWarnings("unchecked")
- List<ServiceRecipe> recipeResultList = query.list();
- if (recipeResultList.isEmpty()) {
- LOGGER.debug("Catalog database - recipeResultList is null");
+ List <ServiceRecipe> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service recipe not found", "CatalogDB", "getServiceRecipe", null);
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
- Collections.reverse(recipeResultList);
- LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
- return recipeResultList.get(0);
- } finally {
- LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
- }
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
+ return resultList.get (0);
}
/**
- * Return a newest version of Service recipe that matches a given SERVICE_ID and ACTION
+ * Return a newest version of Service recipe that matches a given SERVICE_MODEL_UUID and ACTION
*
- * @param serviceId
+ * @param serviceModelUuid
* @param action *
* @return ServiceRecipe object or null if none found
*/
- public ServiceRecipe getServiceRecipe (int serviceId, String action) {
+ public ServiceRecipe getServiceRecipeByServiceModelUuid (String serviceModelUuid, String action) {
StringBuilder hql = null;
if(action == null){
- hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceId = :serviceId");
+ hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceModelUuid = :serviceModelUuid");
}else {
- hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceId = :serviceId AND action = :action ");
+ hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceModelUuid = :serviceModelUuid AND action = :action ");
}
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get Service recipe with serviceId " + Integer.toString(serviceId)
+ LOGGER.debug ("Catalog database - get Service recipe with serviceModelUuid " + serviceModelUuid
+ " and action "
+ action
);
Query query = getSession ().createQuery (hql.toString ());
- query.setParameter ("serviceId", serviceId);
- query.setParameter (ACTION, action);
+ query.setParameter ("serviceModelUuid", serviceModelUuid);
if(action != null){
query.setParameter (ACTION, action);
}
@@ -514,30 +657,17 @@ public class CatalogDatabase implements Closeable {
return resultList.get (0);
}
- /**
- * @param serviceName
- * @param action
- * @return ServiceRecipe object or null if none found. returns a newest version of Service recipe that matches a given serviceName, action and for the newest service version
- */
- public ServiceRecipe getServiceRecipeByServiceNameAndAction(String serviceName, String action) {
- Service service = getServiceByName(serviceName);
- if (service != null ){
- return getServiceRecipe(service.getId(),action);
- }
- return null;
- }
-
- public List<ServiceRecipe> getServiceRecipes (int serviceId) {
+ public List<ServiceRecipe> getServiceRecipes (String serviceModelUuid) {
StringBuilder hql = null;
- hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceId = :serviceId");
+ hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceModelUUID = :serviceModelUUID");
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get Service recipe with serviceId " + Integer.toString(serviceId));
+ LOGGER.debug ("Catalog database - get Service recipe with serviceModelUUID " + serviceModelUuid);
Query query = getSession ().createQuery (hql.toString ());
- query.setParameter ("serviceId", serviceId);
+ query.setParameter ("serviceModelUUID", serviceModelUuid);
@SuppressWarnings("unchecked")
List <ServiceRecipe> resultList = query.list ();
@@ -554,6 +684,7 @@ public class CatalogDatabase implements Closeable {
return resultList;
}
+
/**
* Return the VNF component data - queried by the VNFs ID and the component type.
*
@@ -561,6 +692,7 @@ public class CatalogDatabase implements Closeable {
* @param type
* @return VnfComponent object or null if none found
*/
+ @Deprecated
public VnfComponent getVnfComponent (int vnfId, String type) {
long startTime = System.currentTimeMillis();
@@ -578,14 +710,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vnf_id='" + vnfId + "', componentType='" + type + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnf_id=" + vnfId);
result = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnf_id=" + vnfId);
result = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "'");
+ LOGGER.debug("Generic Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnf_id=" + vnfId);
result = null;
+ throw e;
}
//LOGGER.debug("Found VNF Component: " + result.toString());
@@ -606,9 +741,9 @@ public class CatalogDatabase implements Closeable {
public VnfResource getVnfResource (String vnfType) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get vnf resource with name " + vnfType);
+ LOGGER.debug ("Catalog database - get vnf resource with model_name " + vnfType);
- String hql = "FROM VnfResource WHERE vnfType = :vnf_name";
+ String hql = "FROM VnfResource WHERE modelName = :vnf_name";
Query query = getSession ().createQuery (hql);
query.setParameter ("vnf_name", vnfType);
@@ -637,9 +772,9 @@ public class CatalogDatabase implements Closeable {
public VnfResource getVnfResource (String vnfType, String serviceVersion) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get VNF resource with name " + vnfType);
+ LOGGER.debug ("Catalog database - get VNF resource with model_name " + vnfType + " and version=" + serviceVersion);
- String hql = "FROM VnfResource WHERE vnfType = :vnfName and version = :serviceVersion";
+ String hql = "FROM VnfResource WHERE modelName = :vnfName and version = :serviceVersion";
Query query = getSession ().createQuery (hql);
query.setParameter ("vnfName", vnfType);
query.setParameter ("serviceVersion", serviceVersion);
@@ -651,14 +786,19 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vnfType='" + vnfType + "', serviceVersion='" + serviceVersion + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnfType=" + vnfType);
resource = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: vnfType='" + vnfType + "', asdc_service_model_version='" + serviceVersion + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: vnfType='" + vnfType + "', asdc_service_model_version='" + serviceVersion + "' " + he.getMessage());
+ LOGGER.debug(he.getStackTrace().toString());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfType=" + vnfType);
resource = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: vnfType='" + vnfType + "', serviceVersion='" + serviceVersion + "'");
+ LOGGER.debug("Generic Exception - while searching for: vnfType='" + vnfType + "', serviceVersion='" + serviceVersion + "' " + e.getMessage());
+ LOGGER.debug(e.getStackTrace().toString());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnfType=" + vnfType);
resource = null;
+ throw e;
}
if (resource == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResource", null);
@@ -669,37 +809,120 @@ public class CatalogDatabase implements Closeable {
}
/**
- * Return the newest version of a specific VNF resource (queried by modelCustomizationId).
+ * Return VnfResource (queried by modelCustomizationId).
*
- * @param vnfType
- * @param version
+ * @param modelCustomizationId
* @return VnfResource object or null if none found
*/
- public VnfResource getVnfResourceByModelCustomizationId (String modelCustomizationId, String serviceVersion) {
+ public VnfResource getVnfResourceByModelCustomizationId (String modelCustomizationId) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get VNF resource with modelCustomizationId " + modelCustomizationId);
- String hql = "FROM VnfResource WHERE modelCustomizationUuid = :modelCustomizationId and version = :serviceVersion";
+ String hql = "SELECT vr "
+ + "FROM VnfResource as vr JOIN vr.vnfResourceCustomizations as vrc "
+ + "WHERE vrc.modelCustomizationUuid = :modelCustomizationId";
+
Query query = getSession ().createQuery (hql);
query.setParameter ("modelCustomizationId", modelCustomizationId);
- query.setParameter ("serviceVersion", serviceVersion);
VnfResource resource = null;
try {
resource = (VnfResource) query.uniqueResult ();
} catch (org.hibernate.NonUniqueResultException nure) {
- LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelCustomizationUuid='" + modelCustomizationId + "', serviceVersion='" + serviceVersion + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelCustomizationUuid=" + modelCustomizationId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationId=" + modelCustomizationId);
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelCustomizationUuid='" + modelCustomizationId + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelCustomizationUuid=" + modelCustomizationId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationId=" + modelCustomizationId);
+ resource = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationId='" + modelCustomizationId + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelCustomizationId=" + modelCustomizationId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationId=" + modelCustomizationId);
+ resource = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: modelCustomizationId='" + modelCustomizationId + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelCustomizationId=" + modelCustomizationId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationId=" + modelCustomizationId);
+ resource = null;
+ throw e;
+ }
+ if (resource == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResourceByModelCustomizationId", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceByModelCustomizationId", null);
+ }
+ return resource;
+ }
+
+
+ /**
+ * Return the newest version of a specific VNF resource Customization (queried by modelCustomizationName and modelVersionId).
+ *
+ * @return {@link VnfResourceCustomization} object or null if none found
+ */
+ public VnfResourceCustomization getVnfResourceCustomizationByModelCustomizationName (String modelCustomizationName, String modelVersionId) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get VNF resource Customization with modelCustomizationName " + modelCustomizationName + " serviceModelUUID " + modelVersionId);
+
+ String hql = "SELECT vrc FROM VnfResourceCustomization as vrc WHERE vrc.modelCustomizationUuid IN "
+ + "(SELECT src.resourceModelCustomizationUUID FROM ServiceToResourceCustomization src "
+ + "WHERE src.serviceModelUUID = :modelVersionId)"
+ + "AND vrc.modelInstanceName = :modelCustomizationName";
+
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("modelCustomizationName", modelCustomizationName);
+ query.setParameter ("modelVersionId", modelVersionId);
+
+ @SuppressWarnings("unchecked")
+ List <VnfResourceCustomization> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VnfResourceCustomization not found", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationName", null);
+ return null;
+ }
+
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationName", null);
+ return resultList.get (0);
+ }
+
+
+ /**
+ * Return the newest version of a specific VNF resource (queried by modelInvariantId).
+ *
+ * @param version
+ * @return VnfResource object or null if none found
+ */
+ public VnfResource getVnfResourceByModelInvariantId(String modelInvariantUuid, String modelVersion) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get VNF resource with modelInvariantUuid " + modelInvariantUuid);
+
+ String hql = "FROM VnfResource WHERE modelInvariantUuid = :modelInvariantUuid and version = :serviceVersion";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("modelInvariantUuid", modelInvariantUuid);
+ query.setParameter ("serviceVersion", modelVersion);
+
+ VnfResource resource = null;
+ try {
+ resource = (VnfResource) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelInvariantUuid='" + modelInvariantUuid + "', serviceVersion='" + modelVersion + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelInvariantUuid=" + modelInvariantUuid + " and serviceVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelInvariantUuid=" + modelInvariantUuid);
resource = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationId='" + modelCustomizationId + "', asdc_service_model_version='" + serviceVersion + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelCustomizationId=" + modelCustomizationId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationId=" + modelCustomizationId);
+ LOGGER.debug("Hibernate Exception - while searching for: modelInvariantUuid='" + modelInvariantUuid + "', asdc_service_model_version='" + modelVersion + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelInvariantUuid=" + modelInvariantUuid + " and serviceVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelInvariantUuid=" + modelInvariantUuid);
resource = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: modelCustomizationId='" + modelCustomizationId + "', serviceVersion='" + serviceVersion + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelCustomizationId=" + modelCustomizationId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationId=" + modelCustomizationId);
+ LOGGER.debug("Generic Exception - while searching for: modelInvariantUuid='" + modelInvariantUuid + "', serviceVersion='" + modelVersion + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelInvariantUuid=" + modelInvariantUuid + " and serviceVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelInvariantUuid=" + modelInvariantUuid);
resource = null;
+ throw e;
}
if (resource == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResource", null);
@@ -715,6 +938,7 @@ public class CatalogDatabase implements Closeable {
* @param id The vnf id
* @return VnfResource object or null if none found
*/
+ @Deprecated
public VnfResource getVnfResourceById (int id) {
long startTime = System.currentTimeMillis ();
@@ -745,7 +969,7 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get vfModuleModelName with name " + modelName);
- String hql = "FROM VfModule WHERE model_name = :model_name";
+ String hql = "FROM VfModule WHERE modelName = :model_name";
Query query = getSession ().createQuery (hql);
query.setParameter ("model_name", modelName);
@@ -769,9 +993,9 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get vfModuleModelName with type='" + modelName + "' and asdc_service_model_version='" + model_version + "'");
- String hql = "FROM VfModule WHERE model_name = :model_name and version = :model_version";
+ String hql = "FROM VfModule WHERE Name = :model_name and version = :model_version";
Query query = getSession ().createQuery (hql);
- query.setParameter ("model_name", modelName);
+ query.setParameter ("modelName", modelName);
query.setParameter ("model_version", model_version);
VfModule module = null;
@@ -781,14 +1005,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for type=" + modelName);
module = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for type=" + modelName);
module = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
+ LOGGER.debug("Generic Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for type=" + modelName);
module = null;
+ throw e;
}
if (module == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleModelName", null);
@@ -797,6 +1024,35 @@ public class CatalogDatabase implements Closeable {
}
return module;
}
+
+ /**
+ * Need this for 1707 DHV. This may be a temporary solution. May
+ * change it to get resources using service's model name.
+ *
+ *@author cb645j
+ *
+ */
+ public VfModuleCustomization getVfModuleCustomizationByModelName (String modelName) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get VfModuleCustomization By VfModule's ModelName: " + modelName);
+
+ String hql = "SELECT VfModuleCustomization FROM VfModuleCustomization as vfmc LEFT OUTER JOIN VfModule as vfm on vfm.modelUUID = vfmc.vfModuleModelUuid where vfm.modelName = :model_name";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("model_name", modelName);
+
+ @SuppressWarnings("unchecked")
+ List<VfModuleCustomization> resultList = query.list();
+
+ // See if something came back. Name is unique, so
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful query but Vf module NOT found", "CatalogDB", "getVfModuleCustomizationByModelName", null);
+ return null;
+ }
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful query ", "CatalogDB", "getVfModuleCustomizationByModelName", null);
+ return resultList.get(0);
+ }
/**
@@ -810,7 +1066,7 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get network resource with type " + networkType);
- String hql = "FROM NetworkResource WHERE networkType = :network_type";
+ String hql = "FROM NetworkResource WHERE model_name = :network_type";
Query query = getSession ().createQuery (hql);
query.setParameter ("network_type", networkType);
@@ -928,7 +1184,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug ("Catalog database - get VNF Recipe with vfModuleId " + vfModuleId);
Query query = getSession ().createQuery (hql.toString ());
- query.setParameter (VF_MODULE_ID, vfModuleId);
+ query.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query.setParameter (ACTION, action);
@SuppressWarnings("unchecked")
@@ -961,14 +1217,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelCustomizationUuid='" + modelCustomizationUuid + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationUuid==" + modelCustomizationUuid);
module = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
module = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "'");
+ LOGGER.debug("Generic Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
module = null;
+ throw e;
}
if (module == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleTypeByUuid", null);
@@ -978,6 +1237,7 @@ public class CatalogDatabase implements Closeable {
return module;
}
+ @Deprecated
public VfModule getVfModuleType(String type) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - get vfModuleType with type " + type);
@@ -999,6 +1259,7 @@ public class CatalogDatabase implements Closeable {
return resultList.get (0);
}
+ @Deprecated
public VfModule getVfModuleType(String type, String version) {
long startTime = System.currentTimeMillis();
@@ -1015,14 +1276,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: type='" + type + "', asdc_service_model_version='" + version + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for type==" + type);
module = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for type=" + type);
module = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "'");
+ LOGGER.debug("Generic Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for type=" + type);
module = null;
+ throw e;
}
if (module == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleType", null);
@@ -1046,14 +1310,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceModelInvariantUuid='" + serviceModelInvariantUuid);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceModelInvariantUuid==" + serviceModelInvariantUuid);
vnfResource = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid);
vnfResource = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid + "'");
+ LOGGER.debug("Generic Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid);
vnfResource = null;
+ throw e;
}
if (vnfResource == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleType", null);
@@ -1077,14 +1344,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vnfResourceModelInvariantUuid='" + vnfResourceModelInvariantUuid);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceModelInvariantUuid=" + vnfResourceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnfResourceModelInvariantUuid==" + vnfResourceModelInvariantUuid);
vnfResource = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: vnfResourceModelInvariantUuid='" + vnfResourceModelInvariantUuid + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: vnfResourceModelInvariantUuid='" + vnfResourceModelInvariantUuid + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnfResourceModelInvariantUuid=" + vnfResourceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResourceModelInvariantUuid=" + vnfResourceModelInvariantUuid);
vnfResource = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: vnfResourceModelInvariantUuid='" + vnfResourceModelInvariantUuid + "'");
+ LOGGER.debug("Generic Exception - while searching for: vnfResourceModelInvariantUuid='" + vnfResourceModelInvariantUuid + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnfResourceModelInvariantUuid=" + vnfResourceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnfResourceModelInvariantUuid=" + vnfResourceModelInvariantUuid);
vnfResource = null;
+ throw e;
}
if (vnfResource == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleType", null);
@@ -1098,29 +1368,22 @@ public class CatalogDatabase implements Closeable {
return this.getVnfResource(vnfType);
}
- public VfModule getVfModuleByModelInvariantUuid(String vfModuleModelInvariantUuid) {
+ public VfModule getVfModuleByModelInvariantUuid(String modelInvariantUUID) {
long startTime = System.currentTimeMillis();
- LOGGER.debug ("Catalog database - get vfModuleTypeByUuid with uuid " + vfModuleModelInvariantUuid);
+ LOGGER.debug ("Catalog database - get vfModuleTypeByModelInvariantUuid with uuid " + modelInvariantUUID);
- String hql = "FROM VfModule WHERE vfModuleModelInvariantUuid = :vfModuleModelInvariantUuid ";
- Query query = getSession().createQuery(hql);
- query.setParameter ("vfModuleModelInvariantUuid", vfModuleModelInvariantUuid);
+ String hql = "FROM VfModule WHERE modelInvariantUUID = :modelInvariantUUID ";
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("modelInvariantUUID", modelInvariantUUID);
+ List<VfModule> modules = this.executeQueryMultipleRows(hql.toString(), parameters, true);
VfModule module = null;
- try {
- module = (VfModule) query.uniqueResult ();
- } catch (org.hibernate.NonUniqueResultException nure) {
- LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vfModuleModelInvariantUuid='" + vfModuleModelInvariantUuid + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid , "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vfModuleModelInvariantUuid==" + vfModuleModelInvariantUuid);
- module = null;
- } catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: vfModuleModelInvariantUuid='" + vfModuleModelInvariantUuid + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid);
- module = null;
- } catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: vfModuleModelInvariantUuid='" + vfModuleModelInvariantUuid + "'");
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid);
- module = null;
+
+ if (modules != null && modules.size() > 0) {
+ Collections.sort (modules, new MavenLikeVersioningComparator ());
+ Collections.reverse (modules);
+ module = modules.get(0);
}
+
if (module == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelInvariantUuid", null);
} else {
@@ -1129,28 +1392,31 @@ public class CatalogDatabase implements Closeable {
return module;
}
- public VfModule getVfModuleByModelCustomizationUuid(String modelCustomizationUuid) {
+ public VfModuleCustomization getVfModuleByModelCustomizationUuid(String modelCustomizationUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug ("Catalog database - get vfModuleTypeByModelCustomizationUuid with uuid " + modelCustomizationUuid);
- String hql = "FROM VfModule WHERE modelCustomizationUuid = :modelCustomizationUuid ";
+ String hql = "FROM VfModuleCustomization WHERE modelCustomizationUuid = :modelCustomizationUuid ";
Query query = getSession().createQuery(hql);
query.setParameter ("modelCustomizationUuid", modelCustomizationUuid);
- VfModule module = null;
+ VfModuleCustomization module = null;
try {
- module = (VfModule) query.uniqueResult ();
+ module = (VfModuleCustomization) query.uniqueResult ();
} catch (org.hibernate.NonUniqueResultException nure) {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelCustomizationUuid='" + modelCustomizationUuid + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vfModuleModelInvariantUuid=" + modelCustomizationUuid , "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationUuid==" + modelCustomizationUuid);
module = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
module = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "'");
+ LOGGER.debug("Generic Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
module = null;
+ throw e;
}
if (module == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelCustomizationUuid", null);
@@ -1160,28 +1426,545 @@ public class CatalogDatabase implements Closeable {
return module;
}
- public VfModule getVfModuleByType(String vfModuleType) {
- return this.getVfModuleType(vfModuleType);
+
+ public VfModule getVfModuleByModelInvariantUuidAndModelVersion(String modelInvariantUuid, String modelVersion) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleByModelInvariantUuidAndModelVersion with modelInvariantUuid: " + modelInvariantUuid + ", modelVersion: " + modelVersion);
+
+ String hql = "FROM VfModule WHERE modelInvariantUUID = :modelInvariantUuid and version = :modelVersion";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelInvariantUuid", modelInvariantUuid);
+ query.setParameter("modelVersion", modelVersion);
+ VfModule module = null;
+ try {
+ module = (VfModule) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelInvariantUuid='" + modelInvariantUuid + "', modelVersion='" +modelVersion + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vfModule ModelInvariantUuid=" + modelInvariantUuid + " modelVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for ModelInvariantUuid==" + modelInvariantUuid + " modelVersion==" + modelVersion);
+ module = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: modelInvariantUuid='" + modelInvariantUuid + "', modelVersion='" +modelVersion + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelInvariantUuid=" + modelInvariantUuid + " modelVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelInvariantUuid=" + modelInvariantUuid + " modelVersion=" + modelVersion);
+ module = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: modelInvariantUuid='" + modelInvariantUuid + "', modelVersion='" +modelVersion + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelInvariantUuid=" + modelInvariantUuid + " modelVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelInvariantUuid=" + modelInvariantUuid + " modelVersion=" + modelVersion);
+ module = null;
+ throw e;
+ }
+ if (module == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelInvariantUuidAndModelVersion", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleByModelInvariantUuidAndModelVersion", null);
+ }
+ return module;
+ }
+
+ /**
+ * Return the VfModuleCustomization object identified by the given modelCustomizationUuid 1707
+ *
+ * @param modelCustomizationUuid
+ * @return VfModuleCustomization or null if not found
+ */
+ public VfModuleCustomization getVfModuleCustomizationByModelCustomizationId(String modelCustomizationUuid) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleCustomizationByModelCustomizationId with modelCustomizationUuid: " + modelCustomizationUuid);
+
+ String hql = "FROM VfModuleCustomization WHERE modelCustomizationUuid = :modelCustomizationUuid";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelCustomizationUuid", modelCustomizationUuid);
+ VfModuleCustomization VfModuleCustomization = null;
+ try {
+ VfModuleCustomization = (VfModuleCustomization) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelCustomizationUuid='" + modelCustomizationUuid +"'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vfModuleCustomization modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationUuid==" + modelCustomizationUuid);
+ VfModuleCustomization = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ VfModuleCustomization = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ VfModuleCustomization = null;
+ throw e;
+ }
+ if (VfModuleCustomization != null) {
+ LOGGER.debug("Found VMC of " + VfModuleCustomization.getModelCustomizationUuid() + ", now looking for vfModule=" + VfModuleCustomization.getVfModuleModelUuid());
+ VfModuleCustomization.setVfModule(this.getVfModuleByModelUuid(VfModuleCustomization.getVfModuleModelUuid()));
+ }
+
+ if (VfModuleCustomization == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleCustomizationByModelCustomizationId", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleCustomizationByModelCustomizationId", null);
+ }
+ return VfModuleCustomization;
+ }
+
+ /**
+ * Return the VfModule object identified by the given modelUuid 1707
+ * per Mike Z. - this may return more than one row - and even if it does,
+ * the heat template will be the same - so just return any of the rows.
+ *
+ * @param modelUuid
+ * @return VfModule or null if not found
+ */
+ public VfModule getVfModuleByModelUuid(String modelUuid) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleByModelUuid with modelUuid: " + modelUuid);
+
+ String hql = "FROM VfModule WHERE modelUUID = :modelUuidValue";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelUuidValue", modelUuid);
+ //VfModule vfModule = null;
+ List<VfModule> vfModules = null;
+ try {
+ vfModules = query.list ();
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VfModule for: modelUuid='" + modelUuid + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VfModule for modelUuid=" + modelUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelUuid=" + modelUuid);
+ vfModules = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VfModule for: modelUuid='" + modelUuid + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for modelUuid=" + modelUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelUuid=" + modelUuid);
+ vfModules = null;
+ throw e;
+ }
+
+ if (vfModules == null || vfModules.size() < 1) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelUuid", null);
+ return null;
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleByModelUuid", null);
+ }
+ return vfModules.get(0);
+ }
+ /**
+ * Return the VnfResourceCustomization object identified by the given modelCustomizationUuid 1707
+ * Note that the corresponding VnfResource Object will be put in the VnfResourceCustomization bean
+ *
+ * @param modelCustomizationUuid
+ * @return VnfResourceCustomization or null if not found
+ */
+ public VnfResourceCustomization getVnfResourceCustomizationByModelCustomizationUuid(String modelCustomizationUuid) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVnfResourceByModelCustomizatonUuid with modelCustomizationUuid: " + modelCustomizationUuid);
+
+ String hql = "FROM VnfResourceCustomization WHERE modelCustomizationUuid = :modelCustomizationUuid";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelCustomizationUuid", modelCustomizationUuid);
+ VnfResourceCustomization vnfResourceCustomization = null;
+ try {
+ vnfResourceCustomization = (VnfResourceCustomization) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row in VRC - data integrity error: modelCustomizationUuid='" + modelCustomizationUuid +"'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceCustomization modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelCustomizationUuid==" + modelCustomizationUuid);
+ vnfResourceCustomization = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VRC for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VRC for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ vnfResourceCustomization = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VRC for: modelCustomizationUuid='" + modelCustomizationUuid + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching VRC for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ vnfResourceCustomization = null;
+ throw e;
+ }
+ if (vnfResourceCustomization != null) {
+ LOGGER.debug("Found VRC of " + vnfResourceCustomization.getModelCustomizationUuid() + ", now looking for vnfResource=" + vnfResourceCustomization.getVnfResourceModelUuid() );
+ vnfResourceCustomization.setVnfResource(this.getVnfResourceByModelUuid(vnfResourceCustomization.getVnfResourceModelUuid()));
+ LOGGER.debug("Now looking for vfModules for " + vnfResourceCustomization.getModelCustomizationUuid());
+ vnfResourceCustomization.setVfModuleCustomizations(this.getAllVfModuleCustomizations(vnfResourceCustomization.getModelCustomizationUuid()));
+ }
+
+ if (vnfResourceCustomization == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationUuid", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationUuid", null);
+ }
+ return vnfResourceCustomization;
+ }
+
+ /**
+ * Return the VnfResourceCustomization object identified by the given modelCustomizationUuid 1707
+ * Note that the corresponding VnfResource Object will be put in the VnfResourceCustomization bean
+ *
+ * @param getVnfResourceCustomizationByModelVersionId
+ * @return VnfResourceCustomization or null if not found
+ */
+ public VnfResourceCustomization getVnfResourceCustomizationByModelVersionId(String modelVersionId) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVnfResourceCustomizationByModelVersionId with modelVersionId: " + modelVersionId);
+
+ String hql = "FROM VnfResourceCustomization WHERE vnfResourceModelUuid = :modelVersionId";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelVersionId", modelVersionId);
+ VnfResourceCustomization vnfResourceCustomization = null;
+ try {
+ vnfResourceCustomization = (VnfResourceCustomization) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row in VRC - data integrity error: modelVersionId='" + modelVersionId +"'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceCustomization modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelVersionId==" + modelVersionId);
+ vnfResourceCustomization = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VRC for: modelVersionId='" + modelVersionId + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VRC for modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelVersionId=" + modelVersionId);
+ vnfResourceCustomization = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VRC for: modelVersionId='" + modelVersionId + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching VRC for modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelVersionId=" + modelVersionId);
+ vnfResourceCustomization = null;
+ throw e;
+ }
+ if (vnfResourceCustomization != null) {
+ LOGGER.debug("Found VRC of " + vnfResourceCustomization.getModelCustomizationUuid() + ", now looking for vnfResource=" + vnfResourceCustomization.getVnfResourceModelUuid() );
+ vnfResourceCustomization.setVnfResource(this.getVnfResourceByModelUuid(vnfResourceCustomization.getVnfResourceModelUuid()));
+ LOGGER.debug("Now looking for vfModules for " + vnfResourceCustomization.getModelCustomizationUuid());
+ vnfResourceCustomization.setVfModuleCustomizations(this.getAllVfModuleCustomizations(vnfResourceCustomization.getModelCustomizationUuid()));
+ }
+
+ if (vnfResourceCustomization == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResourceCustomizationByModelVersionId", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelVersionId", null);
+ }
+ return vnfResourceCustomization;
+ }
+
+ /**
+ * Return the VfModule object identified by the given modelCustomizationId, modelVersionId 1707
+ *
+ * @param modelVersionId, modelCustomizationId
+ * @return VfModule or null if not found
+ */
+ public VfModule getVfModuleByModelCustomizationIdAndVersion(String modelCustomizationId, String modelVersionId) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleByModelCustomizationIdAndVersion with modelVersionId: " + modelVersionId + " modelCustomizationId: " + modelCustomizationId);
+
+// select * from vf_module vfm where vfm.MODEL_UUID IN (
+// select vfmc.VF_MODULE_MODEL_UUID from vf_module_customization vfmc where vfmc.MODEL_CUSTOMIZATION_UUID='222bd8f2-341d-4419-aa0e-98398fa34050')
+// and vfm.MODEL_UUID = 'fa1c8558-006c-4fb6-82f2-4fc0646d6b06';
+
+ String hql = "Select vfm FROM VfModule as vfm WHERE vfm.modelUUID IN ("
+ + "SELECT vfmc.vfModuleModelUuid FROM VfModuleCustomization as vfmc "
+ + "WHERE vfmc.modelCustomizationUuid = :modelCustomizationId) "
+ + "AND vfm.modelUUID = :modelVersionId";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelVersionId", modelVersionId);
+ query.setParameter ("modelCustomizationId", modelCustomizationId);
+ VfModule vfModule = null;
+ try {
+ vfModule = (VfModule) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row in VRC - data integrity error: modelVersionId='" + modelVersionId +"' modelCustomizationId='" + modelCustomizationId + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceCustomization modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelVersionId=" + modelVersionId + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VRC for: modelVersionId='" + modelVersionId + "' modelCustomizationId='" + modelCustomizationId + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VRC for modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelVersionId=" + modelVersionId + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VRC for: modelVersionId='" + modelVersionId + "' modelCustomizationId='" + modelCustomizationId + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching VRC for modelVersionId=" + modelVersionId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelVersionId=" + modelVersionId + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw e;
+ }
+
+ if (vfModule == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelCustomizationIdAndVersion", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleByModelCustomizationIdAndVersion", null);
+ }
+ return vfModule;
+ }
+
+ /**
+ * Return the VfModule object identified by the given modelCustomizationId, modelVersion, modelInvariantId 1707
+ *
+ * @param modelCustomizationId, modelVersion, modelInvariantId
+ * @return VfModule or null if not found
+ */
+ public VfModule getVfModuleByModelCustomizationIdModelVersionAndModelInvariantId(String modelCustomizationId, String modelVersion, String modelInvariantId) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleByModelCustomizationIdModelVersionAndModelInvariantId with modelVersionId: " + modelVersion);
+
+ //select * from vf_module vfm left outer join vf_module_customization vfmc on vfmc.VF_MODULE_MODEL_UUID = vfm.MODEL_UUID
+// where vfmc.MODEL_CUSTOMIZATION_UUID='52643a8e-7953-4e48-8eab-97165b2b3a4b' and vfm.MODEL_UUID = ''
+
+ String hql = "Select vfm FROM VfModule as vfm LEFT OUTER JOIN VfModuleCustomization as vfmc on vfmc.vfModuleModelUuid = vfm.modelUUID"
+ + "WHERE vfmc.modelCustomizationUuid = :modelCustomizationId AND vfm.modelInvariantUUID = :modelInvariantId AND vfm.modelVersion = :modelVersion";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelInvariantId", modelInvariantId);
+ query.setParameter ("modelCustomizationId", modelCustomizationId);
+ query.setParameter ("modelVersion", modelVersion);
+ VfModule vfModule = null;
+ try {
+ vfModule = (VfModule) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row in VRC - data integrity error: modelInvariantId='" + modelInvariantId +"' modelVersion='" + modelVersion + "' modelCustomizationId='" + modelCustomizationId +"'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceCustomization modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelInvariantId=" + modelInvariantId + " modelVersion=" + modelVersion + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VRC for: modelInvariantId='" + modelInvariantId + "' modelVersion='" + modelVersion + "' modelCustomizationId='" + modelCustomizationId + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VRC for modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelInvariantId=" + modelInvariantId + " modelVersion=" + modelVersion + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VRC for: modelInvariantId='" + modelInvariantId + "' modelVersion='" + modelVersion + "' modelCustomizationId='" + modelCustomizationId + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching VRC for modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelInvariantId=" + modelInvariantId + " modelVersion=" + modelVersion + " modelCustomizationId=" + modelCustomizationId);
+ vfModule = null;
+ throw e;
+ }
+
+ if (vfModule == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleByModelCustomizationIdModelVersionAndModelInvariantId", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleByModelCustomizationIdModelVersionAndModelInvariantId", null);
+ }
+ return vfModule;
+ }
+
+ /**
+ * Return the VnfResourceCustomization object identified by the given modelCustomizationName, modelInvariantId and modelVersion 1707
+ *
+ * @param modelInvariantId, modelVersion, modelCustomizationName
+ * @return VnfResourceCustomization or null if not found
+ */
+ public VnfResourceCustomization getVnfResourceCustomizationByModelInvariantId(String modelInvariantId, String modelVersion, String modelCustomizationName) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVnfResourceCustomizationByModelInvariantId with modelInvariantId: " + modelInvariantId + ", modelVersion: "
+ + modelVersion + ", modelCustomizationName: " + modelCustomizationName);
+
+ String hql = "SELECT VnfResourceCustomization FROM VnfResourceCustomization as vrc "
+ + "LEFT OUTER JOIN VnfResource as vr "
+ + "on vr.modelUuid =vrc.vnfResourceModelUuid "
+ + "WHERE vr.modelInvariantUuid = :modelInvariantId AND vr.modelVersion = :modelVersion AND vrc.modelInstanceName = :modelCustomizationName";
+
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelInvariantId", modelInvariantId);
+ query.setParameter("modelVersion", modelVersion);
+ query.setParameter("modelCustomizationName", modelCustomizationName);
+ VnfResourceCustomization vnfResourceCustomization = null;
+ try {
+ vnfResourceCustomization = (VnfResourceCustomization) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row in VRC - data integrity error: modelInvariantId='" + modelInvariantId +"' and modelVersion='" + modelVersion + "' modelCustomizationName='" + modelCustomizationName + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfResourceCustomization modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelInvariantId==" + modelInvariantId+"' and modelVersion='" + modelVersion + "'modelCustomizationName='" + modelCustomizationName + "'");
+ vnfResourceCustomization = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching VRC for: modelInvariantId='" + modelInvariantId +"' and modelVersion='" + modelVersion + "'modelCustomizationName='" + modelCustomizationName + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching VRC for modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelInvariantId=" + modelInvariantId+"' and modelVersion='" + modelVersion + "'modelCustomizationName='" + modelCustomizationName + "'");
+ vnfResourceCustomization = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching VRC for: modelInvariantId='" + modelInvariantId +"' and modelVersion='" + modelVersion + "' " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching VRC for modelInvariantId=" + modelInvariantId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for modelInvariantId=" + modelInvariantId+"' and modelVersion='" + modelVersion + "'modelCustomizationName='" + modelCustomizationName + "'");
+ vnfResourceCustomization = null;
+ throw e;
+ }
+ if (vnfResourceCustomization != null) {
+ LOGGER.debug("Found VRC of " + vnfResourceCustomization.getModelCustomizationUuid() + ", now looking for vnfResource=" + vnfResourceCustomization.getVnfResourceModelUuid() );
+ vnfResourceCustomization.setVnfResource(this.getVnfResourceByModelUuid(vnfResourceCustomization.getVnfResourceModelUUID()));
+ LOGGER.debug("Now looking for vfModules for " + vnfResourceCustomization.getModelCustomizationUuid());
+ vnfResourceCustomization.setVfModuleCustomizations(this.getAllVfModuleCustomizations(vnfResourceCustomization.getModelCustomizationUuid()));
+ }
+
+ if (vnfResourceCustomization == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResourceCustomizationByModelInvariantId", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelInvariantId", null);
+ }
+ return vnfResourceCustomization;
+ }
+
+ /**
+ * Return list of VnfResourceCustomization objects identified by the given modelCustomizationUuid 1707
+ *
+ * @param modelCustomizationUuid
+ * @return List<VfModuleCustomization> or null if not found
+ */
+ public List<VfModuleCustomization> getVfModuleCustomizationByVnfModuleCustomizationUuid(String modelCustomizationUuid) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get getVfModuleCustomizationByVnfModuleCustomizationUuid with modelCustomizationUuid: " + modelCustomizationUuid);
+
+// select * from vf_module_customization as vfmc where vfmc.MODEL_CUSTOMIZATION_UUID IN(
+// select vrcmc.VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID from vnf_res_custom_to_vf_module_custom as vrcmc
+// where vrcmc.VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID = 'd279139c-4b85-48ff-8ac4-9b83a6fc6da7')
+
+ String hql = "SELECT vfmc FROM VfModuleCustomization as vfmc where vfmc.modelCustomizationUuid "
+ + "IN(select vrcmc.vfModuleCustModelCustomizationUuid from VnfResCustomToVfModuleCustom as vrcmc "
+ + "WHERE vrcmc.vnfResourceCustModelCustomizationUuid = :modelCustomizationUuid)";
+
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelCustomizationUuid", modelCustomizationUuid);
+ List<VfModuleCustomization> resultList = null;
+ try {
+ resultList = query.list();
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - getVfModuleCustomizationByVnfModuleCustomizationUuid - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + " " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModuleCustomizationByVnfModuleCustomizationUuid - searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Exception - getVfModuleCustomizationByVnfModuleCustomizationUuid - while searching for: modelCustomizationUuid='" + modelCustomizationUuid + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModuleCustomizationByVnfModuleCustomizationUuid - searching for modelCustomizationUuid=" + modelCustomizationUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for modelCustomizationUuid=" + modelCustomizationUuid);
+ throw e;
+ }
+
+ if (resultList == null) {
+ resultList = new ArrayList<VfModuleCustomization>();
+ }
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleCustomizationByVnfModuleCustomizationUuid", null);
+ return resultList;
+ }
+
+ /**
+ * Return the newest version of a specific VNF resource Customization (queried by modelCustomizationName and modelVersionId).
+ *
+ * @return {@link VnfResourceCustomization} object or null if none found
+ */
+ public VnfResourceCustomization getVnfResourceCustomizationByVnfModelCustomizationNameAndModelVersionId (String modelCustomizationName, String modelVersionId) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get VNF resource Customization with modelCustomizationName " + modelCustomizationName + " modelUUID " + modelVersionId);
+
+ //select vrc.* from vnf_resource_customization vrc where vrc.MODEL_CUSTOMIZATION_UUID IN (select src.RESOURCE_MODEL_CUSTOMIZATION_UUID from service_to_resource_customizations src);
+ String hql = "SELECT vrc FROM VnfResourceCustomization as vrc WHERE vrc.vnfResourceModelUuid IN "
+ + "(SELECT vr.modelUuid FROM VnfResource vr "
+ + "WHERE vr.modelUuid = :modelVersionId)"
+ + "AND vrc.modelInstanceName = :modelCustomizationName";
+
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("modelCustomizationName", modelCustomizationName);
+ query.setParameter ("modelVersionId", modelVersionId);
+
+ @SuppressWarnings("unchecked")
+ List <VnfResourceCustomization> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VnfResourceCustomization not found", "CatalogDB", "getVnfResourceCustomizationByVnfModelCustomizationNameAndModelVersionId", null);
+ return null;
+ }
+
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByVnfModelCustomizationNameAndModelVersionId", null);
+ return resultList.get (0);
+ }
+
+ public ArrayList<VfModuleCustomization> getAllVfModuleCustomizations(String vnfResourceCustomizationMCU) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - getAllVfModuleCustomizations with vnfResourceCustomizationMCU " + vnfResourceCustomizationMCU);
+
+ List<VnfResCustomToVfModuleCustom> matches = this.getVRCtoVFMC(vnfResourceCustomizationMCU, null);
+ if (matches == null || matches.size() < 1) {
+ LOGGER.debug("Found no vf modules for " + vnfResourceCustomizationMCU);
+ return new ArrayList<VfModuleCustomization>();
+ }
+ ArrayList<VfModuleCustomization> list = new ArrayList<VfModuleCustomization>();
+ for (VnfResCustomToVfModuleCustom v : matches) {
+ String m = v.getVfModuleCustModelCustomizationUuid();
+ LOGGER.debug("VfModule to match: " + m);
+ VfModuleCustomization c = this.getVfModuleCustomizationByModelCustomizationId(m);
+ if (c != null) {
+ list.add(c);
+ } else {
+ LOGGER.debug("**UNABLE to find vfModule " + m);
+ }
+ }
+ return list;
+ }
+
+ /**
+ * Return the VnfResourceCustomization object identified by the given modelCustomizationUuid 1707
+ * Note that the corresponding VnfResource Object will be put in the VnfResourceCustomization bean
+ *
+ * @param modelCustomizationUuid
+ * @return VnfResourceCustomization or null if not found
+ */
+ public VnfResource getVnfResourceByModelUuid(String modelUuid) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug ("Catalog database - get VnfResource with modelUuid " + modelUuid);
+
+ String hql = "FROM VnfResource WHERE modelUuid = :modelUuid";
+ Query query = getSession().createQuery(hql);
+ query.setParameter ("modelUuid", modelUuid);
+ VnfResource vnfResource = null;
+ try {
+ vnfResource = (VnfResource) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique Vnf_Resource row - data integrity error: modelUuid='" + modelUuid);
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for Vnf Resource modelUuid=" + modelUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnfResource modelUuid==" + modelUuid);
+ vnfResource = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: VnfResource modelUuid='" + modelUuid + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnfResource ModelUuid=" + modelUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResource modelUuid=" + modelUuid);
+ vnfResource = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: vnfResource ModelUuid='" + modelUuid + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnfResource ModelUuid=" + modelUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnfResource modelUuid=" + modelUuid);
+ vnfResource = null;
+ throw e;
+ }
+ if (vnfResource == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResourceByModelUuid", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceByModelUuid", null);
+ }
+ return vnfResource;
+ }
+
+ public VnfResCustomToVfModuleCustom getVnfResCustomToVfModule(String vnfId, String vfId) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database - getVnfResCustomToVfModule - vnfResourceCustModelCustUuid: " + vnfId + ", vfModuleCustModelCustomUuid=" + vfId);
+ StringBuilder hql = new StringBuilder("FROM VnfResCustomToVfModuleCustom where vnfResourceCustModelCustomizationUuid = :vnfIdValue and vfModuleCustModelCustomizationUuid = :vfIdValue");
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("vnfIdValue", vnfId);
+ parameters.put("vfIdValue", vfId);
+ VnfResCustomToVfModuleCustom vrctvmc = this.executeQuerySingleRow(hql.toString(), parameters, true);
+ if (vrctvmc == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResCustomToVfModule", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResCustomToVfModule", null);
+ }
+ return vrctvmc;
}
public List<VfModule> getVfModulesForVnfResource(VnfResource vnfResource) {
if (vnfResource == null)
return null;
- int vnfResourceId = vnfResource.getId();
+ String vnfResourceModelUuid = vnfResource.getModelUuid();
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - getVfModulesForVnfResource - vnfResource: " + vnfResource.toString());
- return this.getVfModulesForVnfResource(vnfResourceId);
+ return this.getVfModulesForVnfResource(vnfResourceModelUuid);
}
- public List<VfModule> getVfModulesForVnfResource(int vnfResourceId) {
+ public List<VfModule> getVfModulesForVnfResource(String vnfResourceModelUuid) {
long startTime = System.currentTimeMillis();
- LOGGER.debug("Catalog database - getVfModulesForVnfResource - vnfResourceId: " + vnfResourceId);
- StringBuilder hql = new StringBuilder("FROM VfModule where vnfResourceId = :vnfResourceId");
+ LOGGER.debug("Catalog database - getVfModulesForVnfResource - vnfResourceModelUuid: " + vnfResourceModelUuid);
+ StringBuilder hql = new StringBuilder("FROM VfModule where vnfResourceModelUUId = :vnfResourceModelUUId");
Query query = getSession().createQuery(hql.toString());
- query.setParameter("vnfResourceId", vnfResourceId);
+ query.setParameter("vnfResourceModelUUId", vnfResourceModelUuid);
List<VfModule> resultList = null;
try {
resultList = query.list();
@@ -1190,11 +1973,13 @@ public class CatalogDatabase implements Closeable {
else
LOGGER.debug("\tQuery found no records.");
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - getVfModulesForVnfResource - while searching for: vnfResourceId='" + vnfResourceId + " " + he.getMessage());
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModulesForVnfResource - searching for vnfResourceId=" + vnfResourceId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResourceId=" + vnfResourceId);
+ LOGGER.debug("Hibernate Exception - getVfModulesForVnfResource - while searching for: vnfResourceModelUUId='" + vnfResourceModelUuid + " " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModulesForVnfResource - searching for vnfResourceModelUUId=" + vnfResourceModelUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResourceModelUUId=" + vnfResourceModelUuid);
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Exception - getVfModulesForVnfResource - while searching for: vnfResourceId='" + vnfResourceId + " " + e.getMessage());
- LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModulesForVnfResource - searching for vnfResourceId=" + vnfResourceId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResourceId=" + vnfResourceId);
+ LOGGER.debug("Exception - getVfModulesForVnfResource - while searching for: vnfResourceModelUUId='" + vnfResourceModelUuid + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception - getVfModulesForVnfResource - searching for vnfResourceModelUUId=" + vnfResourceModelUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfResourceModelUUId=" + vnfResourceModelUuid);
+ throw e;
}
if (resultList == null) {
resultList = new ArrayList<VfModule>();
@@ -1218,15 +2003,15 @@ public class CatalogDatabase implements Closeable {
} catch (org.hibernate.NonUniqueResultException nure) {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceModelInvariantUuid='" + serviceModelInvariantUuid + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceModelInvariantUuid=" + serviceModelInvariantUuid);
- return null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceModelInvariantUuid + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceModelInvariantUuid + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid);
- return null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid);
+ LOGGER.debug("Generic Exception - while searching for: serviceModelInvariantUuid='" + serviceModelInvariantUuid + " " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceModelInvariantUuid=" + serviceModelInvariantUuid);
- return null;
+ throw e;
}
if (service == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
@@ -1251,15 +2036,15 @@ public class CatalogDatabase implements Closeable {
} catch (org.hibernate.NonUniqueResultException nure) {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: NETWORK_RESOURCE.id='" + id + "'");
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for NETWORK_RESOURCE.id=" + id, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for NETWORK_RESOURCE.id=" + id);
- return null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: NETWORK_RESOURCE.id='" + id + "'");
+ LOGGER.debug("Hibernate Exception - while searching for: NETWORK_RESOURCE.id='" + id + "' " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for NETWORK_RESOURCE.id=" + id, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for NETWORK_RESOURCE.id=" + id);
- return null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: NETWORK_RESOURCE.id='" + id);
+ LOGGER.debug("Generic Exception - while searching for: NETWORK_RESOURCE.id='" + id + " " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for NETWORK_RESOURCE.id=" + id, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for NETWORK_RESOURCE.id=" + id);
- return null;
+ throw e;
}
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceById", null);
@@ -1267,27 +2052,156 @@ public class CatalogDatabase implements Closeable {
}
+ public NetworkResource getNetworkResourceById(String id) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getNetworkResource with model_uuid " + id);
+
+ String hql = "FROM NetworkResource WHERE modelUUID = :model_uuid";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("model_uuid", id);
+
+ List<NetworkResource> networkResources = null;
+ try {
+ networkResources = query.list ();
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: NETWORK_RESOURCE.id='" + id + "' " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for NETWORK_RESOURCE.model_uuid=" + id, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for NETWORK_RESOURCE.model_uuid=" + id);
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: NETWORK_RESOURCE.id='" + id + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for NETWORK_RESOURCE.model_uuid=" + id, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for NETWORK_RESOURCE.model_uuid=" + id);
+ throw e;
+ }
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceById", null);
+ if (networkResources == null || networkResources.isEmpty())
+ return null;
+ else
+ return networkResources.get(0);
+ }
+
+ // 1707 API Spec
+
+ public static boolean isEmptyOrNull(String str) {
+ if (str == null)
+ return true;
+ if (str.equals("null"))
+ return true;
+ if (str.equals(""))
+ return true;
+ return false;
+ }
+
+ public List<ServiceToResourceCustomization> getSTR(String serviceModelUuid, String resourceModelCustomizationUuid, String modelType) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database: getSTR - smu=" + serviceModelUuid + ", rmcu=" + resourceModelCustomizationUuid + ", modelType = " + modelType);
+
+ if (isEmptyOrNull(serviceModelUuid) && isEmptyOrNull(resourceModelCustomizationUuid) && isEmptyOrNull(modelType))
+ return null;
+
+ StringBuilder hql = new StringBuilder("FROM ServiceToResourceCustomization WHERE ");
+ boolean first = true;
+ if (serviceModelUuid != null && !serviceModelUuid.equals("")) {
+ hql.append("serviceModelUUID = :smu");
+ first = false;
+ }
+ if (resourceModelCustomizationUuid != null && !resourceModelCustomizationUuid.equals("")) {
+ if (!first) {
+ hql.append(" AND ");
+ }
+ hql.append("resourceModelCustomizationUUID = :rmcu");
+ first = false;
+ }
+ if (modelType != null && !modelType.equals("")) {
+ if (!first) {
+ hql.append(" AND ");
+ first = false;
+ }
+ hql.append("modelType = :modelType");
+ first = false;
+ }
+ Query query = getSession().createQuery(hql.toString());
+ if (hql.toString().contains(":smu"))
+ query.setParameter("smu", serviceModelUuid);
+ if (hql.toString().contains(":rmcu"))
+ query.setParameter("rmcu", resourceModelCustomizationUuid);
+ if (hql.toString().contains(":modelType"))
+ query.setParameter("modelType", modelType);
+ LOGGER.debug("query - " + hql.toString());
+
+ @SuppressWarnings("unchecked")
+ List<ServiceToResourceCustomization> resultList = query.list();
+ if (resultList == null || resultList.size() < 1) {
+ LOGGER.debug("Found no matches to the query - " + hql.toString());
+ return new ArrayList<ServiceToResourceCustomization>();
+ }
+ return resultList;
+ }
+
+ public List<VnfResCustomToVfModuleCustom> getVRCtoVFMC (String vrc_mcu, String vfmc_mcu) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database: getVRCtoVFMC - vrc_mcu=" + vrc_mcu + ", vfmc_mcu=" + vfmc_mcu);
+
+ if (isEmptyOrNull(vrc_mcu) && isEmptyOrNull(vfmc_mcu))
+ return null;
+
+ StringBuilder hql = new StringBuilder("FROM VnfResCustomToVfModuleCustom WHERE ");
+ boolean first = true;
+ if (vrc_mcu != null && !vrc_mcu.equals("")) {
+ hql.append("vnfResourceCustModelCustomizationUuid = :vrc_mcu");
+ first = false;
+ }
+ if (vfmc_mcu != null && !vfmc_mcu.equals("")) {
+ if (!first) {
+ hql.append(" AND ");
+ }
+ hql.append("vfModuleCustModelCustomizationUuid = :vfmc_mcu");
+ first = false;
+ }
+ Query query = getSession().createQuery(hql.toString());
+ if (hql.toString().contains(":vrc_mcu"))
+ query.setParameter("vrc_mcu", vrc_mcu);
+ if (hql.toString().contains(":vfmc_mcu"))
+ query.setParameter("vfmc_mcu", vfmc_mcu);
+ @SuppressWarnings("unchecked")
+ List<VnfResCustomToVfModuleCustom> resultList = query.list();
+ if (resultList == null || resultList.size() < 1) {
+ LOGGER.debug("Found no matches to the query - " + hql.toString());
+ return new ArrayList<VnfResCustomToVfModuleCustom>();
+ }
+ return resultList;
+ }
+
+ @SuppressWarnings("unchecked")
+ public List <TempNetworkHeatTemplateLookup> getTempNetworkHeatTemplateLookup (String networkResourceModelName) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - GetTempNetworkHeatTemplateLookup for Network Name " + networkResourceModelName);
+
+ String hql = "FROM TempNetworkHeatTemplateLookup where networkResourceModelName = :networkResourceModelName";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("networkResourceModelName", networkResourceModelName);
+
+ List <TempNetworkHeatTemplateLookup> result = query.list ();
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getTempNetworkHeatTemplateLookup", null);
+ return result;
+ }
+
// 1702 API Spec - Query for all networks in a Service:
public List<NetworkResourceCustomization> getAllNetworksByServiceModelUuid(String serviceModelUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getServiceNetworksByServiceModelUuid - " + serviceModelUuid);
- // This is a 2-step process (3 really) - 1) query ServiceToNetworks, 2) query NetworkResourceCustomization, 3) populate the networkType
-
- StringBuilder hql1 = new StringBuilder("FROM ServiceToNetworks WHERE serviceModelUuid = :serviceModelUuid");
- Query query = getSession().createQuery(hql1.toString());
- query.setParameter("serviceModelUuid", serviceModelUuid);
- @SuppressWarnings("unchecked")
- List<ServiceToNetworks> resultList1 = query.list();
- if (resultList1 == null || resultList1.size() < 1) {
- LOGGER.debug("Found no matches to the query - FROM ServiceToNetworks WHERE serviceModelUuid = " + serviceModelUuid);
+ List<ServiceToResourceCustomization> strMappings = this.getSTR(serviceModelUuid, null, "network");
+ if (strMappings == null || strMappings.size() < 1) {
+ LOGGER.debug("Found NO matches for NRC with ServiceModelUuid=" + serviceModelUuid);
return new ArrayList<NetworkResourceCustomization>();
}
- LOGGER.debug("Found " + resultList1.size() + " entries in ServiceToNetworks with smu=" + serviceModelUuid);
+ LOGGER.debug("Found " + strMappings.size() + " entries in ServiceToResourceCustomizations.network with smu=" + serviceModelUuid);
ArrayList<NetworkResourceCustomization> masterList = new ArrayList<NetworkResourceCustomization>();
- for (ServiceToNetworks stn : resultList1) {
- String networkModelCustomizationUuid = stn.getNetworkModelCustomizationUuid();
+ for (ServiceToResourceCustomization stn : strMappings) {
+ String networkModelCustomizationUuid = stn.getResourceModelCustomizationUUID();
LOGGER.debug("Now searching for NetworkResourceCustomization for " + networkModelCustomizationUuid);
List<NetworkResourceCustomization> resultSet = this.getAllNetworksByNetworkModelCustomizationUuid(networkModelCustomizationUuid);
for (NetworkResourceCustomization nrc : resultSet) {
@@ -1297,7 +2211,6 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Returning " + masterList.size() + " NRC records");
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllNetworksByServiceModelUuid", null);
return masterList;
-
}
public List<NetworkResourceCustomization> getAllNetworksByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
long startTime = System.currentTimeMillis();
@@ -1318,7 +2231,7 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (serviceList);
Service service = serviceList.get(0);
- String serviceNameVersionId = service.getServiceNameVersionId();
+ String serviceNameVersionId = service.getModelUUID();
LOGGER.debug("The highest version for the Service " + serviceModelInvariantUuid + " is " + serviceNameVersionId);
// Service.serviceNameVersionId == ServiceToNetworks.serviceModelUuid
@@ -1347,7 +2260,7 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (serviceList);
Service service = serviceList.get(0);
- String serviceNameVersionId = service.getServiceNameVersionId();
+ String serviceNameVersionId = service.getModelUUID();
// Service.serviceNameVersionId == ServiceToNetworks.serviceModelUuid
return this.getAllNetworksByServiceModelUuid(serviceNameVersionId);
@@ -1358,17 +2271,32 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database: getAllNetworksByNetworkModelCustomizationUuid - " + networkModelCustomizationUuid);
StringBuilder hql = new StringBuilder("FROM NetworkResourceCustomization WHERE modelCustomizationUuid = :networkModelCustomizationUuid");
- Query query = getSession().createQuery(hql.toString());
- query.setParameter("networkModelCustomizationUuid", networkModelCustomizationUuid);
+ //Query query = getSession().createQuery(hql.toString());
+ //query.setParameter("networkModelCustomizationUuid", networkModelCustomizationUuid);
+ //LOGGER.debug("QUERY: " + hql.toString() + ", networkModelCustomizationUuid=" + networkModelCustomizationUuid);
+
+ //@SuppressWarnings("unchecked")
+ //List<NetworkResourceCustomization> resultList = query.list();
+
+ HashMap<String, String> params = new HashMap<String, String>();
+ params.put("networkModelCustomizationUuid", networkModelCustomizationUuid);
+
+ List<NetworkResourceCustomization> resultList = this.executeQueryMultipleRows(hql.toString(), params, true);
- @SuppressWarnings("unchecked")
- List<NetworkResourceCustomization> resultList = query.list();
-
- this.populateNetworkResourceType(resultList);
+ if (resultList.isEmpty()) {
+ LOGGER.debug("Unable to find an NMC with nmcu=" + networkModelCustomizationUuid);
+ return new ArrayList<NetworkResourceCustomization>();
+ }
+ for (NetworkResourceCustomization nrc : resultList) {
+ nrc.setNetworkResource(this.getNetworkResourceById(nrc.getNetworkResourceModelUuid()));
+ }
+
+ //this.populateNetworkResourceType(resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllNetworksByNetworkModelCustomizationUuid", null);
return resultList;
}
+
public List<NetworkResourceCustomization> getAllNetworksByNetworkType(String networkType) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getServiceNetworksByNetworkType - " + networkType);
@@ -1377,10 +2305,10 @@ public class CatalogDatabase implements Closeable {
if (nr == null) {
return new ArrayList<NetworkResourceCustomization>();
}
- Integer networkResourceId = nr.getId();
+ String networkResourceId = nr.getModelUUID();
LOGGER.debug("Now searching for NRC's with networkResourceId = " + networkResourceId);
- StringBuilder hql = new StringBuilder("FROM NetworkResourceCustomization WHERE networkResourceId = :networkResourceId");
+ StringBuilder hql = new StringBuilder("FROM NetworkResourceCustomization WHERE networkResourceModelUuid = :networkResourceId");
Query query = getSession().createQuery(hql.toString());
query.setParameter("networkResourceId", networkResourceId);
@@ -1399,33 +2327,65 @@ public class CatalogDatabase implements Closeable {
return resultList;
}
+ public ArrayList<VfModuleCustomization> getAllVfmcForVrc(VnfResourceCustomization vrc) {
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database: getAllVfmcForVrc - " + vrc.getModelCustomizationUuid());
+
+ List<VnfResCustomToVfModuleCustom> vfmcs = this.getVRCtoVFMC(vrc.getModelCustomizationUuid(), null);
+ if (vfmcs == null || vfmcs.size() < 1) {
+ return null;
+ }
+ ArrayList<VfModuleCustomization> vfModuleCusts = new ArrayList<VfModuleCustomization>();
+ for (VnfResCustomToVfModuleCustom vfmc : vfmcs) {
+ VfModuleCustomization vfmcust = this.getVfModuleCustomizationByModelCustomizationId(vfmc.getVfModuleCustModelCustomizationUuid());
+ if (vfmcust != null) {
+ vfModuleCusts.add(vfmcust);
+ }
+ }
+ return vfModuleCusts;
+ }
//1702 API Spec cont'd - Query for all VnfResources in a Service:
- public List<VnfResource> getAllVnfsByServiceModelUuid(String serviceModelUuid) {
+ //1707 modified for db refactoring
+ public List<VnfResourceCustomization> getAllVnfsByServiceModelUuid(String serviceModelUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceModelUuid - " + serviceModelUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE serviceNameVersionId = :serviceModelUuid");
+ StringBuilder hql = new StringBuilder("FROM Service WHERE modelUUID = :serviceModelUuid");
Query query = getSession().createQuery(hql.toString());
query.setParameter("serviceModelUuid", serviceModelUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
if (serviceList.isEmpty()) {
- return new ArrayList<VnfResource>();
+ LOGGER.debug("Unable to find a service with modelUuid=" + serviceModelUuid);
+ return new ArrayList<VnfResourceCustomization>();
}
Collections.sort (serviceList, new MavenLikeVersioningComparator ());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
- String serviceModelInvariantUuid = service.getModelInvariantUUID();
- String serviceModelVersion = service.getVersion();
+ // Step 2 - Now query to get the related VnfResourceCustomizations
- return this.getAllVnfsByServiceModelInvariantUuid(serviceModelInvariantUuid, serviceModelVersion);
+ List<ServiceToResourceCustomization> strcs = this.getSTR(serviceModelUuid, null, "vnf");
+ if (strcs.isEmpty()) {
+ LOGGER.debug("Unable to find any related vnfs to a service with modelUuid=" + serviceModelUuid);
+ return new ArrayList<VnfResourceCustomization>();
}
- public List<VnfResource> getAllVnfsByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
+
+ ArrayList<VnfResourceCustomization> allVrcs = new ArrayList<VnfResourceCustomization>();
+ for (ServiceToResourceCustomization strc : strcs) {
+ LOGGER.debug("Try to find VRC for mcu=" + strc.getResourceModelCustomizationUUID());
+ VnfResourceCustomization vrc = this.getVnfResourceCustomizationByModelCustomizationUuid(strc.getResourceModelCustomizationUUID());
+ if (vrc != null)
+ allVrcs.add(vrc);
+ }
+ return allVrcs;
+
+ }
+ public List<VnfResourceCustomization> getAllVnfsByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceModelInvariantUuid - " + serviceModelInvariantUuid);
@@ -1436,50 +2396,44 @@ public class CatalogDatabase implements Closeable {
List<Service> resultList = query.list();
if (resultList.isEmpty()) {
- return new ArrayList<VnfResource>();
+ return new ArrayList<VnfResourceCustomization>();
}
Collections.sort (resultList, new MavenLikeVersioningComparator ());
Collections.reverse (resultList);
Service service = resultList.get(0);
//now just call the method that takes the version - the service object will have the highest version
- return this.getAllVnfsByServiceModelInvariantUuid(serviceModelInvariantUuid, service.getVersion());
+ return this.getAllVnfsByServiceModelUuid(service.getModelUUID());
}
- public List<VnfResource> getAllVnfsByServiceModelInvariantUuid(String serviceModelInvariantUuid, String serviceModelVersion) {
+ public List<VnfResourceCustomization> getAllVnfsByServiceModelInvariantUuid(String serviceModelInvariantUuid, String serviceModelVersion) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceModelInvariantUuid - " + serviceModelInvariantUuid + ", version=" + serviceModelVersion);
- StringBuilder hql = new StringBuilder("FROM VnfResource WHERE serviceModelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
+ StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
Query query = getSession().createQuery(hql.toString());
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
@SuppressWarnings("unchecked")
- List<VnfResource> resultList = query.list();
+ List<Service> resultList = query.list();
if (resultList.isEmpty()) {
- return new ArrayList<VnfResource>();
- }
- // so we have a list of VnfResource objects - but we need to add each one's VfModule objects
- for (VnfResource vnfResource : resultList) {
- List<VfModule> vfModules = this.getVfModulesForVnfResource(vnfResource);
- if (vfModules != null && !vfModules.isEmpty()) {
- for (VfModule vfm : vfModules) {
- vnfResource.addVfModule(vfm);
+ return new ArrayList<VnfResourceCustomization>();
}
- }
- }
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+ Service service = resultList.get(0);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfsByServiceModelInvariantUuid", null);
- return resultList;
+ return this.getAllVnfsByServiceModelUuid(service.getModelUUID());
+ }
- }
- public List<VnfResource> getAllVnfsByServiceName(String serviceName, String serviceVersion) {
+ public List<VnfResourceCustomization> getAllVnfsByServiceName(String serviceName, String serviceVersion) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceName - " + serviceName + ", version=" + serviceVersion);
if (serviceVersion == null || serviceVersion.equals("")) {
return this.getAllVnfsByServiceName(serviceName);
}
- StringBuilder hql = new StringBuilder("FROM Service WHERE serviceName = :serviceName and version = :serviceVersion");
+ StringBuilder hql = new StringBuilder("FROM Service WHERE modelName = :serviceName and version = :serviceVersion");
Query query = getSession().createQuery(hql.toString());
query.setParameter("serviceName", serviceName);
query.setParameter("serviceVersion", serviceVersion);
@@ -1490,16 +2444,14 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return null;
}
-
Service service = resultList.get(0);
-
- return this.getAllVnfsByServiceModelInvariantUuid(service.getModelInvariantUUID(), service.getVersion());
+ return this.getAllVnfsByServiceModelUuid(service.getModelUUID());
}
- public List<VnfResource> getAllVnfsByServiceName(String serviceName) {
+ public List<VnfResourceCustomization> getAllVnfsByServiceName(String serviceName) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceName - " + serviceName);
- StringBuilder hql = new StringBuilder("FROM Service WHERE serviceName = :serviceName");
+ StringBuilder hql = new StringBuilder("FROM Service WHERE modelName = :serviceName");
Query query = getSession().createQuery(hql.toString());
query.setParameter("serviceName", serviceName);
@@ -1513,37 +2465,33 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (resultList);
Service service = resultList.get(0);
- return this.getAllVnfsByServiceModelInvariantUuid(service.getModelInvariantUUID(), service.getVersion());
+ return this.getAllVnfsByServiceModelUuid(service.getModelUUID());
}
- public List<VnfResource> getAllVnfsByVnfModelCustomizationUuid(String vnfModelCustomizationUuid) {
+
+ public List<VnfResourceCustomization> getAllVnfsByVnfModelCustomizationUuid(String vnfModelCustomizationUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByVnfModelCustomizationUuid - " + vnfModelCustomizationUuid);
- StringBuilder hql = new StringBuilder("FROM VnfResource WHERE modelCustomizationUuid = :vnfModelCustomizationUuid");
- Query query = getSession().createQuery(hql.toString());
- query.setParameter("vnfModelCustomizationUuid", vnfModelCustomizationUuid);
-
+ StringBuilder hql1 = new StringBuilder("FROM VnfResourceCustomization WHERE modelCustomizationUuid = :vrcmcu");
+ Query query1 = getSession().createQuery(hql1.toString());
+ query1.setParameter("vrcmcu", vnfModelCustomizationUuid);
@SuppressWarnings("unchecked")
- List<VnfResource> resultList = query.list();
+ List<VnfResourceCustomization> resultList1 = query1.list();
- if (resultList.isEmpty()) {
+ if (resultList1.isEmpty()) {
LOGGER.debug("Found no records matching " + vnfModelCustomizationUuid);
return null;
}
- // so we have a list of VnfResource objects - but we need to add each one's VfModule objects
- for (VnfResource vnfResource : resultList) {
- LOGGER.debug("Finding vfModules for vnfResource.id=" + vnfResource.getId());
- List<VfModule> vfModules = this.getVfModulesForVnfResource(vnfResource);
- if (vfModules != null && !vfModules.isEmpty()) {
- LOGGER.debug("\tFound " + vfModules.size() + " vf modules");
- for (VfModule vfm : vfModules) {
- vnfResource.addVfModule(vfm);
+
+ for (VnfResourceCustomization vrc : resultList1) {
+ VnfResource vr = this.getVnfResourceByModelUuid(vrc.getVnfResourceModelUuid());
+ vrc.setVnfResource(vr);
+ vrc.setVfModuleCustomizations(this.getAllVfmcForVrc(vrc));
}
- }
- }
- LOGGER.debug("Returning " + resultList + " vnf modules");
+
+ LOGGER.debug("Returning " + resultList1.size() + " vnf modules");
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfsByVnfModelCustomizationUuid", null);
- return resultList;
+ return resultList1;
}
//1702 API Spec cont'd - Query for all allotted resources in a Service
@@ -1552,22 +2500,16 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllAllottedResourcesByServiceModelUuid - " + serviceModelUuid);
- // This is a 2-step process (3 really) - 1) query ServiceToAllottedResources, 2) query AllottedResourceCustomization
-
- StringBuilder hql1 = new StringBuilder("FROM ServiceToAllottedResources WHERE serviceModelUuid = :serviceModelUuid");
- Query query = getSession().createQuery(hql1.toString());
- query.setParameter("serviceModelUuid", serviceModelUuid);
- @SuppressWarnings("unchecked")
- List<ServiceToAllottedResources> resultList1 = query.list();
- if (resultList1 == null || resultList1.size() < 1) {
- LOGGER.debug("Found no matches to the query " + hql1.toString());
+ List<ServiceToResourceCustomization> strcs = this.getSTR(serviceModelUuid, null, "allottedResource");
+ if (strcs == null || strcs.size() < 1) {
+ LOGGER.debug("No AR entries found for " + serviceModelUuid);
return new ArrayList<AllottedResourceCustomization>();
}
- LOGGER.debug("Found " + resultList1.size() + " entries in ServiceToAllottedResources with smu=" + serviceModelUuid);
+ LOGGER.debug("Found " + strcs.size() + " entries in ServiceToResourceCustomizations with smu=" + serviceModelUuid + ", allottedResource");
ArrayList<AllottedResourceCustomization> masterList = new ArrayList<AllottedResourceCustomization>();
- for (ServiceToAllottedResources star : resultList1) {
- String arModelCustomizationUuid = star.getArModelCustomizationUuid();
+ for (ServiceToResourceCustomization star : strcs) {
+ String arModelCustomizationUuid = star.getResourceModelCustomizationUUID();
LOGGER.debug("Now searching for AllottedResourceCustomization for " + arModelCustomizationUuid);
List<AllottedResourceCustomization> resultSet = this.getAllAllottedResourcesByArModelCustomizationUuid(arModelCustomizationUuid);
for (AllottedResourceCustomization arc : resultSet) {
@@ -1598,11 +2540,10 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (serviceList);
Service service = serviceList.get(0);
- String serviceNameVersionId = service.getServiceNameVersionId();
- LOGGER.debug("The highest version for the Service " + serviceModelInvariantUuid + " is " + serviceNameVersionId);
+ String serviceModelUuid = service.getModelUUID();
+ LOGGER.debug("The highest version for the Service " + serviceModelInvariantUuid + " is " + serviceModelUuid);
- // Service.serviceNameVersionId == ServiceToAllottedResources.serviceModelUuid
- return this.getAllAllottedResourcesByServiceModelUuid(serviceNameVersionId);
+ return this.getAllAllottedResourcesByServiceModelUuid(serviceModelUuid);
}
public List<AllottedResourceCustomization> getAllAllottedResourcesByServiceModelInvariantUuid(String serviceModelInvariantUuid, String serviceModelVersion) {
@@ -1614,8 +2555,6 @@ public class CatalogDatabase implements Closeable {
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
- //TODO
- //can fix this later - no time - could do a unique query here - but this should work
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -1628,10 +2567,9 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (serviceList);
Service service = serviceList.get(0);
- String serviceNameVersionId = service.getServiceNameVersionId();
+ String serviceModelUuid = service.getModelUUID();
- // Service.serviceNameVersionId == ServiceToNetworks.serviceModelUuid
- return this.getAllAllottedResourcesByServiceModelUuid(serviceNameVersionId);
+ return this.getAllAllottedResourcesByServiceModelUuid(serviceModelUuid);
}
public List<AllottedResourceCustomization> getAllAllottedResourcesByArModelCustomizationUuid(String arModelCustomizationUuid) {
@@ -1645,18 +2583,50 @@ public class CatalogDatabase implements Closeable {
@SuppressWarnings("unchecked")
List<AllottedResourceCustomization> resultList = query.list();
+ if (resultList.isEmpty()) {
+ LOGGER.debug("No ARC found with arc_mcu=" + arModelCustomizationUuid);
+ return new ArrayList<AllottedResourceCustomization>();
+ }
+ // There should only be one - but we'll handle if multiple
+ for (AllottedResourceCustomization arc : resultList) {
+ AllottedResource ar = this.getAllottedResourceByModelUuid(arc.getArModelUuid());
+ arc.setAllottedResource(ar);
+ }
+
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllAllottedResourcesByArModelCustomizationUuid", null);
return resultList;
}
+ public AllottedResource getAllottedResourceByModelUuid(String arModelUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Allotted Resource with modelUuid= " + arModelUuid);
+
+ String hql = "FROM AllottedResource WHERE modelUuid = :arModelUuid";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("arModelUuid", arModelUuid);
+
+ @SuppressWarnings("unchecked")
+ List <AllottedResource> resultList = query.list ();
+
+ // See if something came back. Name is unique, so
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. AllottedResource not found", "CatalogDB", "getAllottedResourceByModelUuid", null);
+ return null;
+ }
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllottedResourceByModelUuid", null);
+ return resultList.get (0);
+
+ }
+
//1702 API Spec cont'd - Query for all resources in a Service:
public ServiceMacroHolder getAllResourcesByServiceModelUuid(String serviceModelUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllResourcesByServiceModelUuid - " + serviceModelUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE serviceNameVersionId = :serviceModelUuid");
+ StringBuilder hql = new StringBuilder("FROM Service WHERE modelUUID = :serviceModelUuid");
Query query = getSession().createQuery(hql.toString());
query.setParameter("serviceModelUuid", serviceModelUuid);
+ LOGGER.debug("Query: " + hql.toString() + ", smu=" + serviceModelUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -1674,8 +2644,8 @@ public class CatalogDatabase implements Closeable {
smh.setNetworkResourceCustomization(nrcList);
ArrayList<AllottedResourceCustomization> arcList = (ArrayList<AllottedResourceCustomization>) this.getAllAllottedResourcesByServiceModelUuid(serviceModelUuid);
smh.setAllottedResourceCustomization(arcList);
- ArrayList<VnfResource> vnfList = (ArrayList<VnfResource>) this.getAllVnfsByServiceModelInvariantUuid(service.getModelInvariantUUID(), service.getVersion());
- smh.setVnfResources(vnfList);
+ ArrayList<VnfResourceCustomization> vnfList = (ArrayList<VnfResourceCustomization>) this.getAllVnfsByServiceModelUuid(serviceModelUuid);
+ smh.setVnfResourceCustomizations(vnfList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllResourcesByServiceModelUuid", null);
return smh;
@@ -1700,12 +2670,12 @@ public class CatalogDatabase implements Closeable {
Service service = serviceList.get(0);
ServiceMacroHolder smh = new ServiceMacroHolder(service);
- ArrayList<NetworkResourceCustomization> nrcList = (ArrayList<NetworkResourceCustomization>) this.getAllNetworksByServiceModelUuid(service.getServiceNameVersionId());
+ ArrayList<NetworkResourceCustomization> nrcList = (ArrayList<NetworkResourceCustomization>) this.getAllNetworksByServiceModelUuid(service.getModelUUID());
smh.setNetworkResourceCustomization(nrcList);
- ArrayList<AllottedResourceCustomization> arcList = (ArrayList<AllottedResourceCustomization>) this.getAllAllottedResourcesByServiceModelUuid(service.getServiceNameVersionId());
+ ArrayList<AllottedResourceCustomization> arcList = (ArrayList<AllottedResourceCustomization>) this.getAllAllottedResourcesByServiceModelUuid(service.getModelUUID());
smh.setAllottedResourceCustomization(arcList);
- ArrayList<VnfResource> vnfList = (ArrayList<VnfResource>) this.getAllVnfsByServiceModelInvariantUuid(service.getModelInvariantUUID(), service.getVersion());
- smh.setVnfResources(vnfList);
+ ArrayList<VnfResourceCustomization> vnfList = (ArrayList<VnfResourceCustomization>) this.getAllVnfsByServiceModelUuid(service.getModelUUID());
+ smh.setVnfResourceCustomizations(vnfList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllResourcesByServiceModelInvariantUuid", null);
return smh;
@@ -1733,12 +2703,12 @@ public class CatalogDatabase implements Closeable {
Service service = serviceList.get(0);
ServiceMacroHolder smh = new ServiceMacroHolder(service);
- ArrayList<NetworkResourceCustomization> nrcList = (ArrayList<NetworkResourceCustomization>) this.getAllNetworksByServiceModelUuid(service.getServiceNameVersionId());
+ ArrayList<NetworkResourceCustomization> nrcList = (ArrayList<NetworkResourceCustomization>) this.getAllNetworksByServiceModelUuid(service.getModelUUID());
smh.setNetworkResourceCustomization(nrcList);
- ArrayList<AllottedResourceCustomization> arcList = (ArrayList<AllottedResourceCustomization>) this.getAllAllottedResourcesByServiceModelUuid(service.getServiceNameVersionId());
+ ArrayList<AllottedResourceCustomization> arcList = (ArrayList<AllottedResourceCustomization>) this.getAllAllottedResourcesByServiceModelUuid(service.getModelUUID());
smh.setAllottedResourceCustomization(arcList);
- ArrayList<VnfResource> vnfList = (ArrayList<VnfResource>) this.getAllVnfsByServiceModelInvariantUuid(service.getModelInvariantUUID(), service.getVersion());
- smh.setVnfResources(vnfList);
+ ArrayList<VnfResourceCustomization> vnfList = (ArrayList<VnfResourceCustomization>) this.getAllVnfsByServiceModelUuid(service.getModelUUID());
+ smh.setVnfResourceCustomizations(vnfList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllResourcesByServiceModelUuid with version", null);
return smh;
@@ -1763,7 +2733,9 @@ public class CatalogDatabase implements Closeable {
}
return resultList.get(0);
}
+ @Deprecated
public VnfResource getSingleVnfResourceByModelCustomizationUuid(String modelCustomizationUuid) {
+ /*
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database; getSingleVnfResourceByModelCustomizationUuid - " + modelCustomizationUuid);
List<VnfResource> resultList = this.getAllVnfsByVnfModelCustomizationUuid(modelCustomizationUuid);
@@ -1771,13 +2743,16 @@ public class CatalogDatabase implements Closeable {
return null;
}
return resultList.get(0);
+ */
+ return null;
}
private void populateNetworkResourceType(List<NetworkResourceCustomization> resultList) {
- HashMap<Integer, NetworkResource> networkResources = new HashMap<Integer, NetworkResource>();
+ HashMap<String, NetworkResource> networkResources = new HashMap<String, NetworkResource>();
for (NetworkResourceCustomization nrc : resultList) {
- Integer network_id = nrc.getNetworkResourceId();
+ //Integer network_id = nrc.getNetworkResourceId();
+ String network_id = nrc.getNetworkResourceModelUuid();
if (network_id == null) {
nrc.setNetworkResource(null);
nrc.setNetworkType("UNKNOWN_NETWORK_ID_NULL");
@@ -1785,13 +2760,13 @@ public class CatalogDatabase implements Closeable {
}
if (networkResources.containsKey(network_id)) {
nrc.setNetworkResource(networkResources.get(network_id));
- nrc.setNetworkType(networkResources.get(network_id).getNetworkType());
+ nrc.setNetworkType(networkResources.get(network_id).getModelName());
} else {
NetworkResource nr = this.getNetworkResourceById(network_id);
if (nr == null) {
nrc.setNetworkType("INVALID_NETWORK_TYPE_ID_NOT_FOUND");
} else {
- nrc.setNetworkType(nr.getNetworkType());
+ nrc.setNetworkType(nr.getModelName());
nrc.setNetworkResource(nr);
networkResources.put(network_id, nr);
}
@@ -1833,8 +2808,7 @@ public class CatalogDatabase implements Closeable {
VfModule vfMod = resultList.get(0);
- int id = vfMod.getId();
- String vfModuleId = Integer.toString(id);
+ String vfModuleId = vfMod.getModelUUID();
StringBuilder hql1 = new StringBuilder ("FROM VnfRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
@@ -1843,7 +2817,7 @@ public class CatalogDatabase implements Closeable {
+ action);
Query query1 = getSession ().createQuery (hql1.toString ());
- query1.setParameter (VF_MODULE_ID, vfModuleId);
+ query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
@SuppressWarnings("unchecked")
@@ -1899,9 +2873,10 @@ public class CatalogDatabase implements Closeable {
return resultList;
}
+
/**
* Return a VNF COMPONENTSrecipe that matches a given VNF_TYPE, VF_MODULE_MODEL_NAME,
- * ASDC_SERVICE_MODEL_VERSION, MODEL_VERSION, and ACTION
+ * MODEL_CUSTOMIZATION_UUID, ASDC_SERVICE_MODEL_VERSION, MODEL_VERSION, and ACTION
* first query VF_MODULE table by type, and then use the ID to query
* VNF_COMPONENTS_RECIPE by VF_MODULE_ID and ACTION
*
@@ -1925,8 +2900,7 @@ public class CatalogDatabase implements Closeable {
VfModule vfMod = resultList.get(0);
- int id = vfMod.getId();
- String vfModuleId = Integer.toString(id);
+ String vfModuleId = vfMod.getModelUUID();
StringBuilder hql1 = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
@@ -1935,7 +2909,7 @@ public class CatalogDatabase implements Closeable {
+ action);
Query query1 = getSession ().createQuery (hql1.toString ());
- query1.setParameter (VF_MODULE_ID, vfModuleId);
+ query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
@SuppressWarnings("unchecked")
@@ -1981,8 +2955,7 @@ public class CatalogDatabase implements Closeable {
VfModule vfMod = resultList.get(0);
- int id = vfMod.getId();
- String vfModuleId = Integer.toString(id);
+ String vfModuleId = vfMod.getModelName();
StringBuilder hql1 = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
@@ -1991,7 +2964,7 @@ public class CatalogDatabase implements Closeable {
+ action);
Query query1 = getSession ().createQuery (hql1.toString ());
- query1.setParameter (VF_MODULE_ID, vfModuleId);
+ query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
@SuppressWarnings("unchecked")
@@ -2039,6 +3012,7 @@ public class CatalogDatabase implements Closeable {
* @return A list of VnfResource objects
*/
@SuppressWarnings("unchecked")
+ @Deprecated // vnfRole is no longer in VnfResource
public List <VnfResource> getVnfResourcesByRole (String vnfRole) {
long startTime = System.currentTimeMillis ();
@@ -2054,6 +3028,25 @@ public class CatalogDatabase implements Closeable {
}
/**
+ * Return VNF Resources in the Catalog DB that match a given VNF role
+ *
+ * @return A list of VnfResource objects
+ */
+ @SuppressWarnings("unchecked")
+ public List<VnfResourceCustomization> getVnfResourceCustomizationsByRole(String vnfRole) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get all VNF resource customizations for role " + vnfRole);
+
+ String hql = "FROM VnfResourceCustomization WHERE nfRole = :vnfRole";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("vnfRole", vnfRole);
+
+ List <VnfResourceCustomization> resources = query.list ();
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationsByRole", null);
+ return resources;
+ }
+
+ /**
* Return all Network Resources in the Catalog DB
*
* @return A list of NetworkResource objects
@@ -2072,6 +3065,19 @@ public class CatalogDatabase implements Closeable {
return result;
}
+ @SuppressWarnings("unchecked")
+ public List<NetworkResourceCustomization> getAllNetworkResourceCustomizations() {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get all network resource customizations");
+
+ String hql = "FROM NetworkResourceCustomization";
+ Query query = getSession ().createQuery (hql);
+
+ List <NetworkResourceCustomization> result = query.list ();
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllNetworkResourceCustomizations", null);
+ return result;
+ }
+
/**
* Return all VF Modules in the Catalog DB
*
@@ -2091,6 +3097,21 @@ public class CatalogDatabase implements Closeable {
return result;
}
+ @SuppressWarnings("unchecked")
+ public List <VfModuleCustomization> getAllVfModuleCustomizations () {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get all vf module customizations");
+
+ String hql = "FROM VfModuleCustomization";
+ Query query = getSession ().createQuery (hql);
+
+ List <VfModuleCustomization> result = query.list ();
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVfModuleCustomizations", null);
+ return result;
+ }
+
+
/**
* Return all HeatEnvironment in the Catalog DB
*
@@ -2113,6 +3134,7 @@ public class CatalogDatabase implements Closeable {
/**
* Fetch the Environment by Environment ID - 1510
*/
+ @Deprecated // no longer in heat envt table
public HeatEnvironment getHeatEnvironment (int id) {
long startTime = System.currentTimeMillis ();
@@ -2141,6 +3163,7 @@ public class CatalogDatabase implements Closeable {
* Fetch the nested templates - 1510
*/
+ @Deprecated
public Map <String, Object> getNestedTemplates (int templateId) {
Map <String, Object> nestedTemplates = null;
long startTime = System.currentTimeMillis ();
@@ -2185,10 +3208,61 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNestedTemplate", null);
return nestedTemplates;
}
+ /**
+ * Return a Map<String, Object> for returning the child templates and their contents
+ *
+ * @param parentHeatTemplateId
+ * @return Map<String,Object> or null if none found
+ */
+ public Map <String, Object> getNestedTemplates (String parentHeatTemplateId) {
+ Map <String, Object> nestedTemplates = null;
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getNestedTemplates called with parentTemplateId " + parentHeatTemplateId);
+
+ String hql = "FROM HeatNestedTemplate where parentTemplateId = :parentHeatTemplateId";
+
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("parentHeatTemplateId", parentHeatTemplateId);
+
+ @SuppressWarnings("unchecked")
+ List <HeatNestedTemplate> resultList = query.list ();
+ // If nothing comes back, there are no nested templates
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No nestedTemplate found", "CatalogDB", "getNestedTemplates", null);
+ LOGGER.debug ("No nestedTemplates found for templateId=" + parentHeatTemplateId + ", " + hql);
+ return null;
+ }
+ // Now, for each entry in NESTED_HEAT_TEMPLATES, we need to grab the template body from HEAT_TEMPLATE
+ nestedTemplates = new HashMap <String, Object> ();
+ for (HeatNestedTemplate hnt : resultList) {
+ LOGGER.debug ("Querying for " + hnt);
+ HeatTemplate ht = this.getHeatTemplateByArtifactUuid (hnt.getChildTemplateId ());
+ if (ht == null) {
+ LOGGER.debug ("No template found matching childTemplateId=" + hnt.getChildTemplateId ());
+ continue;
+ }
+ String providerResourceFile = hnt.getProviderResourceFile ();
+ String heatTemplateBody = ht.getTemplateBody ();
+ if (providerResourceFile != null && heatTemplateBody != null) {
+ nestedTemplates.put (providerResourceFile, heatTemplateBody);
+ } else {
+ LOGGER.debug ("providerResourceFile or heatTemplateBody were null - do not add to HashMap!");
+ }
+ }
+ // Make sure we're not returning an empty map - if so, just return null
+ if (nestedTemplates.isEmpty ()) {
+ LOGGER.debug ("nestedTemplates is empty - just return null");
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Nested template is empty", "CatalogDB", "getNestedTemplate", null);
+ return null;
+ }
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNestedTemplate", null);
+ return nestedTemplates;
+ }
/*
* Fetch any files in the HEAT_FILES table 1510
*/
+ @Deprecated
public Map <String, HeatFiles> getHeatFiles (int vnfResourceId) {
Map <String, HeatFiles> heatFiles = null;
@@ -2224,8 +3298,9 @@ public class CatalogDatabase implements Closeable {
}
// New 1607 - with modularization, use new table to determine which HEAT_FILES entries to attach
-
+ @Deprecated
public Map <String, HeatFiles> getHeatFilesForVfModule(int vfModuleId) {
+ /*
Map <String, HeatFiles> heatFiles = null;
long startTime = System.currentTimeMillis ();
@@ -2242,7 +3317,6 @@ public class CatalogDatabase implements Closeable {
return null;
}
//Now the fun part - we have a list of the heat files we need to get - could clean this up with a join
- //TODO - convert this all with one join - brute force for now due to time
heatFiles = new HashMap<String, HeatFiles>();
for (VfModuleToHeatFiles vmthf : mapList) {
int heatFilesId = vmthf.getHeatFilesId();
@@ -2272,9 +3346,119 @@ public class CatalogDatabase implements Closeable {
}
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFilesForVfModule", null);
return heatFiles;
+ */
+ return null;
}
+
+ /**
+ * Return a VfModuleToHeatFiles object
+ *
+ * @param vfModuleModelUuid, heatFilesArtifactUuid
+ * @return VfModuleToHeatFiles or null if none found
+ */
+ public VfModuleToHeatFiles getVfModuleToHeatFilesEntry(String vfModuleModelUuid, String heatFilesArtifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getVfModuleToHeatFilesEntry with vfModuleModelUuid " + vfModuleModelUuid + ", heatFilesArtifactUuid=" + heatFilesArtifactUuid);
+ String hql = "FROM VfModuleToHeatFiles where vfModuleModelUuid = :vfModuleModelUuidValue and heatFilesArtifactUuid = :heatFilesArtifactUuidValue";
+
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("vfModuleModelUuidValue", vfModuleModelUuid);
+ parameters.put("heatFilesArtifactUuidValue", heatFilesArtifactUuid);
+
+ VfModuleToHeatFiles vmthf = null;
+
+ try {
+ vmthf = this.executeQuerySingleRow(hql.toString(), parameters, true);
+ } catch (Exception e) {
+ throw e;
+ }
+ return vmthf;
+ }
+
+ /**
+ * Return a ServiceToResourceCustomization object
+ *
+ * @param vfModuleModelUuid, heatFilesArtifactUuid
+ * @return VfModuleToHeatFiles or null if none found
+ */
+ public ServiceToResourceCustomization getServiceToResourceCustomization(String serviceModelUuid, String resourceModelCustomizationUuid, String modelType) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getServiceToResourceCustomization with serviceModelUuid=" + serviceModelUuid + ", resourceModelCustomizationUuid=" + resourceModelCustomizationUuid + ", modelType=" + modelType);
+ String hql = "FROM ServiceToResourceCustomization where serviceModelUUID = :serviceModelUuidValue and resourceModelCustomizationUUID = :resourceModelCustomizationUuidValue and modelType = :modelTypeValue ";
+
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("serviceModelUuidValue", serviceModelUuid);
+ parameters.put("resourceModelCustomizationUuidValue", resourceModelCustomizationUuid);
+ parameters.put("modelTypeValue", modelType);
+
+ ServiceToResourceCustomization strc = null;
+
+ try {
+ strc = this.executeQuerySingleRow(hql.toString(), parameters, true);
+ } catch (Exception e) {
+ throw e;
+ }
+ return strc;
+ }
+
+ /**
+ * Return a Map<String, HeatFiles> for returning the heat files associated with a vfModule 1707
+ *
+ * @param parentHeatTemplateId
+ * @return Map<String,Object> or null if none found
+ */
+ public Map <String, HeatFiles> getHeatFilesForVfModule(String vfModuleModelUuid) {
+ Map <String, HeatFiles> heatFiles = null;
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getHeatFilesForVfModule called with vfModuleModelUuid " + vfModuleModelUuid);
+ String hql = "FROM VfModuleToHeatFiles where vfModuleModelUuid = :vfModuleModelUuidValue";
+
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("vfModuleModelUuidValue", vfModuleModelUuid);
+
+ @SuppressWarnings("unchecked")
+ List<VfModuleToHeatFiles> mapList = query.list();
+ if (mapList.isEmpty()) {
+ LOGGER.debug ("No heatFiles found for vfModuleModelUuid=" + vfModuleModelUuid);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No heatfiles found for vfModule", "CatalogDB", "getHeatFilesForVfModule", null);
+ return null;
+ }
+ //Now the fun part - we have a list of the heat files we need to get - could clean this up with a join
+ heatFiles = new HashMap<String, HeatFiles>();
+ for (VfModuleToHeatFiles vmthf : mapList) {
+ String heatFilesUuid = vmthf.getHeatFilesArtifactUuid();
+ hql = "FROM HeatFiles where artifactUuid = :heatFilesUuidValue";
+ query = getSession().createQuery(hql);
+ query.setParameter("heatFilesUuidValue", heatFilesUuid);
+ @SuppressWarnings("unchecked")
+ List<HeatFiles> fileList = query.list();
+ if (fileList.isEmpty()) {
+ // Should this throw an exception??
+ LOGGER.debug("Unable to find a HEAT_FILES entry at " + heatFilesUuid);
+ String errorString = "_ERROR|" + heatFilesUuid;
+ // The receiving code needs to know to throw an exception for this - or ignore it.
+ heatFiles.put(errorString, null);
+ } else {
+ // Should only ever have 1 result - add it to our Map
+ LOGGER.debug("Retrieved " + fileList.size() + " heat file entry at " + heatFilesUuid);
+ for (HeatFiles hf : fileList) {
+ LOGGER.debug("Adding " + hf.getFileName() + "->" + hf.getFileBody());
+ heatFiles.put(hf.getFileName(), hf);
+ }
+ }
+ }
+ if (heatFiles.isEmpty()) {
+ LOGGER.debug ("heatFiles is empty - just return null");
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. HeatFiles is empty", "CatalogDB", "getHeatFilesForVfModule", null);
+ return null;
+ }
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFilesForVfModule", null);
+ return heatFiles;
+ }
/**
* Get the heat template object based on asdc attributes
@@ -2285,6 +3469,7 @@ public class CatalogDatabase implements Closeable {
*
* @return The HeatTemplate
*/
+ @Deprecated // asdcResourceName is no longer in heatTeamplate
public HeatTemplate getHeatTemplate (String templateName, String version, String asdcResourceName) {
long startTime = System.currentTimeMillis ();
@@ -2313,6 +3498,7 @@ public class CatalogDatabase implements Closeable {
return resultList.get (0);
}
+
/**
* Save the Heat Template
*
@@ -2322,29 +3508,75 @@ public class CatalogDatabase implements Closeable {
public void saveHeatTemplate (HeatTemplate heat, Set <HeatTemplateParam> paramSet) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save Heat Template with name " + heat.getTemplateName());
+ LOGGER.debug ("Catalog database - save Heat Template with name " + heat.getTemplateName() + ", artifactUUID=" + heat.getArtifactUuid());
heat.setParameters(null);
try {
- HeatTemplate heatTemp = this.getHeatTemplate (heat.getTemplateName (),
- heat.getVersion (),
- heat.getAsdcResourceName ());
+ // HeatTemplate heatTemp = this.getHeatTemplate (heat.getTemplateName (),
+ // heat.getVersion ());
+
+ HeatTemplate heatTemp = this.getHeatTemplateByArtifactUuidRegularQuery(heat.getArtifactUuid());
+
if (heatTemp == null) {
this.getSession ().save (heat);
if (paramSet != null) {
+ StringBuilder sb = new StringBuilder("Parameters: ");
for (HeatTemplateParam param : paramSet) {
- param.setHeatTemplateId (heat.getId ());
+ param.setHeatTemplateArtifactUuid(heat.getArtifactUuid());
+ sb.append(param.getParamName() + ", ");
}
+ LOGGER.debug(sb.toString());
heat.setParameters (paramSet);
- this.getSession ().merge (heat);
+ try {
+ Session session = this.getSession();
+ if (!(session.isConnected() && session.isOpen())) {
+ LOGGER.debug("Initial session is not connected or open - get another");
+ session = this.getSession();
+ }
+ //session.merge(heat);
+ session.save(heat);
+ } catch (HibernateException he1) {
+ LOGGER.debug("Hibernate Exception encountered on first attempt at save(heat) - try again..." + he1.getMessage());
+ LOGGER.debug(he1.getStackTrace().toString());
+ try {
+ Session session = this.getSession();
+ //session.merge(heat);
+ session.save(heat);
+ } catch (HibernateException he2) {
+ LOGGER.debug("Hibernate Exception encountered on second attempt at save(heat)" + he2.getMessage());
+ LOGGER.debug(he2.getStackTrace().toString());
+ throw he2;
+ } catch (Exception e2) {
+ LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage());
+ LOGGER.debug(e2.getStackTrace().toString());
+ throw e2;
+ }
+
+ } catch (Exception e1) {
+ LOGGER.debug("General Exception encountered on first attempt at save(heat) - try again..." + e1.getMessage());
+ LOGGER.debug(e1.getStackTrace().toString());
+ try {
+ Session session = this.getSession();
+ //session.merge(heat);
+ session.save(heat);
+ } catch (HibernateException he2) {
+ LOGGER.debug("General Exception encountered on second attempt at save(heat)" + he2.getMessage());
+ LOGGER.debug(he2.getStackTrace().toString());
+ throw he2;
+ } catch (Exception e2) {
+ LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage());
+ LOGGER.debug(e2.getStackTrace().toString());
+ throw e2;
+ }
+ }
}
} else {
- heat.setId(heatTemp.getId());
+ heat.setArtifactUuid(heatTemp.getArtifactUuid());
}
} finally {
- heat.setParameters(paramSet);
+ //heat.setParameters(paramSet);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatTemplate", null);
}
}
@@ -2357,6 +3589,7 @@ public class CatalogDatabase implements Closeable {
* @param asdcResourceName the environment resource name
* @return the heat environment from DB or null if not found
*/
+ @Deprecated
public HeatEnvironment getHeatEnvironment (String name, String version, String asdcResourceName) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get Heat environment with name " + name
@@ -2395,6 +3628,50 @@ public class CatalogDatabase implements Closeable {
}
/**
+ * Retrieves a Heat environment from DB based on its unique key. 1707
+ *
+ * @param name the environment artifact name
+ * @param version the environment resource version
+ * @return the heat environment from DB or null if not found
+ */
+ public HeatEnvironment getHeatEnvironment (String artifactUuid, String version) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Heat environment with uuid " + artifactUuid
+ + " and version "
+ + version);
+
+ String hql = "FROM HeatEnvironment WHERE artifactUuid=:artifactUuid AND version=:version";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("artifactUuid", artifactUuid);
+ query.setParameter ("version", version);
+ HeatEnvironment env = null;
+ try {
+ env = (HeatEnvironment) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: envName='" + artifactUuid + "', version='" + version);
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for artifactUUID=" + artifactUuid + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "non unique result for ArtifactUUID=" + artifactUuid);
+ env = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: artifactUUID='" + artifactUuid + "', asdc_service_model_version='" + version + " " + he.getMessage() );
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for artifactUUID=" + artifactUuid + " and version=" + version , "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for artifactUUID=" + artifactUuid);
+ env = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: artifactUUID='" + artifactUuid + "', asdc_service_model_version='" + version + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for artifactUUID=" + artifactUuid + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for artifactUUID=" + artifactUuid);
+ env = null;
+ throw e;
+ }
+ if (env == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getHeatTemplate", null);
+ } else {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+ }
+ return env;
+ }
+
+ /**
* Save the HeatEnvironment
*
* @param env The Environment
@@ -2402,15 +3679,15 @@ public class CatalogDatabase implements Closeable {
public void saveHeatEnvironment (HeatEnvironment env) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save Heat environment with name "
- + env.getEnvironment());
+ + env.getEnvironment() + " and ArtifactUUID " + env.getArtifactUuid());
try {
- HeatEnvironment dbEnv = getHeatEnvironment (env.getName (), env.getVersion (), env.getAsdcResourceName ());
+ HeatEnvironment dbEnv = getHeatEnvironment (env.getArtifactUuid(), env.getVersion ());
if (dbEnv == null) {
this.getSession ().save (env);
} else {
- env.setId(dbEnv.getId());
+ env.setArtifactUuid(dbEnv.getArtifactUuid());
}
} finally {
@@ -2466,13 +3743,17 @@ public class CatalogDatabase implements Closeable {
public void saveOrUpdateVnfResource (VnfResource vnfResource) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save VNF Resource with VNF type " + vnfResource.getVnfType ());
+ LOGGER.debug ("Catalog database - save VNF Resource with VNF type " + vnfResource.getModelName());
+ //LOGGER.debug(vnfResource.toString());
try {
- if (vnfResource.getId() != 0) {
- this.getSession ().merge (vnfResource);
- } else {
+ VnfResource existing = this.getVnfResourceByModelUuid(vnfResource.getModelUuid());
+ if (existing == null) {
+ LOGGER.debug("No existing entry found - attempting to save...");
this.getSession ().save (vnfResource);
+ } else {
+ //LOGGER.debug("Existing vnf resource found!" + existing.toString());
+ LOGGER.debug("Existing vnf resource found!");
}
} finally {
@@ -2480,9 +3761,47 @@ public class CatalogDatabase implements Closeable {
}
}
+ public boolean saveVnfResourceCustomization (VnfResourceCustomization vnfResourceCustomization) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save VNF Resource Customization with Name " + vnfResourceCustomization.getModelInstanceName());
+ try {
+ LOGGER.debug(vnfResourceCustomization.toString());
+ } catch (Exception e) {
+ LOGGER.debug("Unable to print VRC " + e.getMessage());
+ }
+ try {
+ // Check if NetworkResourceCustomzation record already exists. If so, skip saving it.
+ // List<NetworkResource> networkResourceList = getAllNetworksByNetworkModelCustomizationUuid(networkResourceCustomization.getModelCustomizationUuid());
+ // Do any matching customization records exist?
+ // if(networkResourceList.size() == 0){
+
+ // networkResourceCustomization.setNetworkResourceModelUuid(networkResource.getModelUuid());
+ // this.getSession().flush();
+ // this.getSession().clear();
+
+ VnfResourceCustomization existing = this.getVnfResourceCustomizationByModelCustomizationUuid(vnfResourceCustomization.getModelCustomizationUuid());
+
+ if (existing == null) {
+ LOGGER.debug("No existing entry found...attempting to save...");
+ this.getSession ().save (vnfResourceCustomization);
+ return true;
+ }else {
+ try {
+ LOGGER.debug("Existing VRC entry found\n" + existing.toString());
+ } catch (Exception e) {
+ LOGGER.debug("Unable to print VRC2 " + e.getMessage());
+ }
+ return false;
+ }
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVnfResourceCustomization", null);
+ }
+ }
+
public void saveAllottedResourceCustomization (AllottedResourceCustomization resourceCustomization) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save Allotted Resource with Name " + resourceCustomization.getModelName());
+ LOGGER.debug ("Catalog database - save Allotted Resource with Name " + resourceCustomization.getModelInstanceName());
try {
List<AllottedResourceCustomization> allottedResourcesList = getAllAllottedResourcesByArModelCustomizationUuid(resourceCustomization.getModelCustomizationUuid());
@@ -2495,9 +3814,145 @@ public class CatalogDatabase implements Closeable {
}
}
+ public void saveAllottedResource (AllottedResource allottedResource) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save Allotted Resource with Name " + allottedResource.getModelName());
+ try {
+ AllottedResource existing = this.getAllottedResourceByModelUuid(allottedResource.getModelUuid());
+ if (existing == null) {
+ this.getSession ().save (allottedResource);
+ } else {
+ LOGGER.debug("Found existing allottedResource with this modelUuid - no need to save");
+ }
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateAllottedResourceCustomization", null);
+ }
+ }
+
+ public void saveNetworkResource (NetworkResource networkResource) throws RecordNotFoundException {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save Network Resource with Network Name " + networkResource.getModelName());
+ try {
+ // Check if NetworkResourceCustomzation record already exists. If so, skip saving it.
+ // List<NetworkResource> networkResourceList = getAllNetworksByNetworkModelCustomizationUuid(networkResourceCustomization.getModelCustomizationUuid());
+ // Do any matching customization records exist?
+ if(getNetworkResourceByModelUuid(networkResource.getModelUUID()) == null){
+ this.getSession ().save(networkResource);
+ }
+
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveNetworkResourceCustomization", null);
+ }
+ }
+
+ public void saveToscaCsar (ToscaCsar toscaCsar) throws RecordNotFoundException {
+
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save Tosca Csar with Name " + toscaCsar.getName());
+ try {
+
+ if(getToscaCsar(toscaCsar.getArtifactChecksum()) == null){
+ this.getSession ().save (toscaCsar);
+ }
+ //if (toscaCsar.getArtifactUUID() != null) {
+ // this.getSession ().merge (toscaCsar);
+ //} else {
+ // this.getSession ().save (toscaCsar);
+ LOGGER.debug("Temporarily disabling saveToscaCsar pending further investigation 2017-06-02");
+ //}
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveToscaCsar", null);
+ }
+ }
+
+
+ /**
+ * Return the newest version of a specific Tosca CSAR Record resource (queried by Name).
+ *
+ * @param ToscaCsar
+ * @return ToscaCsar object or null if none found
+ */
+ public ToscaCsar getToscaCsar (String artifactChecksum) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Tosca CSAR record with artifactChecksum " + artifactChecksum);
+
+ String hql = "FROM ToscaCsar WHERE artifactChecksum = :artifactChecksum";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("artifactChecksum", artifactChecksum);
+
+ @SuppressWarnings("unchecked")
+ List <ToscaCsar> resultList = query.list ();
+
+ // See if something came back. Name is unique, so
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Tosca Csar not found", "CatalogDB", "getToscaCsar", null);
+ return null;
+ }
+ // Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ // Collections.reverse (resultList);
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getToscaCsar", null);
+ return resultList.get (0);
+ }
+
+
+ public void saveTempNetworkHeatTemplateLookup (TempNetworkHeatTemplateLookup tempNetworkHeatTemplateLookup) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save TempNetworkHeatTemplateLookup with Network Model Name " + tempNetworkHeatTemplateLookup.getNetworkResourceModelName() +
+ " and Heat Template Artifact UUID " + tempNetworkHeatTemplateLookup.getHeatTemplateArtifactUuid());
+ try {
+ this.getSession ().save (tempNetworkHeatTemplateLookup);
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveTempNetworkHeatTemplateLookup", null);
+ }
+ }
+
+ public void saveVfModuleToHeatFiles (VfModuleToHeatFiles vfModuleToHeatFiles) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save VfModuleToHeatFiles with VF Module UUID " + vfModuleToHeatFiles.getVfModuleModelUuid() +
+ " and Heat Files Artifact UUID " + vfModuleToHeatFiles.getHeatFilesArtifactUuid());
+ try {
+
+ this.getSession ().save (vfModuleToHeatFiles);
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVFModuleToHeatFiles", null);
+ }
+ }
+
+ public void saveVnfResourceToVfModuleCustomization(VnfResourceCustomization vnfResourceCustomizationUUID, VfModuleCustomization vfModuleCustomizationUUID) throws RecordNotFoundException {
+ long startTime = System.currentTimeMillis ();
+ VnfResCustomToVfModuleCustom vnfResCustomToVfModuleCustom = new VnfResCustomToVfModuleCustom();
+
+ if(vnfResourceCustomizationUUID != null && vfModuleCustomizationUUID != null){
+ vnfResCustomToVfModuleCustom.setVnfResourceCustModelCustomizationUuid(vnfResourceCustomizationUUID.getModelCustomizationUuid());
+ vnfResCustomToVfModuleCustom.setVfModuleCustModelCustomizationUuid(vfModuleCustomizationUUID.getModelCustomizationUuid());
+ String vnfId = vnfResourceCustomizationUUID.getModelCustomizationUuid();
+ String vfId = vfModuleCustomizationUUID.getModelCustomizationUuid();
+ LOGGER.debug ("Catalog database - save VnfResCustomToVfModuleCustom with vnf=" + vnfId + ", vf=" + vfId);
+ try {
+ VnfResCustomToVfModuleCustom existing = this.getVnfResCustomToVfModule(vnfId, vfId);
+ if (existing == null) {
+ LOGGER.debug("No existing entry found - will now try to save");
+ this.getSession ().save (vnfResCustomToVfModuleCustom);
+ } else {
+ LOGGER.debug("Existing entry already found - no save needed");
+ }
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVnfResourceToVfModuleCustomization", null);
+ }
+ }
+ }
+
public void saveNetworkResourceCustomization (NetworkResourceCustomization networkResourceCustomization) throws RecordNotFoundException {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save Network Resource Customization with Network Name " + networkResourceCustomization.getModelName());
+ LOGGER.debug ("Catalog database - save Network Resource Customization with Network Name " + networkResourceCustomization.getModelInstanceName());
try {
// Check if NetworkResourceCustomzation record already exists. If so, skip saving it.
List<NetworkResourceCustomization> networkResourceCustomizationList = getAllNetworksByNetworkModelCustomizationUuid(networkResourceCustomization.getModelCustomizationUuid());
@@ -2505,13 +3960,14 @@ public class CatalogDatabase implements Closeable {
if(networkResourceCustomizationList.size() == 0){
// Retreive the record from the Network_Resource table associated to the Customization record based on ModelName
- NetworkResource networkResource = getNetworkResource(networkResourceCustomization.getModelName());
+ // ?? is it modelInstanceName with 1707?
+ NetworkResource networkResource = getNetworkResource(networkResourceCustomization.getModelInstanceName());
if(networkResource == null){
- throw new RecordNotFoundException("No record found in NETWORK_RESOURCE table for model name " + networkResourceCustomization.getModelName());
+ throw new RecordNotFoundException("No record found in NETWORK_RESOURCE table for model name " + networkResourceCustomization.getModelInstanceName());
}
- networkResourceCustomization.setNetworkResourceId(networkResource.getId());
+ networkResourceCustomization.setNetworkResourceModelUuid(networkResource.getModelUUID());
this.getSession ().save(networkResourceCustomization);
}
@@ -2522,6 +3978,7 @@ public class CatalogDatabase implements Closeable {
}
}
+ @Deprecated // table is gone - mapped to ServiceToResource
public void saveServiceToNetworks (ServiceToNetworks serviceToNetworks) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save to ServiceToNetworks table with NetworkModelCustomizationUUID of " + serviceToNetworks.getNetworkModelCustomizationUuid() + " and ServiceModelUUID of " + serviceToNetworks.getServiceModelUuid());
@@ -2533,6 +3990,22 @@ public class CatalogDatabase implements Closeable {
}
}
+ public void saveServiceToResourceCustomization(ServiceToResourceCustomization serviceToResource) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save to ServiceToResourceCustomization table with ServiceModelUuid of " + serviceToResource.getServiceModelUUID() + ", ResourceModelUUID of " + serviceToResource.getResourceModelCustomizationUUID() + " and model_type=" + serviceToResource.getModelType());
+ ServiceToResourceCustomization strc = this.getServiceToResourceCustomization(serviceToResource.getServiceModelUUID(), serviceToResource.getResourceModelCustomizationUUID(), serviceToResource.getModelType());
+ try {
+ if (strc != null) {
+ LOGGER.debug("**This ServiceToResourceCustomization record already exists - no need to save");
+ } else {
+ this.getSession ().save(serviceToResource);
+ }
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveServiceToResourceCustomization", null);
+ }
+ }
+
+ @Deprecated // table is gone - mapped to ServiceToResourceCustomization
public void saveServiceToAllottedResources (ServiceToAllottedResources serviceToAllottedResources) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save to serviceToAllottedResources table with ARModelCustomizationUUID of " + serviceToAllottedResources.getArModelCustomizationUuid() + " and ServiceModelUUID of " + serviceToAllottedResources.getServiceModelUuid());
@@ -2546,11 +4019,11 @@ public class CatalogDatabase implements Closeable {
public void saveService (Service service) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save Service with ServiceName/Version/serviceUUID(SERVICE_NAME_VERSION_ID)" + service.getServiceName()+"/"+service.getVersion()+"/"+service.getServiceNameVersionId());
+ LOGGER.debug ("Catalog database - save Service with ServiceName/Version/serviceUUID(SERVICE_NAME_VERSION_ID)" + service.getModelName()+"/"+service.getVersion()+"/"+service.getModelUUID());
try {
Service serviceInvariantDB = null;
// Retrieve existing service record by nameVersionId
- Service serviceDB = this.getServiceByUUID(service.getServiceNameVersionId());
+ Service serviceDB = this.getServiceByModelUUID(service.getModelUUID());
if (serviceDB == null) {
// Check to see if a record with the same modelInvariantId already exists. This tells us that a previous version exists and we can copy its recipe Record for the new service record.
serviceInvariantDB = this.getServiceByInvariantUUID(service.getModelInvariantUUID());
@@ -2560,13 +4033,13 @@ public class CatalogDatabase implements Closeable {
if(serviceInvariantDB != null){ // existing modelInvariantId was found.
// copy the recipe record with the matching invariant id. We will duplicate this for the new service record
- List<ServiceRecipe> serviceRecipes = getServiceRecipes(serviceInvariantDB.getId());
+ List<ServiceRecipe> serviceRecipes = getServiceRecipes(serviceInvariantDB.getModelUUID());
if(serviceRecipes != null && serviceRecipes.size() > 0){
for(ServiceRecipe serviceRecipe : serviceRecipes){
if(serviceRecipe != null){
// Fetch the service record that we just added. We do this so we can extract its Id column value, this will be the foreign key we use in the service recipe table.
- Service newService = this.getServiceByUUID(service.getServiceNameVersionId());
+ Service newService = this.getServiceByModelUUID(service.getModelUUID());
// Create a new ServiceRecipe record based on the existing one we just copied from the DB.
ServiceRecipe newServiceRecipe = new ServiceRecipe();
newServiceRecipe.setAction(serviceRecipe.getAction());
@@ -2574,16 +4047,20 @@ public class CatalogDatabase implements Closeable {
newServiceRecipe.setOrchestrationUri(serviceRecipe.getOrchestrationUri());
newServiceRecipe.setRecipeTimeout(serviceRecipe.getRecipeTimeout());
newServiceRecipe.setServiceParamXSD(serviceRecipe.getServiceParamXSD());
- newServiceRecipe.setServiceId(newService.getId());
+ newServiceRecipe.setServiceModelUUID(newService.getModelUUID());
newServiceRecipe.setVersion(serviceRecipe.getVersion());
+ // Check recipe does not exist before inserting
+ ServiceRecipe recipe = getServiceRecipeByModelUUID(newServiceRecipe.getServiceModelUUID(), newServiceRecipe.getAction());
// Save the new recipe record in the service_recipe table and associate it to the new service record that we just added.
+ if(recipe == null){
this.getSession ().save (newServiceRecipe);
}
}
- }
-
+ }
+ }
}
+
} finally {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateService", null);
}
@@ -2591,26 +4068,118 @@ public class CatalogDatabase implements Closeable {
public void saveOrUpdateVfModule (VfModule vfModule) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save VNF Module with VF Model Name " + vfModule.getModelName());
+ LOGGER.debug ("Catalog database - save or update VF Module with VF Model Name " + vfModule.getModelName());
+ VfModule vfModuleInvariantDB = null;
try {
-
- if (vfModule.getId() != 0) {
- this.getSession ().merge (vfModule);
- } else {
+ LOGGER.debug("heat template id = " + vfModule.getHeatTemplateArtifactUUId() + ", vol template id = "+ vfModule.getVolHeatTemplateArtifactUUId());
+ LOGGER.debug(vfModule.toString());
+ } catch (Exception e) {
+ LOGGER.debug("unable to print vfmodule " + e.getMessage());
+ }
+ try {
+ VfModule existing = this.getVfModuleByModelUUID(vfModule.getModelUUID());
+ if (existing == null) {
+ // Check to see if a record with the same modelInvariantId already exists. This tells us that a previous version exists and we can copy its recipe Record for the new service record.
+ vfModuleInvariantDB = this.getVfModuleByModelInvariantUuid(vfModule.getModelInvariantUUID());
+ LOGGER.debug("No existing entry found, attempting to save...");
this.getSession ().save (vfModule);
+ } else {
+ try {
+ LOGGER.debug("Found an existing vf module!\n" + existing.toString());
+ } catch (Exception e) {
+ LOGGER.debug("unable to print vfmodule2 " + e.getMessage());
}
+ }
+
+ if(vfModuleInvariantDB != null){ // existing modelInvariantId was found.
+ // copy the recipe record with the matching invariant id. We will duplicate this for the new service record
+ List<VnfComponentsRecipe> vfRecipes = getVnfComponentRecipes(vfModuleInvariantDB.getModelUUID());
+
+
+ if(vfRecipes != null && vfRecipes.size() > 0){
+ for(VnfComponentsRecipe vfRecipe : vfRecipes){
+ if(vfRecipe != null){
+ // Fetch the service record that we just added. We do this so we can extract its Id column value, this will be the foreign key we use in the service recipe table.
+ VfModule newRecipe = this.getVfModuleByModelUUID(vfModule.getModelUUID());
+ // Create a new ServiceRecipe record based on the existing one we just copied from the DB.
+ VnfComponentsRecipe newVnfRecipe = new VnfComponentsRecipe();
+ newVnfRecipe.setAction(vfRecipe.getAction());
+ newVnfRecipe.setDescription(vfRecipe.getDescription());
+ newVnfRecipe.setOrchestrationUri(vfRecipe.getOrchestrationUri());
+ newVnfRecipe.setRecipeTimeout(vfRecipe.getRecipeTimeout());
+ newVnfRecipe.setVnfComponentParamXSD(vfRecipe.getVnfComponentParamXSD());
+ newVnfRecipe.setVfModuleModelUUId(newRecipe.getModelUUID());
+ newVnfRecipe.setVersion(vfRecipe.getVersion());
+ newVnfRecipe.setVnfComponentType(vfRecipe.getVnfComponentType());
+ newVnfRecipe.setVnfType(vfRecipe.getVnfType());
+ // Check recipe does not exist before inserting
+ // VnfComponentsRecipe recipe = getVnfComponentRecipes(newVnfRecipe.getVfModuleModelUUId());
+ List<VnfComponentsRecipe> recipe = getVnfComponentRecipes(newVnfRecipe.getVfModuleModelUUId());
+ // Save the new recipe record in the service_recipe table and associate it to the new service record that we just added.
+ // if(recipe == null){
+ this.getSession ().save (newVnfRecipe);
+ // }
+ }
+ }
+ }
+
+ }
} finally {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVfModule", null);
}
}
+ public void saveOrUpdateVfModuleCustomization (VfModuleCustomization vfModuleCustomization) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save VF Module Customization with VF Customization Model Name UUID " + vfModuleCustomization.getVfModuleModelUuid());
+ try {
+ LOGGER.debug("env id = " + vfModuleCustomization.getHeatEnvironmentArtifactUuid() + ", vol Env=" + vfModuleCustomization.getVolEnvironmentArtifactUuid());
+ LOGGER.debug(vfModuleCustomization.toString());
+ } catch (Exception e) {
+ LOGGER.debug("unable to print vfmodulecust " + e.getMessage());
+ }
+ try {
+ VfModuleCustomization existing = this.getVfModuleCustomizationByModelCustomizationId(vfModuleCustomization.getModelCustomizationUuid());
+ if (existing == null) {
+ LOGGER.debug("No existing entry found, attempting to save...");
+ this.getSession ().save (vfModuleCustomization);
+ } else {
+ try {
+ LOGGER.debug("Found an existing vf module customization entry\n" + existing.toString());
+ } catch (Exception e) {
+ LOGGER.debug("unable to print vfmodulecust2 " + e.getMessage());
+ }
+ }
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVfModuleCustomization", null);
+ }
+ }
+
+ @Deprecated
public HeatNestedTemplate getNestedHeatTemplate(int parentTemplateId, int childTemplateId) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get nested Heat template with PerentId-Child Id "
+ parentTemplateId +"-"+childTemplateId);
try {
HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
+// nestedTemplate.setParentTemplateId (parentTemplateId);
+// nestedTemplate.setChildTemplateId (childTemplateId);
+
+ return (HeatNestedTemplate)session.get (HeatNestedTemplate.class,nestedTemplate);
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNestedHeatTemplate", null);
+ }
+ }
+
+ // 1707 version
+ public HeatNestedTemplate getNestedHeatTemplate(String parentTemplateId, String childTemplateId) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get nested Heat template with PerentId="
+ + parentTemplateId +", ChildId="+childTemplateId);
+ try {
+ HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
nestedTemplate.setParentTemplateId (parentTemplateId);
nestedTemplate.setChildTemplateId (childTemplateId);
@@ -2620,7 +4189,9 @@ public class CatalogDatabase implements Closeable {
}
}
+ @Deprecated
public void saveNestedHeatTemplate (int parentTemplateId, HeatTemplate childTemplate, String yamlFile) {
+ /*
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save nested Heat template with name "
+ childTemplate.getTemplateName ());
@@ -2637,8 +4208,31 @@ public class CatalogDatabase implements Closeable {
} finally {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveNestedHeatTemplate", null);
}
+ */
+ }
+
+ // 1707
+ public void saveNestedHeatTemplate (String parentTemplateId, HeatTemplate childTemplate, String yamlFile) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save nested Heat template with name "
+ + childTemplate.getTemplateName () + ",parentId=" + parentTemplateId + ",childId=" + childTemplate.getArtifactUuid() + ", providerResourceFile=" + yamlFile);
+ try {
+
+ saveHeatTemplate(childTemplate, childTemplate.getParameters());
+ if (getNestedHeatTemplate(parentTemplateId,childTemplate.getArtifactUuid()) == null) {
+ HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
+ nestedTemplate.setParentTemplateId (parentTemplateId);
+ nestedTemplate.setChildTemplateId (childTemplate.getArtifactUuid ());
+ nestedTemplate.setProviderResourceFile (yamlFile);
+ session.flush();
+ session.save (nestedTemplate);
+ }
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveNestedHeatTemplate", null);
+ }
}
+ @Deprecated
public HeatFiles getHeatFiles(int vnfResourceId,String fileName,String asdcResourceName, String version) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - getHeatFiles with name " + fileName
@@ -2665,14 +4259,17 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for fileName=" + fileName);
heatFilesResult = null;
+ throw nure;
} catch (org.hibernate.HibernateException he) {
- LOGGER.debug("Hibernate Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
+ LOGGER.debug("Hibernate Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version + " " + he.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for fileName=" + fileName);
heatFilesResult = null;
+ throw he;
} catch (Exception e) {
- LOGGER.debug("Generic Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
+ LOGGER.debug("Generic Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version + " " + e.getMessage());
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for fileName=" + fileName);
heatFilesResult = null;
+ throw e;
}
// See if something came back.
@@ -2685,12 +4282,53 @@ public class CatalogDatabase implements Closeable {
return heatFilesResult;
}
+ public HeatFiles getHeatFiles(String artifactUuid) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - getHeatFiles with artifactUuid " + artifactUuid);
+
+ String hql = "FROM HeatFiles WHERE artifactUuid = :artifactUuid";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter ("artifactUuid", artifactUuid);
+
+ @SuppressWarnings("unchecked")
+
+ HeatFiles heatFilesResult = null;
+ try {
+ heatFilesResult = (HeatFiles) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: artifactUuid='" + artifactUuid );
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for artifactUuid=" + artifactUuid);
+ heatFilesResult = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while searching for: artifactUuid='" + artifactUuid + " " + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for artifactUuid=" + artifactUuid);
+ heatFilesResult = null;
+ throw he;
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while searching for: artifactUuid='" + artifactUuid + " " + e.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for artifactUuid=" + artifactUuid , "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for artifactUuid=" + artifactUuid);
+ heatFilesResult = null;
+ throw e;
+ }
+
+ // See if something came back.
+ if (heatFilesResult == null) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. HeatFiles not found", "CatalogDB", "getHeatFiles", null);
+ return null;
+ }
+ // Name + Version is unique, so should only be one element
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFiles", null);
+ return heatFilesResult;
+ }
+
public void saveHeatFiles (HeatFiles childFile) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save Heat File with name "
+ childFile.getFileName());
try {
- HeatFiles heatFiles = getHeatFiles (childFile.getVnfResourceId(), childFile.getFileName(), childFile.getAsdcResourceName (),childFile.getVersion());
+// HeatFiles heatFiles = getHeatFiles (childFile.getVnfResourceId(), childFile.getFileName(), childFile.getAsdcResourceName (),childFile.getVersion());
+ HeatFiles heatFiles = getHeatFiles (childFile.getArtifactUuid());
if (heatFiles == null) {
// asdc_heat_files_save
@@ -2701,7 +4339,7 @@ public class CatalogDatabase implements Closeable {
Based on following comment:
It must be childFile.setId instead of heatFiles.setId, we must return the ID if it exists in DB.
*/
- childFile.setId(heatFiles.getId());
+ childFile.setArtifactUuid(heatFiles.getArtifactUuid());
}
} finally {
@@ -2709,7 +4347,9 @@ public class CatalogDatabase implements Closeable {
}
}
+ @Deprecated
public void saveVfModuleToHeatFiles (int parentVfModuleId, HeatFiles childFile) {
+ /*
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save Heat File to VFmodule link "
+ childFile.getFileName());
@@ -2724,6 +4364,67 @@ public class CatalogDatabase implements Closeable {
} finally {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVfModuleToHeatFiles", null);
}
+ */
+ }
+
+ public void saveVfModuleToHeatFiles (String parentVfModuleId, HeatFiles childFile) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - save Heat File to VFmodule link "
+ + childFile.getFileName());
+ try {
+ saveHeatFiles (childFile);
+ VfModuleToHeatFiles checkExistingEntry = this.getVfModuleToHeatFilesEntry(parentVfModuleId, childFile.getArtifactUuid());
+ if (checkExistingEntry == null) {
+ VfModuleToHeatFiles vfModuleToHeatFile = new VfModuleToHeatFiles ();
+ vfModuleToHeatFile.setVfModuleModelUuid(parentVfModuleId);
+ vfModuleToHeatFile.setHeatFilesArtifactUuid(childFile.getArtifactUuid());
+ session.flush();
+ session.save (vfModuleToHeatFile);
+ } else {
+ LOGGER.debug("**Found existing VfModuleToHeatFiles entry for " + checkExistingEntry.toString());
+ LOGGER.debug("No need to save...");
+ }
+
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVfModuleToHeatFiles", null);
+ }
+ }
+
+ /**
+ * Return a Network Resource that matches the Network Customization defined by given MODEL_CUSTOMIZATION_UUID
+ *
+ * @param networkType
+ * @param action
+ * @param serviceType
+ * @return NetworkRecipe object or null if none found
+ */
+ public NetworkResource getNetworkResourceByModelUuid(String modelUUID) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get network resource with modelUUID " + modelUUID);
+
+ try {
+ String hql = "FROM NetworkResource WHERE modelUUID=:modelUUID";
+ Query query = getSession ().createQuery (hql);
+ query.setParameter (MODEL_UUID, modelUUID);
+
+ @SuppressWarnings("unchecked")
+ List <NetworkResource> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ return null;
+ }
+
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ return resultList.get (0);
+ } catch (Exception e) {
+ LOGGER.debug("Error trying to find Network Resource with " + modelUUID +", " + e.getMessage());
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceByModelUuid", null);
+ }
+ return null;
}
@@ -2774,26 +4475,27 @@ public class CatalogDatabase implements Closeable {
}
}
+
/**
- * Return a Network recipe that matches a given NETWORK_TYPE and ACTION
+ * Return a Network recipe that matches a given MODEL_NAME and ACTION
*
- * @param networkType
+ * @param modelName
* @param action
* @return NetworkRecipe object or null if none found
*/
- public NetworkRecipe getNetworkRecipe (String networkType, String action) {
+ public NetworkRecipe getNetworkRecipe (String modelName, String action) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get network recipe with network type " + networkType
+ LOGGER.debug ("Catalog database - get network recipe with network model name " + modelName
+ " and action "
+ action
);
try {
- String hql = "FROM NetworkRecipe WHERE networkType = :networkType AND action = :action";
+ String hql = "FROM NetworkRecipe WHERE modelName = :modelName AND action = :action";
Query query = getSession ().createQuery (hql);
- query.setParameter (NETWORK_TYPE, networkType);
+ query.setParameter (MODEL_NAME, modelName);
query.setParameter (ACTION, action);
@SuppressWarnings("unchecked")
@@ -2826,7 +4528,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug ("Catalog database - get network resource with modelCustomizationUuid " + modelCustomizationUuid);
try {
- String hql = "select n FROM NetworkResource n, NetworkResourceCustomization c WHERE n.id=c.networkResourceId and c.modelCustomizationUuid = :modelCustomizationUuid";
+ String hql = "select n FROM NetworkResource n, NetworkResourceCustomization c WHERE n.modelUUID=c.networkResourceModelUuid and c.modelCustomizationUuid = :modelCustomizationUuid";
Query query = getSession ().createQuery (hql);
query.setParameter (MODEL_CUSTOMIZATION_UUID, modelCustomizationUuid);
@@ -2841,9 +4543,12 @@ public class CatalogDatabase implements Closeable {
Collections.reverse (resultList);
return resultList.get (0);
+ } catch (Exception e) {
+ LOGGER.debug("Error trying to find Network Resource with " + modelCustomizationUuid +", " + e.getMessage());
} finally {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceBySvcNtwkRsrc", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceByModelCustUuid", null);
}
+ return null;
}
/**
@@ -2908,12 +4613,12 @@ public class CatalogDatabase implements Closeable {
* @param action
* @return VnfComponentsRecipe object or null if none found
*/
- public VnfComponentsRecipe getVnfComponentsRecipeByVfModuleId (String vfModuleId,
+ public VnfComponentsRecipe getVnfComponentsRecipeByVfModuleModelUUId (String vfModuleModelUUId,
String vnfComponentType,
String action) {
long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - get Vnf Component recipe with vfModuleId " + vfModuleId
+ LOGGER.debug ("Catalog database - get Vnf Component recipe with vfModuleModelUUId " + vfModuleModelUUId
+ " and component type "
+ vnfComponentType
+ " and action "
@@ -2921,10 +4626,10 @@ public class CatalogDatabase implements Closeable {
try {
String hql;
- hql = "FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND vnfComponentType = :vnfComponentType AND action = :action ";
+ hql = "FROM VnfComponentsRecipe WHERE vfModuleModelUUId = :vfModuleModelUUId AND vnfComponentType = :vnfComponentType AND action = :action ";
Query query = getSession ().createQuery (hql);
- query.setParameter (VF_MODULE_ID, vfModuleId);
+ query.setParameter (VF_MODULE_MODEL_UUID, vfModuleModelUUId);
query.setParameter (VNF_COMPONENT_TYPE, vnfComponentType);
query.setParameter (ACTION, action);
@@ -2939,9 +4644,36 @@ public class CatalogDatabase implements Closeable {
return resultList.get (0);
} finally {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfComponentsRecipeByVfModuleId", null);
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfComponentsRecipeByVfModuleModelUUId", null);
}
}
+
+ public List<VnfComponentsRecipe> getVnfComponentRecipes (String vfModuleModelUUId) {
+
+ StringBuilder hql = null;
+
+ hql = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleModelUUId = :vfModuleModelUUId");
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get Service recipe with vfModuleModelUUId " + vfModuleModelUUId);
+
+ Query query = getSession ().createQuery (hql.toString ());
+ query.setParameter ("vfModuleModelUUId", vfModuleModelUUId);
+
+ @SuppressWarnings("unchecked")
+ List <VnfComponentsRecipe> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service recipe not found", "CatalogDB", "getVfModuleRecipes", null);
+ return null;
+ }
+
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleRecipes", null);
+ return resultList;
+ }
@@ -2954,11 +4686,11 @@ public class CatalogDatabase implements Closeable {
try {
- if (vnfComponentDb != null) {
- this.getSession ().merge (vnfComponent);
- } else {
+ //if (vnfComponentDb != null) {
+ // this.getSession ().merge (vnfComponent);
+ //} else {
this.getSession ().save (vnfComponent);
- }
+ //}
} finally {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVnfComponent", null);
@@ -3000,6 +4732,154 @@ public class CatalogDatabase implements Closeable {
}
/**
+ * Return a VfModule record that matches a given MODEL_NAME
+ *
+ * @param modelName
+ * @return VfModule object or null if none found
+ */
+ public VfModule getVfModuleByModelUUID (String modelUUID) {
+
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug ("Catalog database - get vf module with modelUUID " + modelUUID);
+
+ try {
+ String hql;
+
+ hql = "FROM VfModule WHERE modelUUID = :modelUUID";
+
+ Query query = getSession ().createQuery (hql);
+ query.setParameter (MODEL_UUID, modelUUID);
+
+ @SuppressWarnings("unchecked")
+ List <VfModule> resultList = query.list ();
+
+ if (resultList.isEmpty ()) {
+ return null;
+ }
+ Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ Collections.reverse (resultList);
+
+ return resultList.get (0);
+ } finally {
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleByModelUUID", null);
+ }
+ }
+
+ /**
+ * Return a Service recipe that matches a given service ModelUUID and action
+ * (modelUUID) and ACTION
+ *
+ * @param modelUUID
+ * @param action
+ * @return ServiceRecipe object or null if none found
+ */
+ public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID, String action) {
+
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database - get Service recipe with modelUUID=" + modelUUID + " and action=" + action);
+
+ try {
+ String hql;
+ // based on the new SERVICE_RECIPE schema where SERVICE_MODEL_UUID == MODEL_UUID, a JOIN with the SERVICE table is no longer needed
+// hql = "SELECT new ServiceRecipe(SR.id, SR.serviceModelUUID, SR.action, SR.description, " +
+// "SR.orchestrationUri, SR.serviceParamXSD, case when SR.recipeTimeout is null then 0 else SR.recipeTimeout end, " +
+// "case when SR.serviceTimeoutInterim is null then 0 else SR.serviceTimeoutInterim end, SR.created) " +
+// "FROM Service as S RIGHT OUTER JOIN S.recipes SR " +
+// "WHERE SR.serviceModelUUID = :modelUUID AND SR.action = :action";
+ hql = "FROM ServiceRecipe WHERE serviceModelUUID = :modelUUID AND action = :action";
+ Query query = getSession().createQuery(hql);
+ query.setParameter(MODEL_UUID, modelUUID);
+ query.setParameter(ACTION, action);
+
+ @SuppressWarnings("unchecked")
+ List<ServiceRecipe> recipeResultList = query.list();
+ if (recipeResultList.isEmpty()) {
+ LOGGER.debug("Catalog database - recipeResultList is null");
+ return null;
+ }
+ Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ Collections.reverse(recipeResultList);
+ LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
+
+ return recipeResultList.get(0);
+ } finally {
+ LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipeByModelUUID", null);
+ }
+ }
+
+ /**
+ * Return a Service recipe that matches a given SERVICE_NAME_VERSION_ID
+ * (MODEL_VERSION_ID) and ACTION
+ *
+ * @param modelVersionId
+ * @param action
+ * @return ServiceRecipe object or null if none found
+ */
+ @Deprecated
+ public ServiceRecipe getServiceRecipe(String modelVersionId,
+ String action) {
+
+ long startTime = System.currentTimeMillis();
+ LOGGER.debug("Catalog database - get Service recipe with modeVersionId=" + modelVersionId
+ + " and action=" + action);
+
+ try {
+ String hql;
+ // Note: Even with the implementation of the HQL JOIN below, the code for the two separate
+ // SELECTs will be retained/commented for now in the event some subsequent JOIN issue arises
+ // 1st query to get the Service record for the given SERVICE_NAME_VERSION_ID (MODEL_VERSION_ID)
+/* hql = "FROM Service WHERE serviceNameVersionId = :serviceNameVersionId";
+ Query query = getSession().createQuery(hql);
+ query.setParameter(SERVICE_NAME_VERSION_ID, modelVersionId);
+
+ @SuppressWarnings("unchecked")
+ List<Service> serviceResultList = query.list();
+ if (serviceResultList.isEmpty()) {
+ LOGGER.debug("Catalog database - serviceResultList is null");
+ return null;
+ }
+ Collections.sort(serviceResultList, new MavenLikeVersioningComparator());
+ Collections.reverse(serviceResultList);
+ LOGGER.debug("Catalog database - serviceResultList contains " + serviceResultList.get(0).toString());
+
+ // 2nd query to get the ServiceRecipe record corresponding to the Service from the 1st query
+ hql = "FROM ServiceRecipe WHERE serviceModelUUID = :serviceModelUUID AND action = :action";
+ query = getSession().createQuery(hql);
+ // The SERVICE table 'id' field maps to the SERVICE_RECIPE table 'SERVICE_ID' field
+ query.setParameter(SERVICE_ID, serviceResultList.get(0).getId());
+ query.setParameter(ACTION, action);
+*/
+ // The following SELECT performs a JOIN across the SERVICE and SERVICE_RECIPE tables. It required a new
+ // CTR in the ServiceRecipe Class to populate that object (the other option was to parse the Object[]
+ // returned by createQuery() and manually populate the ServiceRecipe object). Two of the 'int' fields in the
+ // SERVICE_RECIPE DB schema (the timeouts) permit NULL values which required some additional code in the
+ // SELECT to generate a default of 0 (needed by the CTR) in the cases where the value is NULL.
+ hql = "SELECT new ServiceRecipe(SR.id, SR.serviceModelUUID, SR.action, SR.description, " +
+ "SR.orchestrationUri, SR.serviceParamXSD, case when SR.recipeTimeout is null then 0 else SR.recipeTimeout end, " +
+ "case when SR.serviceTimeoutInterim is null then 0 else SR.serviceTimeoutInterim end, SR.created) " +
+ "FROM Service as S RIGHT OUTER JOIN S.recipes SR " +
+ "WHERE SR.serviceModelUUID = S.id AND S.serviceNameVersionId = :serviceNameVersionId AND SR.action = :action";
+ Query query = getSession().createQuery(hql);
+ query.setParameter(MODEL_UUID, modelVersionId);
+ query.setParameter(ACTION, action);
+
+ @SuppressWarnings("unchecked")
+ List<ServiceRecipe> recipeResultList = query.list();
+ if (recipeResultList.isEmpty()) {
+ LOGGER.debug("Catalog database - recipeResultList is null");
+ return null;
+ }
+ Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ Collections.reverse(recipeResultList);
+ LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
+
+ return recipeResultList.get(0);
+ } finally {
+ LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
+ }
+ }
+
+ /**
* Return a Model recipe that matches a given MODEL_TYPE, MODEL_VERSION_ID, ACTION
* Note: This method is not currently used but was retained in the event the
* architecture moves back to a MODEL/MODEL_RECIPE structure.
@@ -3074,10 +4954,118 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis ();
Session session = this.getSession ();
+ // Query query = session.createQuery (" from ActiveRequests ");
Query query = session.createSQLQuery (" show tables ");
List<?> list = query.list();
LOGGER.debug("healthCheck CatalogDB - Successful");
return true;
}
+
+ public < E > E executeQuerySingleRow(String hql, HashMap<String, String> variables, boolean retry) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug("Catalog database - executeQuery: " + hql + (retry ? ", retry=true" : ", retry=false"));
+ Query query = getSession().createQuery(hql);
+
+ StringBuffer sb = new StringBuffer();
+ if (variables != null) {
+ for (String key : variables.keySet()) {
+ sb.append(key + "=" + variables.get(key) + "\n");
+ query.setParameter(key, variables.get(key));
+ }
+ }
+ LOGGER.debug("Variables:\n" + sb.toString());
+
+ E theObject = null;
+ try {
+ theObject = (E) query.uniqueResult ();
+ } catch (org.hibernate.NonUniqueResultException nure) {
+ LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for " + hql, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for " + hql );
+ theObject = null;
+ throw nure;
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while performing " + hql + "; he message:" + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception while performing hql=" + hql, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for hql=" + hql);
+ theObject = null;
+ if (retry) {
+ LOGGER.debug("***WILL RETRY***");
+ return this.executeQuerySingleRow(hql, variables, false);
+ } else {
+ throw he;
+ }
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while performing '" + hql + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception performing " + hql, "", "", MsoLogger.ErrorCode.DataError, "Generic exception performing " + hql);
+ theObject = null;
+ if (retry) {
+ LOGGER.debug("***WILL RETRY***");
+ return this.executeQuerySingleRow(hql, variables, false);
+ } else {
+ throw e;
+ }
+ }
+
+ if (theObject == null) {
+ LOGGER.debug("Returning null");
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "executeQuerySingleRow", null);
+ } else {
+ LOGGER.debug("Returning an Object");
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "executeQuerySingleRow", null);
+ }
+ return theObject;
+ }
+
+ public < E > List<E> executeQueryMultipleRows(String hql, HashMap<String, String> variables, boolean retry) {
+ long startTime = System.currentTimeMillis ();
+ LOGGER.debug("Catalog database - executeQuery: " + hql + (retry ? ", retry=true" : ", retry=false"));
+ Query query = getSession().createQuery(hql);
+
+ StringBuffer sb = new StringBuffer();
+ if (variables != null) {
+ for (String key : variables.keySet()) {
+ sb.append(key + "=" + variables.get(key) + "\n");
+ query.setParameter(key, variables.get(key));
+ }
+ }
+ LOGGER.debug("Variables:\n" + sb.toString());
+
+ List<E> theObjects = null;
+ try {
+ theObjects = (List<E>) query.list ();
+ } catch (org.hibernate.HibernateException he) {
+ LOGGER.debug("Hibernate Exception - while performing " + hql + "; he message:" + he.getMessage());
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception while performing hql=" + hql, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for hql=" + hql);
+ theObjects = null;
+ if (retry) {
+ LOGGER.debug("***WILL RETRY***");
+ return this.executeQuerySingleRow(hql, variables, false);
+ } else {
+ throw he;
+ }
+ } catch (Exception e) {
+ LOGGER.debug("Generic Exception - while performing '" + hql + "'");
+ LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception performing " + hql, "", "", MsoLogger.ErrorCode.DataError, "Generic exception performing " + hql);
+ theObjects = null;
+ if (retry) {
+ LOGGER.debug("***WILL RETRY***");
+ return this.executeQuerySingleRow(hql, variables, false);
+ } else {
+ throw e;
+ }
+ }
+
+ if (theObjects == null) {
+ LOGGER.debug("Returning null");
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "executeQuerySingleRow", null);
+ } else {
+ try {
+ LOGGER.debug("Returning theObjects:" + theObjects.size());
+ } catch (Exception e) {
+ LOGGER.debug("Returning theObjects");
+ }
+ LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "executeQuerySingleRow", null);
+ }
+ return theObjects;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/HibernateUtilsCatalogDb.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDbSessionFactoryManager.java
index c4069be443..fab69c5a2d 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/HibernateUtilsCatalogDb.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDbSessionFactoryManager.java
@@ -19,12 +19,12 @@
*/
package org.openecomp.mso.db.catalog;
-import org.openecomp.mso.db.HibernateUtils;
+import org.openecomp.mso.db.AbstractSessionFactoryManager;
import org.openecomp.mso.logger.MessageEnum;
import org.openecomp.mso.logger.MsoLogger;
import java.net.URL;
-public class HibernateUtilsCatalogDb extends HibernateUtils {
+public class CatalogDbSessionFactoryManager extends AbstractSessionFactoryManager {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResource.java
new file mode 100644
index 0000000000..477b688ff8
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResource.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class AllottedResource extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String modelUuid;
+ private String modelInvariantUuid;
+ private String modelVersion;
+ private String modelName;
+ private String toscaNodeType;
+ private String subcategory;
+ private String description;
+ private Timestamp created;
+
+ public AllottedResource() {
+ }
+
+ public String getModelUuid() {
+ return this.modelUuid;
+ }
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ }
+ public String getModelInvariantUuid() {
+ return this.modelInvariantUuid;
+ }
+ public void setModelInvariantUuid(String modelInvariantUuid) {
+ this.modelInvariantUuid = modelInvariantUuid;
+ }
+ public String getModelVersion() {
+ return this.modelVersion;
+ }
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+ public String getModelName() {
+ return this.modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+ public String getToscaNodeType() {
+ return this.toscaNodeType;
+ }
+ public void setToscaNodeType(String toscaNodeType) {
+ this.toscaNodeType = toscaNodeType;
+ }
+ public String getSubcategory() {
+ return this.subcategory;
+ }
+ public void setSubcategory(String subcategory) {
+ this.subcategory = subcategory;
+ }
+ public String getDescription() {
+ return this.description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Timestamp getCreated() {
+ return created;
+ }
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
index d7dd2adfa6..d9a36a1a25 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
@@ -19,20 +19,29 @@
*/
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import org.openecomp.mso.db.catalog.beans.AllottedResource;
-public class AllottedResourceCustomization extends MavenLikeVersioning {
+public class AllottedResourceCustomization extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private String modelCustomizationUuid;
- private String modelUuid;
- private String modelInvariantUuid;
- private String modelVersion = null; // duplicate of version kept in parent class
- private String modelName;
- private String description;
+ private String arModelUuid;
private Timestamp created;
private String modelInstanceName;
+ private String providingServiceModelInvariantUuid;
+ private String targetNetworkRole;
+ private String nfFunction;
+ private String nfType;
+ private String nfRole;
+ private String nfNamingCode;
+ private Integer minInstances;
+ private Integer maxInstances;
+ private AllottedResource ar = null;
public AllottedResourceCustomization() {
super();
@@ -45,32 +54,11 @@ public class AllottedResourceCustomization extends MavenLikeVersioning {
this.modelCustomizationUuid = modelCustomizationUuid;
}
- public String getModelUuid() {
- return this.modelUuid;
+ public String getArModelUuid() {
+ return this.arModelUuid;
}
- public void setModelUuid(String modelUuid) {
- this.modelUuid = modelUuid;
- }
-
- public String getModelInvariantUuid() {
- return this.modelInvariantUuid;
- }
- public void setModelInvariantUuid(String modelInvariantUuid) {
- this.modelInvariantUuid = modelInvariantUuid;
- }
-
- public String getModelName() {
- return this.modelName;
- }
- public void setModelName(String modelName) {
- this.modelName = modelName;
- }
-
- public String getDescription() {
- return this.description;
- }
- public void setDescription(String description) {
- this.description = description;
+ public void setArModelUuid(String arModelUuid) {
+ this.arModelUuid = arModelUuid;
}
public Timestamp getCreated() {
@@ -86,38 +74,74 @@ public class AllottedResourceCustomization extends MavenLikeVersioning {
public void setModelInstanceName(String modelInstanceName) {
this.modelInstanceName = modelInstanceName;
}
- public String getModelVersion() {
- return this.modelVersion;
+ public AllottedResource getAllottedResource() {
+ return this.ar;
}
- public void setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
+ public void setAllottedResource(AllottedResource ar) {
+ this.ar = ar;
+ }
+ public String getProvidingServiceModelInvariantUuid() {
+ return this.providingServiceModelInvariantUuid;
+ }
+ public void setProvidingServiceModelInvariantUuid(String providingServiceModelInvariantUuid) {
+ this.providingServiceModelInvariantUuid = providingServiceModelInvariantUuid;
+ }
+ public String getTargetNetworkRole() {
+ return this.targetNetworkRole;
+ }
+ public void setTargetNetworkRole(String targetNetworkRole) {
+ this.targetNetworkRole = targetNetworkRole;
+ }
+ public String getNfFunction() {
+ return this.nfFunction;
+ }
+ public void setNfFunction(String nfFunction) {
+ this.nfFunction = nfFunction;
+ }
+ public String getNfType() {
+ return this.nfType;
+ }
+ public void setNfType(String nfType) {
+ this.nfType = nfType;
+ }
+ public String getNfRole() {
+ return this.nfRole;
+ }
+ public void setNfRole(String nfRole) {
+ this.nfRole = nfRole;
+ }
+ public String getNfNamingCode() {
+ return this.nfNamingCode;
+ }
+ public void setNfNamingCode(String nfNamingCode) {
+ this.nfNamingCode = nfNamingCode;
+ }
+ public Integer getMinInstances() {
+ return this.minInstances;
+ }
+ public void setMinInstances(Integer minInstances) {
+ this.minInstances = minInstances;
+ }
+ public Integer getMaxInstances() {
+ return this.maxInstances;
+ }
+ public void setMaxInstances(Integer maxInstances) {
+ this.maxInstances = maxInstances;
}
-
- public String getModelInvariantId() { return "not yet implemented"; }
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
- sb.append("modelName=");
- sb.append(this.modelName);
- sb.append(",modelVersion=");
- sb.append(this.modelVersion);
- sb.append(",version=");
- sb.append(this.version);
- sb.append(",modelUuid=");
- sb.append(this.modelUuid);
- sb.append(",modelInvariantUuid=");
- sb.append(this.modelInvariantUuid);
- sb.append(",modelCustomizationUuid=");
+ sb.append("modelCustomizationUuid=");
sb.append(this.modelCustomizationUuid);
sb.append(",modelInstanceName=");
sb.append(this.modelInstanceName);
- sb.append(",description=");
- sb.append(this.description);
sb.append(",modelInstanceName=");
sb.append(this.modelInstanceName);
sb.append(",created=");
sb.append(this.created);
+ sb.append(",ar=");
+ sb.append(this.ar);
return sb.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
index a920375bcd..b7275f1a24 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
@@ -20,47 +20,37 @@
package org.openecomp.mso.db.catalog.beans;
-
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class HeatEnvironment extends MavenLikeVersioning {
- private int id;
+public class HeatEnvironment extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String artifactUuid;
private String name = null;
private String description = null;
private String environment = null;
-
- private String asdcUuid;
- private String asdcResourceName;
- private String asdcLabel;
private String artifactChecksum;
private Timestamp created;
public HeatEnvironment() {}
- public int getId() {
- return this.id;
+ public String getArtifactUuid() {
+ return this.artifactUuid;
}
-
- public void setId(int id) {
- this.id = id;
+ public void setArtifactUuid(String artifactUuid) {
+ this.artifactUuid = artifactUuid;
}
-
- /**
- * @return the name
- */
public String getName () {
return name;
}
-
- /**
- * @param name the name to set
- */
public void setName (String name) {
this.name = name;
}
@@ -79,20 +69,6 @@ public class HeatEnvironment extends MavenLikeVersioning {
this.environment = environment;
}
- public String getAsdcUuid() {
- return asdcUuid;
- }
-
- public void setAsdcUuid(String asdcUuid) {
- this.asdcUuid = asdcUuid;
- }
- public String getAsdcLabel() {
- return this.asdcLabel;
- }
- public void setAsdcLabel(String asdcLabel) {
- this.asdcLabel = asdcLabel;
- }
-
public String getArtifactChecksum() {
return artifactChecksum;
}
@@ -101,21 +77,6 @@ public class HeatEnvironment extends MavenLikeVersioning {
this.artifactChecksum = artifactChecksum;
}
- /**
- * @return the asdcResourceName
- */
- public String getAsdcResourceName () {
- return asdcResourceName;
- }
-
-
- /**
- * @param asdcResourceName the asdcResourceName to set
- */
- public void setAsdcResourceName (String asdcResourceName) {
- this.asdcResourceName = asdcResourceName;
- }
-
public Timestamp getCreated() {
return created;
}
@@ -127,22 +88,18 @@ public class HeatEnvironment extends MavenLikeVersioning {
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
- sb.append ("ID=" + this.id);
+ sb.append ("Artifact UUID=" + this.artifactUuid);
sb.append (", name=");
sb.append (name);
sb.append (", version=");
sb.append (version);
sb.append(", description=");
- sb.append (description == null ? "null" : description);
- sb.append(", environment=");
- sb.append (environment == null ? "null" : environment);
- sb.append(", asdcUuid=");
- sb.append (asdcUuid == null ? "null" : asdcUuid);
- sb.append (", asdcResourceName=");
- sb.append (asdcResourceName == null ? "null" : asdcResourceName);
- if (created != null) {
- sb.append (",created=");
- sb.append (DateFormat.getInstance().format(created));
+ sb.append (this.description == null ? "null" : this.description);
+ sb.append(", body=");
+ sb.append (this.environment == null ? "null" : this.environment);
+ if (this.created != null) {
+ sb.append (",creationTimestamp=");
+ sb.append (DateFormat.getInstance().format(this.created));
}
return sb.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
index d379c2471a..b85ff34365 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
@@ -20,32 +20,31 @@
package org.openecomp.mso.db.catalog.beans;
-
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class HeatFiles extends MavenLikeVersioning {
- private int id;
+public class HeatFiles extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String artifactUuid;
private String description = null;
private String fileName;
private String fileBody;
- private int vnfResourceId;
private Timestamp created;
- private String asdcUuid;
- private String asdcLabel;
- private String asdcResourceName;
+ private String version;
private String artifactChecksum;
public HeatFiles() {}
- public int getId() {
- return this.id;
+ public String getArtifactUuid() {
+ return this.artifactUuid;
}
-
- public void setId(int id) {
- this.id = id;
+ public void setArtifactUuid(String artifactUuid) {
+ this.artifactUuid = artifactUuid;
}
public String getDescription() {
@@ -69,13 +68,6 @@ public class HeatFiles extends MavenLikeVersioning {
this.fileBody = fileBody;
}
- public int getVnfResourceId() {
- return this.vnfResourceId;
- }
- public void setVnfResourceId(int vnfResourceId) {
- this.vnfResourceId = vnfResourceId;
- }
-
public Timestamp getCreated() {
return created;
}
@@ -85,29 +77,22 @@ public class HeatFiles extends MavenLikeVersioning {
}
public String getAsdcUuid() {
- return this.asdcUuid;
+ return this.artifactUuid;
}
- public void setAsdcUuid(String asdcUuid) {
- this.asdcUuid = asdcUuid;
+ public void setAsdcUuid(String artifactUuid) {
+ this.artifactUuid = artifactUuid;
}
- public String getAsdcLabel() {
- return this.asdcLabel;
- }
- public void setAsdcLabel(String asdcLabel) {
- this.asdcLabel = asdcLabel;
- }
- public String getAsdcResourceName() {
- return asdcResourceName;
+ public String getVersion() {
+ return version;
}
- public void setAsdcResourceName(String asdcResourceName) {
- this.asdcResourceName = asdcResourceName;
+ public void setVersion(String version) {
+ this.version = version;
}
public String getArtifactChecksum() {
return artifactChecksum;
}
-
public void setArtifactChecksum(String artifactChecksum) {
this.artifactChecksum = artifactChecksum;
}
@@ -115,7 +100,7 @@ public class HeatFiles extends MavenLikeVersioning {
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
- sb.append ("ID=" + this.id);
+ sb.append ("artifactUuid=" + this.artifactUuid);
if (this.description == null) {
sb.append(", description=null");
} else {
@@ -131,16 +116,11 @@ public class HeatFiles extends MavenLikeVersioning {
} else {
sb.append(",fileBody=" + this.fileBody);
}
- if (this.asdcResourceName == null) {
- sb.append(", asdcResourceName=null");
- } else {
- sb.append(",asdcResourceName=" + this.asdcResourceName);
- }
+ sb.append(", artifactChecksum=" + this.artifactChecksum);
if (created != null) {
sb.append (",created=");
sb.append (DateFormat.getInstance().format(created));
}
- sb.append(", vnfResourceId=" + this.vnfResourceId);
return sb.toString();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
index eabbacf547..5bdf21b716 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
@@ -25,8 +25,8 @@ import java.io.Serializable;
public class HeatNestedTemplate implements Serializable {
- private int parentTemplateId;
- private int childTemplateId;
+ private String parentTemplateId;
+ private String childTemplateId;
private String providerResourceFile;
public static final long serialVersionUID = -1322322139926390329L;
@@ -34,19 +34,19 @@ public class HeatNestedTemplate implements Serializable {
super ();
}
- public void setParentTemplateId (int parentTemplateId) {
+ public void setParentTemplateId (String parentTemplateId) {
this.parentTemplateId = parentTemplateId;
}
- public int getParentTemplateId () {
+ public String getParentTemplateId () {
return this.parentTemplateId;
}
- public void setChildTemplateId (int childTemplateId) {
+ public void setChildTemplateId (String childTemplateId) {
this.childTemplateId = childTemplateId;
}
- public int getChildTemplateId () {
+ public String getChildTemplateId () {
return this.childTemplateId;
}
@@ -91,7 +91,7 @@ public class HeatNestedTemplate implements Serializable {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
int result = 0;
- result = this.parentTemplateId + this.childTemplateId;
+ result = this.parentTemplateId.hashCode() + this.childTemplateId.hashCode();
return result;
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
index 5762837bfb..c045a7e39f 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
@@ -20,32 +20,28 @@
package org.openecomp.mso.db.catalog.beans;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
-import java.util.Date;
import java.util.Set;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
import org.openecomp.mso.logger.MsoLogger;
-public class HeatTemplate extends MavenLikeVersioning {
+public class HeatTemplate extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
- private int id;
+ private String artifactUuid;
private String templateName;
- private String templatePath = null;
private String templateBody = null;
private int timeoutMinutes;
private Set <HeatTemplateParam> parameters;
private Set <HeatNestedTemplate> files;
private String description;
private String asdcUuid;
- private String asdcResourceName;
- private String asdcLabel;
private String artifactChecksum;
private Timestamp created;
@@ -57,12 +53,12 @@ public class HeatTemplate extends MavenLikeVersioning {
public HeatTemplate () {
}
- public int getId () {
- return id;
+ public String getArtifactUuid() {
+ return this.artifactUuid;
}
- public void setId (int id) {
- this.id = id;
+ public void setArtifactUuid (String artifactUuid) {
+ this.artifactUuid = artifactUuid;
}
public String getTemplateName () {
@@ -73,14 +69,6 @@ public class HeatTemplate extends MavenLikeVersioning {
this.templateName = templateName;
}
- public String getTemplatePath () {
- return templatePath;
- }
-
- public void setTemplatePath (String templatePath) {
- this.templatePath = templatePath;
- }
-
public String getTemplateBody () {
return templateBody;
}
@@ -114,26 +102,7 @@ public class HeatTemplate extends MavenLikeVersioning {
}
public String getHeatTemplate () {
- if (templateBody != null && !templateBody.isEmpty ()) {
- // The template body is in the DB table. Just return it.
- return templateBody;
- }
-
- String body = null;
-
- try (BufferedReader reader = new BufferedReader (new FileReader (templatePath)))
- {
- String line = null;
- StringBuilder stringBuilder = new StringBuilder ();
- while ((line = reader.readLine ()) != null) {
- stringBuilder.append (line);
- }
- body = stringBuilder.toString ();
- } catch (Exception e) {
- LOGGER.debug ("Error reading template file " + templatePath, e);
- }
-
- return body;
+ return this.templateBody;
}
public void setFiles (Set <HeatNestedTemplate> files) {
@@ -152,20 +121,6 @@ public class HeatTemplate extends MavenLikeVersioning {
this.asdcUuid = asdcUuidp;
}
- public String getAsdcResourceName() {
- return asdcResourceName;
- }
-
- public void setAsdcResourceName(String asdcResourceName) {
- this.asdcResourceName = asdcResourceName;
- }
- public String getAsdcLabel() {
- return this.asdcLabel;
- }
- public void setAsdcLabel(String asdcLabel) {
- this.asdcLabel = asdcLabel;
- }
-
public String getArtifactChecksum() {
return artifactChecksum;
}
@@ -173,6 +128,7 @@ public class HeatTemplate extends MavenLikeVersioning {
public void setArtifactChecksum(String artifactChecksum) {
this.artifactChecksum = artifactChecksum;
}
+
public Timestamp getCreated() {
return created;
}
@@ -189,16 +145,12 @@ public class HeatTemplate extends MavenLikeVersioning {
.append (templateName)
.append (",version=")
.append (version)
- .append (",path=")
- .append (templatePath)
.append (",body=")
.append (body)
.append (",timeout=")
.append (timeoutMinutes)
.append (",asdcUuid=")
.append (asdcUuid)
- .append (",asdcResourceName=")
- .append (asdcResourceName)
.append (",description=")
.append (description);
if (created != null) {
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
new file mode 100644
index 0000000000..c507b3967f
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+
+// an embeddable class to represent the Composite key for NetworkResource in the 1707 db refactoring
+public class HeatTemplateArtifactUuidModelUuid implements Serializable {
+
+ private String heatTemplateArtifactUuid;
+ private String modelUuid;
+ public static final long serialVersionUID = -1322322139926390329L;
+
+ public HeatTemplateArtifactUuidModelUuid() {
+ }
+
+ public String getHeatTemplateArtifactUuid() {
+ return this.heatTemplateArtifactUuid;
+ }
+ public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
+ this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
+ }
+ public String getModelUuid() {
+ return this.modelUuid;
+ }
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid);
+ sb.append(" modelUuid=" + this.modelUuid);
+ return sb.toString();
+ }
+
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof HeatTemplateArtifactUuidModelUuid)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ HeatTemplateArtifactUuidModelUuid htaumu = (HeatTemplateArtifactUuidModelUuid) o;
+ if (htaumu.getHeatTemplateArtifactUuid().equals(this.getHeatTemplateArtifactUuid())
+ && htaumu.getModelUuid().equals(this.getModelUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ // hash code does not have to be a unique result - only that two objects that should be treated as equal
+ // return the same value. so this should work.
+ int result = 0;
+ result = this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();
+ return result;
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
index 0d77a0a4f8..939b0d1f11 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
@@ -20,29 +20,26 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
-public class HeatTemplateParam {
- private int id;
- private int heatTemplateId;
+public class HeatTemplateParam implements Serializable {
+
+ private String heatTemplateArtifactUuid;
private String paramName;
private boolean required;
private String paramType;
private String paramAlias;
+ public static final long serialVersionUID = -1322322139926390329L;
public HeatTemplateParam() {}
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
+ public String getHeatTemplateArtifactUuid() {
+ return this.heatTemplateArtifactUuid;
}
- public int getHeatTemplateId() {
- return heatTemplateId;
- }
- public void setHeatTemplateId(int heatTemplateId) {
- this.heatTemplateId = heatTemplateId;
+ public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
+ this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
}
+
public String getParamName() {
return paramName;
}
@@ -65,7 +62,6 @@ public class HeatTemplateParam {
public String getParamType() {
return paramType;
}
-
public void setParamType (String paramType) {
this.paramType = paramType;
}
@@ -73,6 +69,28 @@ public class HeatTemplateParam {
@Override
public String toString () {
- return "Param=" + paramName + ",type=" + paramType + ",required=" + required + ",paramAlias=" + paramAlias;
+ return "Param=" + paramName + ",type=" + paramType + ",required=" + required + ",paramAlias=" + paramAlias + ", heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid;
+ }
+
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof HeatTemplateParam)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ HeatTemplateParam htp = (HeatTemplateParam) o;
+ if (htp.getHeatTemplateArtifactUuid().equals(this.heatTemplateArtifactUuid) && htp.getParamName().equalsIgnoreCase(this.paramName)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ int result = 0;
+ result = this.paramName == null ? 0 : this.paramName.hashCode() + this.heatTemplateArtifactUuid == null ? 0 : this.heatTemplateArtifactUuid.hashCode();
+ return result;
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java
index 51153c912b..45d812de8b 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java
@@ -20,13 +20,16 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.util.Map;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+public class Model extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
-public class Model extends MavenLikeVersioning {
private int id;
private String modelCustomizationId;
private String modelCustomizationName;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java
index 83fb773a8c..4af501a587 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java
@@ -20,11 +20,15 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class ModelRecipe extends MavenLikeVersioning {
+public class ModelRecipe extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
private int id;
private Integer modelId;
private String action;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
index 1cd3526946..40612ad841 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
@@ -21,16 +21,19 @@
package org.openecomp.mso.db.catalog.beans;
-public class NetworkRecipe extends Recipe {
- private String networkType;
+import java.io.Serializable;
+
+public class NetworkRecipe extends Recipe implements Serializable {
+ private static final long serialVersionUID = 768026109321305392L;
+ private String modelName;
private String networkParamXSD;
public NetworkRecipe() {}
- public String getNetworkType() {
- return networkType;
+ public String getModelName() {
+ return modelName;
}
- public void setNetworkType(String networkType) {
- this.networkType = networkType;
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
}
public String getNetworkParamXSD() {
@@ -44,7 +47,7 @@ public class NetworkRecipe extends Recipe {
public String toString () {
StringBuffer sb = new StringBuffer();
sb.append(super.toString());
- sb.append (",networkType=" + networkType);
+ sb.append (",modelName=" + modelName);
sb.append (",networkParamXSD=" + networkParamXSD);
return sb.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
index be812fa346..9dbdb92b1b 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
@@ -20,44 +20,35 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-import java.sql.Timestamp;
-import java.text.DateFormat;
+public class NetworkResource extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
-public class NetworkResource extends MavenLikeVersioning {
- private int id;
- private String networkType;
private String orchestrationMode = null;
private String description = null;
- private int templateId;
private String neutronNetworkType = null;
private String aicVersionMin = null;
private String aicVersionMax = null;
-
+ private String modelName;
+ private String modelInvariantUUID;
+ private String modelVersion;
+ private String toscaNodeType;
private Timestamp created;
+ private String modelUUID;
+ private String heatTemplateArtifactUUID;
public NetworkResource() {}
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getNetworkType() {
- return networkType;
- }
- public void setNetworkType(String networkType) {
- this.networkType = networkType;
- }
-
public String getOrchestrationMode() {
return orchestrationMode;
}
+
public void setOrchestrationMode(String orchestrationMode) {
this.orchestrationMode = orchestrationMode;
}
@@ -69,14 +60,6 @@ public class NetworkResource extends MavenLikeVersioning {
this.description = description;
}
- public int getTemplateId () {
- return templateId;
- }
-
- public void setTemplateId (int templateId) {
- this.templateId = templateId;
- }
-
public String getNeutronNetworkType() {
return neutronNetworkType;
}
@@ -109,31 +92,84 @@ public class NetworkResource extends MavenLikeVersioning {
this.aicVersionMax = aicVersionMax;
}
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getModelInvariantUUID() {
+ return modelInvariantUUID;
+ }
+
+ public void setModelInvariantUUID(String modelInvariantUUID) {
+ this.modelInvariantUUID = modelInvariantUUID;
+ }
+
+ public String getToscaNodeType() {
+ return toscaNodeType;
+ }
+
+ public void setToscaNodeType(String toscaNodeType) {
+ this.toscaNodeType = toscaNodeType;
+ }
+
+ public String getModelUUID() {
+ return modelUUID;
+ }
+
+ public void setModelUUID(String modelUUID) {
+ this.modelUUID = modelUUID;
+ }
+
+ public String getHeatTemplateArtifactUUID() {
+ return heatTemplateArtifactUUID;
+ }
+
+ public void setHeatTemplateArtifactUUID(String heatTemplateArtifactUUID) {
+ this.heatTemplateArtifactUUID = heatTemplateArtifactUUID;
+ }
+
+ public String getModelVersion() {
+ return modelVersion;
+ }
+
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
- sb.append("NETWORK=");
- sb.append(networkType);
- sb.append(",version=");
- sb.append(version);
+ sb.append("NETWORK Resource:");
+ sb.append("modelVersion=");
+ sb.append(modelVersion);
sb.append(",mode=");
sb.append(orchestrationMode);
- sb.append(",template=");
- sb.append(templateId);
sb.append(",neutronType=");
sb.append(neutronNetworkType);
sb.append(",aicVersionMin=");
sb.append(aicVersionMin);
sb.append(",aicVersionMax=");
sb.append(aicVersionMax);
-
- sb.append("id=");
- sb.append(id);
+ sb.append(",modelName=");
+ sb.append(modelName);
+ sb.append(",modelInvariantUUID=");
+ sb.append(modelInvariantUUID);
+ sb.append(",toscaNodeType=");
+ sb.append(toscaNodeType);
+ sb.append(",modelUUID=");
+ sb.append(modelUUID);
+ sb.append(",heatTemplateArtifactUUID=");
+ sb.append(heatTemplateArtifactUUID);
if (created != null) {
sb.append (",created=");
sb.append (DateFormat.getInstance().format(created));
}
+
return sb.toString();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
index dc8aaadea2..aa84aeb544 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
@@ -20,56 +20,28 @@
package org.openecomp.mso.db.catalog.beans;
import java.sql.Timestamp;
+import java.io.Serializable;
-import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+public class NetworkResourceCustomization implements Serializable{
-public class NetworkResourceCustomization extends MavenLikeVersioning{
-
- private String modelCustomizationUuid;
- private String modelName;
+ // modelCustomizationUuid and networkResourceModelUuid form a composite primary key
+ private String modelCustomizationUuid = null;
+ private String networkResourceModelUuid = null;
+ public static final long serialVersionUID = -1322322139926390329L;
private String modelInstanceName;
- private String modelUuid;
- private String modelVersion;
- private String modelInvariantUuid;
- private int networkResourceId = 0;
private Timestamp created;
+ private String networkTechnology;
+ private String networkType = null;
+ private String networkScope;
+ private String networkRole;
// These fields are not in the table directly - but I'm adding them here for storage in the objects we're dealing with
private NetworkResource networkResource = null;
- private String networkType = null;
public NetworkResourceCustomization() {
super();
}
- public int getNetworkResourceId() {
- return this.networkResourceId;
- }
- public void setNetworkResourceId(int networkResourceId) {
- this.networkResourceId = networkResourceId;
- }
-
- public String getModelUuid() {
- return this.modelUuid;
- }
- public void setModelUuid(String modelUuid) {
- this.modelUuid = modelUuid;
- }
-
- public String getModelInvariantUuid() {
- return this.modelInvariantUuid;
- }
- public void setModelInvariantUuid(String modelInvariantUuid) {
- this.modelInvariantUuid = modelInvariantUuid;
- }
-
- public String getModelVersion() {
- return this.modelVersion;
- }
- public void setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
- }
-
public String getModelCustomizationUuid() {
return this.modelCustomizationUuid;
}
@@ -77,6 +49,13 @@ public class NetworkResourceCustomization extends MavenLikeVersioning{
this.modelCustomizationUuid = modelCustomizationUuid;
}
+ public String getNetworkResourceModelUuid() {
+ return this.networkResourceModelUuid;
+ }
+ public void setNetworkResourceModelUuid(String networkResourceModelUuid) {
+ this.networkResourceModelUuid = networkResourceModelUuid;
+ }
+
public String getModelInstanceName() {
return this.modelInstanceName;
}
@@ -84,13 +63,6 @@ public class NetworkResourceCustomization extends MavenLikeVersioning{
this.modelInstanceName = modelInstanceName;
}
- public String getModelName() {
- return this.modelName;
- }
- public void setModelName(String modelName) {
- this.modelName = modelName;
- }
-
public NetworkResource getNetworkResource() {
return this.networkResource;
}
@@ -107,35 +79,73 @@ public class NetworkResourceCustomization extends MavenLikeVersioning{
public Timestamp getCreated() {
return this.created;
}
- public void setCreated(Timestamp timestamp) {
+ public void setCreated(java.sql.Timestamp timestamp) {
this.created = timestamp;
}
- public String getModelInvariantId() { return "not yet implemented"; }
+ public String getNetworkTechnology() {
+ return this.networkTechnology;
+ }
+ public void setNetworkTechnology(String networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ }
+ public String getNetworkScope() {
+ return this.networkScope;
+ }
+ public void setNetworkScope(String networkScope) {
+ this.networkScope = networkScope;
+ }
+ public void setNetworkRole(String networkRole) {
+ this.networkRole = networkRole;
+ }
+ public String getNetworkRole() {
+ return this.networkRole;
+ }
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
- sb.append("modelName=");
- sb.append(this.modelName);
- sb.append("modelUuid=");
- sb.append(this.modelUuid);
- sb.append("modelUuid=");
- sb.append(this.modelUuid);
- sb.append("modelInvariantUuid=");
- sb.append(this.modelInvariantUuid);
- sb.append("modelVersion=");
- sb.append(this.modelVersion);
sb.append("modelCustomizationUuid=");
sb.append(this.modelCustomizationUuid);
+ sb.append("networkResourceModelUuid=");
+ sb.append(this.networkResourceModelUuid);
sb.append("modelInstanceName=");
sb.append(this.modelInstanceName);
- sb.append("networkResourceId=");
- sb.append(this.networkResourceId);
sb.append("networkType=");
sb.append(this.networkType);
+ sb.append("networkTechnology=");
+ sb.append(this.networkTechnology);
+ sb.append("networkScope=");
+ sb.append(this.networkScope);
+ sb.append("networkRole=");
+ sb.append(this.networkRole);
return sb.toString();
}
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof NetworkResourceCustomization)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ NetworkResourceCustomization nrc = (NetworkResourceCustomization) o;
+ if (nrc.getModelCustomizationUuid().equals(this.getModelCustomizationUuid())
+ && nrc.getNetworkResourceModelUuid().equals(this.getNetworkResourceModelUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ // hash code does not have to be a unique result - only that two objects that should be treated as equal
+ // return the same value. so this should work.
+ int result = 0;
+ result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.networkResourceModelUuid != null ? this.networkResourceModelUuid.hashCode() : 0);
+ return result;
+ }
+
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
index b0a34e6c60..365cfb03b4 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
@@ -21,12 +21,15 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class Recipe extends MavenLikeVersioning {
+public class Recipe extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private int id;
protected String action;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java
index 07fb35596e..1caa34857b 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java
@@ -20,40 +20,37 @@
package org.openecomp.mso.db.catalog.beans;
-
-
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.util.Map;
+import java.util.Set;
-public class Service extends MavenLikeVersioning {
- private int id;
- private String serviceName;
- private String description;
- private String httpMethod;
- private String serviceNameVersionId;
- private String serviceVersion;
- private Map<String,ServiceRecipe> recipes;
+public class Service extends MavenLikeVersioning implements Serializable {
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String modelName;
+ private String description;
+ private String modelUUID;
private String modelInvariantUUID;
private Timestamp created;
+ private String toscaCsarArtifactUUID;
+ private String modelVersion;
+ private String serviceType;
+ private String serviceRole;
+ private Map<String,ServiceRecipe> recipes;
+ private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
public Service() {}
- public int getId() {
- return id;
+ public String getModelName() {
+ return modelName;
}
- public void setId(int id) {
- this.id = id;
- }
-
- public String getServiceName() {
- return serviceName;
- }
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
}
public String getDescription() {
@@ -78,46 +75,75 @@ public class Service extends MavenLikeVersioning {
this.created = created;
}
- public String getHttpMethod() {
- return httpMethod;
+ public String getModelUUID() {
+ return modelUUID;
+ }
+
+ public void setModelUUID(String modelUUID) {
+ this.modelUUID = modelUUID;
}
- public void setHttpMethod(String httpMethod) {
- this.httpMethod = httpMethod;
+ public String getModelInvariantUUID() {
+ return modelInvariantUUID;
}
- public String getServiceNameVersionId() {
- return serviceNameVersionId;
+ public void setModelInvariantUUID(String modelInvariantUUID) {
+ this.modelInvariantUUID = modelInvariantUUID;
}
- public void setServiceNameVersionId(String serviceNameVersionId) {
- this.serviceNameVersionId = serviceNameVersionId;
+ public String getToscaCsarArtifactUUID() {
+ return toscaCsarArtifactUUID;
}
- public String getServiceVersion() {
- return serviceVersion;
+ public void setToscaCsarArtifactUUID(String toscaCsarArtifactUUID) {
+ this.toscaCsarArtifactUUID = toscaCsarArtifactUUID;
}
- public void setServiceVersion(String serviceVersion) {
- this.serviceVersion = serviceVersion;
+ public Set<ServiceToResourceCustomization> getServiceResourceCustomizations() {
+ return serviceResourceCustomizations;
+ }
+
+ public void setServiceResourceCustomizations(Set<ServiceToResourceCustomization> serviceResourceCustomizations) {
+ this.serviceResourceCustomizations = serviceResourceCustomizations;
}
- public String getModelInvariantUUID() {
- return modelInvariantUUID;
+ public String getModelVersion() {
+ return modelVersion;
}
- public void setModelInvariantUUID(String modelInvariantUUID) {
- this.modelInvariantUUID = modelInvariantUUID;
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ public void setServiceType(String serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ public String getServiceRole() {
+ return serviceRole;
+ }
+
+ public void setServiceRole(String serviceRole) {
+ this.serviceRole = serviceRole;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("SERVICE: id=" + id + ",name=" + serviceName + ",version=" + version + ",description=" + description+",modelInvariantUUID="+modelInvariantUUID);
+ sb.append("SERVICE: name=" + modelName + ",modelVersion=" + modelVersion + ",description=" + description+",modelInvariantUUID="+modelInvariantUUID+",toscaCsarArtifactUUID="+toscaCsarArtifactUUID+",serviceType="+serviceType+",serviceRole="+serviceRole);
for (String recipeAction : recipes.keySet()) {
ServiceRecipe recipe = recipes.get(recipeAction);
sb.append ("\n" + recipe.toString());
}
+
+ for(ServiceToResourceCustomization serviceResourceCustomization : serviceResourceCustomizations) {
+ sb.append("\n" + serviceResourceCustomization.toString());
+ }
if (created != null) {
sb.append (",created=");
sb.append (DateFormat.getInstance().format(created));
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
index 01369c4ecd..81409b112a 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
@@ -22,6 +22,7 @@ package org.openecomp.mso.db.catalog.beans;
import org.openecomp.mso.db.catalog.beans.Service;
import org.openecomp.mso.db.catalog.beans.VnfResource;
import org.openecomp.mso.db.catalog.beans.VfModule;
+import java.io.Serializable;
import java.util.ArrayList;
/*
@@ -29,12 +30,15 @@ import java.util.ArrayList;
* VnfResource, 1-n VfModule, Network TBD
*/
-public class ServiceMacroHolder {
+public class ServiceMacroHolder implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private Service service;
private ArrayList<VnfResource> vnfResources;
private ArrayList<NetworkResourceCustomization> networkResourceCustomizations;
private ArrayList<AllottedResourceCustomization> allottedResourceCustomizations;
+ private ArrayList<VnfResourceCustomization> vnfResourceCustomizations;
public ServiceMacroHolder() {
super();
@@ -42,6 +46,7 @@ public class ServiceMacroHolder {
this.vnfResources = new ArrayList<VnfResource>();
this.networkResourceCustomizations = new ArrayList<NetworkResourceCustomization>();
this.allottedResourceCustomizations = new ArrayList<AllottedResourceCustomization>();
+ this.vnfResourceCustomizations = new ArrayList<VnfResourceCustomization>();
}
public ServiceMacroHolder(Service service) {
this();
@@ -72,6 +77,23 @@ public class ServiceMacroHolder {
}
}
+ public void setVnfResourceCustomizations(ArrayList<VnfResourceCustomization> vnfResourceCustomizations) {
+ this.vnfResourceCustomizations = vnfResourceCustomizations;
+ }
+ public ArrayList<VnfResourceCustomization> getVnfResourceCustomizations() {
+ return this.vnfResourceCustomizations;
+ }
+ public void addVnfResourceCustomizations(VnfResourceCustomization vrc) {
+ if (vrc != null) {
+ if (this.vnfResourceCustomizations != null) {
+ this.vnfResourceCustomizations.add(vrc);
+ } else {
+ this.vnfResourceCustomizations = new ArrayList<VnfResourceCustomization>();
+ this.vnfResourceCustomizations.add(vrc);
+ }
+ }
+ }
+
public void setNetworkResourceCustomization(ArrayList<NetworkResourceCustomization> networkResourceCustomizations) {
this.networkResourceCustomizations = networkResourceCustomizations;
}
@@ -110,6 +132,15 @@ public class ServiceMacroHolder {
} else {
sb.append("service: null");
}
+ if (this.vnfResourceCustomizations != null && this.vnfResourceCustomizations.size() > 0) {
+ int i=0;
+ sb.append("VnfResources: ");
+ for (VnfResourceCustomization vrc : this.vnfResourceCustomizations) {
+ sb.append(", vnfResourceCustomization[" + i++ + "]:" + vrc.toString());
+ }
+ } else {
+ sb.append("none");
+ }
if (this.vnfResources != null && this.vnfResources.size() > 0) {
int i=0;
sb.append("VnfResources: ");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
index cc203ff98d..763c304a0f 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
@@ -20,48 +20,47 @@
package org.openecomp.mso.db.catalog.beans;
-
-
-
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
-import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
import java.util.Date;
+
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
import org.openecomp.mso.logger.MsoLogger;
-public class ServiceRecipe extends MavenLikeVersioning {
+public class ServiceRecipe extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
private int id;
- private int serviceId;
+ private String serviceModelUUID;
private String action;
private String description;
private String orchestrationUri;
private String serviceParamXSD;
private int recipeTimeout;
private Integer serviceTimeoutInterim;
-
private Timestamp created;
-
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
-
+
// This 'default' CTR is now needed for backward compatibility since a new CTR was added below
public ServiceRecipe() {
super();
}
-
+
// This CTR is needed by the HQL SELECT JOIN between the SERVICE and SERVICE_RECIPE tables
// in CatalogDatabase::getServiceRecipe()
- public ServiceRecipe(int id, int serviceId, String action,
- String description, String orchestrationUri,
- String serviceParamXSD, int recipeTimeout,
- int serviceTimeoutInterim, Date created) {
+ public ServiceRecipe(int id, String serviceModelUUID, String action,
+ String description, String orchestrationUri,
+ String serviceParamXSD, int recipeTimeout,
+ int serviceTimeoutInterim, Date created) {
super();
- LOGGER.debug("ServiceRecipe id=" + id + ", serviceId=" + serviceId + ", action=" + action + ", description=" + description +
+ LOGGER.debug("ServiceRecipe id=" + id + ", serviceModelUUID=" + serviceModelUUID + ", action=" + action + ", description=" + description +
", orchestrationUri=" + orchestrationUri + ", serviceParamXSD=" + serviceParamXSD +
", recipeTimeout=" + recipeTimeout + ", serviceTimeoutInterim=" + serviceTimeoutInterim + ", created=" + created);
this.id = id;
- this.serviceId = serviceId;
+ this.serviceModelUUID = serviceModelUUID;
this.action = action;
this.description = description;
this.orchestrationUri = orchestrationUri;
@@ -79,11 +78,11 @@ public class ServiceRecipe extends MavenLikeVersioning {
this.id = id;
}
- public int getServiceId() {
- return serviceId;
+ public String getServiceModelUUID() {
+ return serviceModelUUID;
}
- public void setServiceId(int serviceId) {
- this.serviceId = serviceId;
+ public void setServiceModelUUID(String serviceModelUUID) {
+ this.serviceModelUUID = serviceModelUUID;
}
public String getAction() {
@@ -128,7 +127,7 @@ public class ServiceRecipe extends MavenLikeVersioning {
public void setServiceTimeoutInterim(Integer serviceTimeoutInterim) {
this.serviceTimeoutInterim = serviceTimeoutInterim;
}
-
+
public Timestamp getCreated() {
return created;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
index 1fc93be6f5..1fb1f31b06 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
@@ -54,6 +54,31 @@ public class ServiceToAllottedResources implements Serializable {
}
@Override
+ public boolean equals(Object o) {
+ if (!(o instanceof ServiceToAllottedResources)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ ServiceToAllottedResources star = (ServiceToAllottedResources) o;
+ if (star.getArModelCustomizationUuid().equals(this.getArModelCustomizationUuid())
+ && star.getServiceModelUuid().equals(this.getServiceModelUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+
+ int code = this.arModelCustomizationUuid == null ? 0 : this.arModelCustomizationUuid.hashCode();
+ code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
+
+ return code;
+ }
+
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("serviceModelUuid=");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
index 5ea171e93b..e1b2c7c5e0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
@@ -57,6 +57,31 @@ public class ServiceToNetworks implements Serializable {
}
@Override
+ public boolean equals(Object o) {
+ if (!(o instanceof ServiceToNetworks)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ ServiceToNetworks stn = (ServiceToNetworks) o;
+ if (stn.getNetworkModelCustomizationUuid().equals(this.getNetworkModelCustomizationUuid())
+ && stn.getServiceModelUuid().equals(this.getServiceModelUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+
+ int code = this.networkModelCustomizationUuid == null ? 0 : this.networkModelCustomizationUuid.hashCode();
+ code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
+
+ return code;
+ }
+
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("ServiceToNetworks mapping: ");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java
new file mode 100644
index 0000000000..bb3dfd5c43
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+public class ServiceToResourceCustomization implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String modelType;
+ private String serviceModelUUID;
+ private Timestamp created;
+ private String resourceModelCustomizationUUID;
+
+ public ServiceToResourceCustomization() {}
+
+ public String getServiceModelUUID() {
+ return serviceModelUUID;
+ }
+
+ public void setServiceModelUUID(String serviceModelUUID) {
+ this.serviceModelUUID = serviceModelUUID;
+ }
+
+ public String getModelType() {
+ return modelType;
+ }
+
+ public void setModelType(String modelType) {
+ this.modelType = modelType;
+ }
+
+ public Timestamp getCreated() {
+ return created;
+ }
+
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ public String getResourceModelCustomizationUUID() {
+ return resourceModelCustomizationUUID;
+ }
+
+ public void setResourceModelCustomizationUUID(String resourceModelCustomizationUUID) {
+ this.resourceModelCustomizationUUID = resourceModelCustomizationUUID;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof ServiceToResourceCustomization)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ ServiceToResourceCustomization strc = (ServiceToResourceCustomization) o;
+ if (strc.getServiceModelUUID().equals(this.getServiceModelUUID())
+ && strc.getResourceModelCustomizationUUID().equals(this.getResourceModelCustomizationUUID())
+ && strc.getModelType().equals(this.getModelType())) {
+ return true;
+ }
+ return false;
+
+ }
+
+ @Override
+ public int hashCode() {
+
+ int code = this.modelType == null ? 0 : this.modelType.hashCode();
+ code += this.serviceModelUUID == null ? 0 : this.serviceModelUUID.hashCode();
+ code += this.resourceModelCustomizationUUID == null ? 0 : this.resourceModelCustomizationUUID.hashCode();
+
+ return code;
+
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("ServiceToResourceCustomization: modelType=" + modelType + ",serviceModelUUID=" + serviceModelUUID+",resourceModelCustomizationUUID="+resourceModelCustomizationUUID);
+ if (created != null) {
+ sb.append (",created=");
+ sb.append (DateFormat.getInstance().format(created));
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
new file mode 100644
index 0000000000..1b534a2979
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+
+public class TempNetworkHeatTemplateLookup implements Serializable {
+
+ private String networkResourceModelName;
+ private String heatTemplateArtifactUuid;
+ private String aicVersionMin;
+ private String aicVersionMax;
+ public static final long serialVersionUID = -1322322139926390329L;
+
+ public TempNetworkHeatTemplateLookup() {
+ super();
+ }
+
+ public String getNetworkResourceModelName() {
+ return this.networkResourceModelName;
+ }
+ public void setNetworkResourceModelName(String networkResourceModelName) {
+ this.networkResourceModelName = networkResourceModelName;
+ }
+
+ public String getHeatTemplateArtifactUuid() {
+ return this.heatTemplateArtifactUuid;
+ }
+ public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
+ this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
+ }
+ public String getAicVersionMin() {
+ return this.aicVersionMin;
+ }
+
+ public void setAicVersionMin(String aicVersionMin) {
+ this.aicVersionMin = aicVersionMin;
+ }
+
+ public String getAicVersionMax() {
+ return this.aicVersionMax;
+ }
+
+ public void setAicVersionMax(String aicVersionMax) {
+ this.aicVersionMax = aicVersionMax;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("NetworkResourceModelName=" + this.networkResourceModelName);
+ sb.append("HeatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid);
+ sb.append("aicVersionMin=" + this.aicVersionMin);
+ sb.append("aicVersionMax=" + this.aicVersionMax);
+ return sb.toString();
+ }
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof TempNetworkHeatTemplateLookup)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ TempNetworkHeatTemplateLookup tnhtl = (TempNetworkHeatTemplateLookup) o;
+ if (tnhtl.getHeatTemplateArtifactUuid().equals(this.getHeatTemplateArtifactUuid()) && tnhtl.getNetworkResourceModelName().equals(this.getNetworkResourceModelName())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ // hash code does not have to be a unique result - only that two objects that should be treated as equal
+ // return the same value. so this should work.
+ int result = 0;
+ result = (this.networkResourceModelName != null ? this.networkResourceModelName.hashCode() : 0) + (this.heatTemplateArtifactUuid != null ? this.heatTemplateArtifactUuid.hashCode() : 0);
+ return result;
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java
new file mode 100644
index 0000000000..277025ba81
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java
@@ -0,0 +1,113 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.util.Set;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class ToscaCsar extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String artifactUUID;
+ private String name;
+ private String artifactChecksum;
+ private String url;
+ private String description;
+ private Timestamp created;
+ private Set<Service> services;
+
+ public ToscaCsar() { }
+
+ public String getArtifactUUID() {
+ return artifactUUID;
+ }
+
+ public void setArtifactUUID(String artifactUUID) {
+ this.artifactUUID = artifactUUID;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getArtifactChecksum() {
+ return artifactChecksum;
+ }
+
+ public void setArtifactChecksum(String artifactChecksum) {
+ this.artifactChecksum = artifactChecksum;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Timestamp getCreated() {
+ return created;
+ }
+
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ public Set<Service> getServices() {
+ return services;
+ }
+
+ public void setServices(Set<Service> services) {
+ this.services = services;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("TOSCACSAR: artifactUUID=" + artifactUUID + ",name=" + name + ",version=" + version + ",description=" + description+",artifactChecksum="+artifactChecksum+",url="+url);
+ for (Service service : services) {
+ sb.append ("\n" + service.toString());
+ }
+ if (created != null) {
+ sb.append (",created=");
+ sb.append (DateFormat.getInstance().format(created));
+ }
+ return sb.toString();
+ }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
index 2b13a45531..40e2dac48b 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
@@ -22,73 +22,55 @@ package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class VfModule extends MavenLikeVersioning {
+public class VfModule extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
- private int id;
- private Integer vnfResourceId;
- private String type;
+ private String modelInvariantUUID;
private String modelName;
- private int isBase;
- private Integer templateId;
- private Integer environmentId;
- private Integer volTemplateId;
- private Integer volEnvironmentId;
+ private String modelVersion;
private String description;
- private String asdcUuid;
+ private int isBase;
+ private String heatTemplateArtifactUUId;
+ private String volHeatTemplateArtifactUUId;
private Timestamp created;
- private String modelInvariantUuid;
- private String modelVersion;
- private String modelCustomizationUuid = null;
- private Integer minInstances;
- private Integer maxInstances;
- private Integer initialCount;
- private String label;
- private String modelUuid;
+ private String modelUUID;
+ private String vnfResourceModelUUId;
public VfModule() {
super();
}
- public int getId(){
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
+ public String getVnfResourceModelUUId() {
+ return this.vnfResourceModelUUId;
}
- public Integer getVnfResourceId() {
- return this.vnfResourceId;
- }
- public void setVnfResourceId(Integer vnfResourceId) {
- this.vnfResourceId = vnfResourceId;
+ public void setVnfResourceModelUUId(String vnfResourceModelUUId) {
+ this.vnfResourceModelUUId = vnfResourceModelUUId;
}
public String getModelName() {
return this.modelName;
}
+
public void setModelName(String modelName) {
this.modelName = modelName;
}
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
public int getIsBase() {
return this.isBase;
}
+
public void setIsBase(int isBase) {
this.isBase = isBase;
}
+
public boolean isBase() {
if (this.isBase == 0) {
return false;
@@ -97,49 +79,22 @@ public class VfModule extends MavenLikeVersioning {
}
}
- public Integer getTemplateId() {
- return this.templateId;
- }
- public void setTemplateId(Integer templateId) {
- this.templateId = templateId;
+ public String getHeatTemplateArtifactUUId() {
+ return this.heatTemplateArtifactUUId;
}
- public Integer getEnvironmentId() {
- return this.environmentId;
- }
- public void setEnvironmentId(Integer environmentId) {
- this.environmentId = environmentId;
- }
-
- public Integer getVolTemplateId() {
- return this.volTemplateId;
- }
- public void setVolTemplateId(Integer volTemplateId) {
- this.volTemplateId = volTemplateId;
- }
-
- public Integer getVolEnvironmentId() {
- return this.volEnvironmentId;
- }
- public void setVolEnvironmentId(Integer volEnvironmentId) {
- this.volEnvironmentId = volEnvironmentId;
+ public void setHeatTemplateArtifactUUId(String heatTemplateArtifactUUId) {
+ this.heatTemplateArtifactUUId = heatTemplateArtifactUUId;
}
public String getDescription() {
return this.description;
}
+
public void setDescription(String description) {
this.description = description;
}
- public String getAsdcUuid() {
- return asdcUuid;
- }
-
- public void setAsdcUuid(String asdcUuidp) {
- this.asdcUuid = asdcUuidp;
- }
-
public Timestamp getCreated() {
return created;
}
@@ -147,111 +102,73 @@ public class VfModule extends MavenLikeVersioning {
public void setCreated(Timestamp created) {
this.created = created;
}
+
public String getModelInvariantUuid() {
- return this.modelInvariantUuid;
+ return this.modelInvariantUUID;
}
public void setModelInvariantUuid(String modelInvariantUuid) {
- this.modelInvariantUuid = modelInvariantUuid;
- }
-
-
- public String getModelVersion() {
- return this.modelVersion;
- }
- public void setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
- }
- public String getModelCustomizationUuid() {
- return this.modelCustomizationUuid;
- }
- public void setModelCustomizationUuid(String modelCustomizationUuid) {
- this.modelCustomizationUuid = modelCustomizationUuid;
- }
- public Integer getMinInstances() {
- return this.minInstances;
- }
- public void setMinInstances(Integer minInstances) {
- this.minInstances = minInstances;
- }
- public Integer getMaxInstances() {
- return this.maxInstances;
+ this.modelInvariantUUID = modelInvariantUuid;
}
- public void setMaxInstances(Integer maxInstances) {
- this.maxInstances = maxInstances;
+ public String getModelInvariantUUID() {
+ return this.modelInvariantUUID;
}
- public Integer getInitialCount() {
- return this.initialCount;
+ public void setModelInvariantUUID(String modelInvariantUuid) {
+ this.modelInvariantUUID = modelInvariantUuid;
}
- public void setInitialCount(Integer initialCount) {
- this.initialCount = initialCount;
+
+ public String getVolHeatTemplateArtifactUUId() {
+ return this.volHeatTemplateArtifactUUId;
}
- public String getLabel() {
- return this.label;
- }
- public void setLabel(String label) {
- this.label = label;
+
+ public void setVolHeatTemplateArtifactUUId(String volHeatTemplateArtifactUUId) {
+ this.volHeatTemplateArtifactUUId = volHeatTemplateArtifactUUId;
}
- // Will be fixed pending finalizing of 1707 catalog db schema changes
- public void setModelUuid(String modelUuid) {
- this.modelUuid = modelUuid;
- }
- public String getModelUuid() {
- return this.modelUuid;
+ public String getModelUUID() {
+ return modelUUID;
}
- public String getModelInvariantId() {
- return this.modelInvariantUuid;
+
+ public void setModelUUID(String modelUUID) {
+ this.modelUUID = modelUUID;
}
- public String getVfModuleType() {
- return this.type;
+
+ public String getModelVersion() {
+ return modelVersion;
}
- public String getVfModuleLabel() {
- return this.label;
+
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
}
@Override
public String toString () {
StringBuffer buf = new StringBuffer();
- buf.append("VF=");
- buf.append(this.type);
- buf.append(",modelName=");
+ buf.append("VFModule:");
+ buf.append("modelName=");
buf.append(modelName);
- buf.append(",version=");
- buf.append(version);
- buf.append(",id=");
- buf.append(this.id);
- buf.append(",vnfResourceId=");
- buf.append(this.vnfResourceId);
- buf.append(",templateId=");
- buf.append(this.templateId);
- buf.append(",envtId=");
- buf.append(this.environmentId);
- buf.append(",volTemplateId=");
- buf.append(this.volTemplateId);
- buf.append(",volEnvtId=");
- buf.append(this.volEnvironmentId);
+ buf.append(",modelVersion=");
+ buf.append(modelVersion);
+ buf.append(",vnfResourceModelUUId=");
+ buf.append(this.vnfResourceModelUUId);
+ buf.append(",heatTemplateArtifactUUId=");
+ buf.append(this.heatTemplateArtifactUUId);
buf.append(", description=");
buf.append(this.description);
- buf.append(",asdcUuid=");
- buf.append(asdcUuid);
- buf.append(",modelVersion=");
- buf.append(this.modelVersion);
- buf.append(",modelCustomizationUuid=");
- buf.append(this.modelCustomizationUuid);
- buf.append(",minInstances=");
- buf.append(this.minInstances);
- buf.append(",maxInstances=");
- buf.append(this.maxInstances);
- buf.append(",initialCount=");
- buf.append(this.initialCount);
- buf.append(",label=");
- buf.append(this.label);
+ buf.append(",volHeatTemplateArtifactUUId=");
+ buf.append(this.volHeatTemplateArtifactUUId);
+ buf.append(",isBase=");
+ buf.append(this.isBase);
+ buf.append(",modelInvariantUUID=");
+ buf.append(this.modelInvariantUUID);
+ buf.append(",modelUUID=");
+ buf.append(this.modelUUID);
if (this.created != null) {
buf.append (",created=");
buf.append (DateFormat.getInstance().format(this.created));
}
+
return buf.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java
new file mode 100644
index 0000000000..ed8980294a
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java
@@ -0,0 +1,151 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+public class VfModuleCustomization implements Serializable {
+
+ private String modelCustomizationUuid;
+ private String vfModuleModelUuid;
+ private String label;
+ private Integer minInstances;
+ private Integer maxInstances;
+ private Integer initialCount;
+ private Integer availabilityZoneCount;
+ private String heatEnvironmentArtifactUuid;
+ private String volEnvironmentArtifactUuid;
+ private Timestamp created;
+ private VfModule vfModule;
+ public static final long serialVersionUID = -1322322139926390329L;
+
+ public VfModuleCustomization() {
+ super();
+ }
+
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+ public String getVfModuleModelUuid() {
+ return this.vfModuleModelUuid;
+ }
+ public void setVfModuleModelUuid(String vfModuleModelUuid) {
+ this.vfModuleModelUuid = vfModuleModelUuid;
+ }
+ public String getHeatEnvironmentArtifactUuid() {
+ return this.heatEnvironmentArtifactUuid;
+ }
+ public void setHeatEnvironmentArtifactUuid(String heatEnvironmentArtifactUuid) {
+ this.heatEnvironmentArtifactUuid = heatEnvironmentArtifactUuid;
+ }
+ public String getVolEnvironmentArtifactUuid() {
+ return this.volEnvironmentArtifactUuid;
+ }
+ public void setVolEnvironmentArtifactUuid(String volEnvironmentArtifactUuid) {
+ this.volEnvironmentArtifactUuid = volEnvironmentArtifactUuid;
+ }
+
+ public Integer getMinInstances() {
+ return this.minInstances;
+ }
+ public void setMinInstances(Integer minInstances) {
+ this.minInstances = minInstances;
+ }
+ public Integer getMaxInstances() {
+ return this.maxInstances;
+ }
+ public void setMaxInstances(Integer maxInstances) {
+ this.maxInstances = maxInstances;
+ }
+ public Integer getInitialCount() {
+ return this.initialCount;
+ }
+ public void setInitialCount(Integer initialCount) {
+ this.initialCount = initialCount;
+ }
+ public Integer getAvailabilityZoneCount() {
+ return this.availabilityZoneCount;
+ }
+ public void setAvailabilityZoneCount(Integer availabilityZoneCount) {
+ this.availabilityZoneCount = availabilityZoneCount;
+ }
+ public Timestamp getCreated() {
+ return created;
+ }
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+ public String getLabel() {
+ return this.label;
+ }
+ public void setLabel(String label) {
+ this.label = label;
+ }
+ public VfModule getVfModule() {
+ return this.vfModule;
+ }
+ public void setVfModule(VfModule vfModule) {
+ this.vfModule = vfModule;
+ }
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("modelCustomizationUuid=" + this.modelCustomizationUuid);
+ sb.append("vfModuleModelUuid=" + this.vfModuleModelUuid);
+ sb.append("label=" + this.label);
+ sb.append("initalCount=" + this.initialCount);
+ sb.append("minInstances=" + this.minInstances);
+ sb.append("maxInstances=" + this.maxInstances);
+ sb.append("availabilityZoneCount=" + this.availabilityZoneCount);
+ sb.append("heatEnvironmentArtifactUuid=" + this.heatEnvironmentArtifactUuid);
+ sb.append("volEnvironmentArtifactUuid=" + this.volEnvironmentArtifactUuid);
+ sb.append("created=" + this.created);
+ return sb.toString();
+ }
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof VfModuleCustomization)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ VfModuleCustomization vfmc = (VfModuleCustomization) o;
+ if (vfmc.getModelCustomizationUuid().equals(this.getModelCustomizationUuid()) && vfmc.getVfModuleModelUuid().equals(this.getVfModuleModelUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ // hash code does not have to be a unique result - only that two objects that should be treated as equal
+ // return the same value. so this should work.
+ int result = 0;
+ result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.vfModuleModelUuid != null ? this.vfModuleModelUuid.hashCode() : 0);
+ return result;
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
index b0b00759f0..fa26d78dc0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
@@ -26,58 +26,33 @@ import java.io.Serializable;
public class VfModuleToHeatFiles implements Serializable {
- private int vfModuleId;
- private int heatFilesId;
+ private String vfModuleModelUuid;
+ private String heatFilesArtifactUuid;
public static final long serialVersionUID = -1322322139926390329L;
public VfModuleToHeatFiles() {
super();
}
- public int getVfModuleId() {
- return this.vfModuleId;
+ public String getVfModuleModelUuid() {
+ return this.vfModuleModelUuid;
}
- public void setVfModuleId(int vfModuleId) {
- this.vfModuleId = vfModuleId;
+ public void setVfModuleModelUuid(String vfModuleModelUuid) {
+ this.vfModuleModelUuid = vfModuleModelUuid;
}
-
- public int getHeatFilesId() {
- return this.heatFilesId;
+ public String getHeatFilesArtifactUuid() {
+ return this.heatFilesArtifactUuid;
}
- public void setHeatFilesId(int heatFilesId) {
- this.heatFilesId = heatFilesId;
+ public void setHeatFilesArtifactUuid(String heatFilesArtifactUuid) {
+ this.heatFilesArtifactUuid = heatFilesArtifactUuid;
}
@Override
public String toString () {
StringBuilder sb = new StringBuilder ();
- sb.append ("VF_MODULE_ID=" + this.vfModuleId);
- sb.append (", HEAT_FILES_ID=" + this.heatFilesId);
+ sb.append ("vfModuleModelUuid=" + this.vfModuleModelUuid);
+ sb.append (", heatFilesArtifactUuid=" + this.heatFilesArtifactUuid);
return sb.toString ();
}
- @Override
- public boolean equals (Object o) {
- if (!(o instanceof VfModuleToHeatFiles)) {
- return false;
- }
- if (this == o) {
- return true;
- }
- VfModuleToHeatFiles vmthf = (VfModuleToHeatFiles) o;
- if (vmthf.getVfModuleId() == this.getVfModuleId() && vmthf.getVfModuleId() == this.getVfModuleId()) {
- return true;
- }
- return false;
- }
-
- @Override
- public int hashCode () {
- // hash code does not have to be a unique result - only that two objects that should be treated as equal
- // return the same value. so this should work.
- int result = 0;
- result = this.vfModuleId + this.heatFilesId;
- return result;
- }
-
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
index 547b2fc70a..92e63ae84b 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
@@ -20,13 +20,16 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
-public class VnfComponentsRecipe extends Recipe {
+public class VnfComponentsRecipe extends Recipe implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
private String vnfComponentParamXSD;
private String vnfComponentType;
- private String vfModuleId;
+ private String vfModuleModelUUId;
public VnfComponentsRecipe() {}
@@ -51,12 +54,12 @@ public class VnfComponentsRecipe extends Recipe {
this.vnfComponentType = vnfComponentType;
}
- public String getVfModuleId() {
- return vfModuleId;
+ public String getVfModuleModelUUId() {
+ return vfModuleModelUUId;
}
- public void setVfModuleId(String vfModuleId) {
- this.vfModuleId = vfModuleId;
+ public void setVfModuleModelUUId(String vfModuleModelUUId) {
+ this.vfModuleModelUUId = vfModuleModelUUId;
}
@Override
@@ -66,7 +69,7 @@ public class VnfComponentsRecipe extends Recipe {
sb.append (",vnfComponentParamXSD=" + vnfComponentParamXSD);
sb.append (",serviceType=" + getServiceType ());
sb.append (",vnfComponentType=" + getVnfComponentType ());
- sb.append (",vfModuleId=" + getVfModuleId ());
+ sb.append (",vfModuleId=" + getVfModuleModelUUId());
return sb.toString();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
index 1f0cd0ab1d..075b3abbf0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
@@ -20,8 +20,11 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
-public class VnfRecipe extends Recipe {
+public class VnfRecipe extends Recipe implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
private String vnfParamXSD;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java
new file mode 100644
index 0000000000..0317653ef8
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+public class VnfResCustomToVfModuleCustom implements Serializable {
+
+ private String vnfResourceCustModelCustomizationUuid;
+ private String vfModuleCustModelCustomizationUuid;
+ private Timestamp created;
+
+ public static final long serialVersionUID = -1322322139926390329L;
+
+
+ public VnfResCustomToVfModuleCustom() {
+ super();
+ }
+ public String getVnfResourceCustModelCustomizationUuid() {
+ return this.vnfResourceCustModelCustomizationUuid;
+ }
+ public void setVnfResourceCustModelCustomizationUuid(String vnfResourceCustModelCustomizationUuid) {
+ this.vnfResourceCustModelCustomizationUuid = vnfResourceCustModelCustomizationUuid;
+ }
+ public String getVfModuleCustModelCustomizationUuid() {
+ return this.vfModuleCustModelCustomizationUuid;
+ }
+ public void setVfModuleCustModelCustomizationUuid(String vfModuleCustModelCustomizationUuid) {
+ this.vfModuleCustModelCustomizationUuid = vfModuleCustModelCustomizationUuid;
+ }
+ public Timestamp getCreated() {
+ return created;
+ }
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("vnfResourceCustModelCustomizationUuid=" + this.vnfResourceCustModelCustomizationUuid);
+ sb.append("vfModuleCustModelCustomizationUuid=" + this.vfModuleCustModelCustomizationUuid);
+ sb.append("created=" + this.created);
+ return sb.toString();
+ }
+ @Override
+ public boolean equals (Object o) {
+ if (!(o instanceof VnfResCustomToVfModuleCustom)) {
+ return false;
+ }
+ if (this == o) {
+ return true;
+ }
+ VnfResCustomToVfModuleCustom vrctvmc = (VnfResCustomToVfModuleCustom) o;
+ if (vrctvmc.getVnfResourceCustModelCustomizationUuid().equals(this.getVnfResourceCustModelCustomizationUuid()) && vrctvmc.getVfModuleCustModelCustomizationUuid().equals(this.getVfModuleCustModelCustomizationUuid())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode () {
+ // hash code does not have to be a unique result - only that two objects that should be treated as equal
+ // return the same value. so this should work.
+ int result = 0;
+ result = (this.vnfResourceCustModelCustomizationUuid != null ? this.vnfResourceCustModelCustomizationUuid.hashCode() : 0) + (this.vfModuleCustModelCustomizationUuid != null ? this.vfModuleCustModelCustomizationUuid.hashCode() : 0);
+ return result;
+ }
+
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
index fa54d00ed6..6f8ca964f0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
@@ -21,66 +21,37 @@
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.List;
import java.util.ArrayList;
-import java.util.Map;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-public class VnfResource extends MavenLikeVersioning {
-
- private int id;
- private String vnfType;
-
- private String orchestrationMode = null;
- private String description = null;
- private Integer templateId;
- private Integer environmentId = null;
-
- private Map <String, HeatFiles> heatFiles;
-
- private String asdcUuid;
-
+public class VnfResource extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String modelUuid;
+ private String modelInvariantUuid;
+ private String modelName;
+ private String toscaNodeType;
+ private String description;
+ private String orchestrationMode;
+ private String aicVersionMin;
+ private String aicVersionMax;
+ private String heatTemplateArtifactUUId;
private Timestamp created;
+ private String modelVersion;
+ private Set<VnfResourceCustomization> vnfResourceCustomizations;
+ private Set<VfModule> vfModules;
+ private List<VfModule> vfModuleList;
+ private List<VfModuleCustomization> vfModuleCustomizations;
- private String aicVersionMin = null;
- private String aicVersionMax = null;
-
- private String modelInvariantUuid = null;
- private String modelVersion = null;
-
- private String modelCustomizationName = null;
-
- private String modelName = null;
- private String serviceModelInvariantUUID = null;
- private String modelCustomizationUuid = null;
-
- private String modelUuid = null;
- private String modelInstanceName = null;
-
- private ArrayList<VfModule> vfModules;
-
- public VnfResource () {
- super();
- this.vfModules = new ArrayList<VfModule>();
- }
-
- public int getId () {
- return id;
- }
-
- public void setId (int id) {
- this.id = id;
- }
-
- public String getVnfType () {
- return vnfType;
- }
-
- public void setVnfType (String vnfType) {
- this.vnfType = vnfType;
- }
+ public VnfResource () { }
public String getOrchestrationMode () {
return orchestrationMode;
@@ -98,36 +69,19 @@ public class VnfResource extends MavenLikeVersioning {
this.description = description;
}
- public Integer getTemplateId () {
- return templateId;
- }
-
- public void setTemplateId (Integer templateId) {
- this.templateId = templateId;
- }
-
- public Integer getEnvironmentId () {
- return this.environmentId;
- }
-
- public void setEnvironmentId (Integer environmentId) {
- this.environmentId = environmentId;
+ public String getTemplateId () {
+ return heatTemplateArtifactUUId;
}
- public Map <String, HeatFiles> getHeatFiles () {
- return this.heatFiles;
+ public void setTemplateId (String heatTemplateArtifactUUId) {
+ this.heatTemplateArtifactUUId = heatTemplateArtifactUUId;
}
-
- public void setHeatFiles (Map <String, HeatFiles> heatFiles) {
- this.heatFiles = heatFiles;
+ public String getHeatTemplateArtifactUUId () {
+ return heatTemplateArtifactUUId;
}
- public String getAsdcUuid() {
- return asdcUuid;
- }
-
- public void setAsdcUuid(String asdcUuidp) {
- this.asdcUuid = asdcUuidp;
+ public void setHeatTemplateArtifactUUId (String heatTemplateArtifactUUId) {
+ this.heatTemplateArtifactUUId = heatTemplateArtifactUUId;
}
public Timestamp getCreated() {
@@ -162,76 +116,94 @@ public class VnfResource extends MavenLikeVersioning {
this.modelInvariantUuid = modelInvariantUuid;
}
- public String getModelVersion() {
- return this.modelVersion;
- }
- public void setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
+ public String getModelName() {
+ return modelName;
}
- public String getModelCustomizationName() {
- return modelCustomizationName;
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
}
- public void setModelCustomizationName(String modelCustomizationName) {
- this.modelCustomizationName = modelCustomizationName;
+ public String getModelUuid() {
+ return modelUuid;
}
- public String getModelName() {
- return modelName;
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
}
- public void setModelName(String modelName) {
- this.modelName = modelName;
+ public String getModelInvariantId() {
+ return this.modelInvariantUuid;
}
- public String getServiceModelInvariantUUID() {
- return serviceModelInvariantUUID;
+ public String getToscaNodeType() {
+ return toscaNodeType;
}
- public void setServiceModelInvariantUUID(String serviceModelInvariantUUID) {
- this.serviceModelInvariantUUID = serviceModelInvariantUUID;
+ public void setToscaNodeType(String toscaNodeType) {
+ this.toscaNodeType = toscaNodeType;
}
- public String getModelCustomizationUuid() {
- return this.modelCustomizationUuid;
+ public Set<VnfResourceCustomization> getVnfResourceCustomizations() {
+ return vnfResourceCustomizations;
}
- public void setModelCustomizationUuid(String modelCustomizationUuid) {
- this.modelCustomizationUuid = modelCustomizationUuid;
+
+ public void setVnfResourceCustomizations(Set<VnfResourceCustomization> vnfResourceCustomizations) {
+ this.vnfResourceCustomizations = vnfResourceCustomizations;
}
- public ArrayList<VfModule> getVfModules() {
- return this.vfModules;
+ public Set<VfModule> getVfModules() {
+ return vfModules;
}
- public void setVfModules(ArrayList<VfModule> vfModules) {
+
+ public void setVfModules(Set<VfModule> vfModules) {
this.vfModules = vfModules;
}
+
+ public List<VfModuleCustomization> getVfModuleCustomizations() {
+ return this.vfModuleCustomizations == null ? new ArrayList<VfModuleCustomization>() : this.vfModuleCustomizations;
+ }
+ public void setVfModuleCustomizations(ArrayList<VfModuleCustomization> vfModuleCustomizations) {
+ this.vfModuleCustomizations = vfModuleCustomizations;
+ }
+ public void addVfModuleCustomization(VfModuleCustomization vfmc) {
+ if (vfmc != null) {
+ if (this.vfModuleCustomizations != null) {
+ this.vfModuleCustomizations.add(vfmc);
+ } else {
+ this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
+ this.vfModuleCustomizations.add(vfmc);
+ }
+ }
+ }
+
public void addVfModule(VfModule vfm) {
if (vfm != null) {
if (this.vfModules != null) {
this.vfModules.add(vfm);
} else {
- this.vfModules = new ArrayList<VfModule>();
+ this.vfModules = new HashSet<VfModule>();
this.vfModules.add(vfm);
}
}
}
-
- //Placeholders for now until new design is finalized:
- public void setModelUuid(String modelUuid) {
- this.modelUuid = modelUuid;
+ public ArrayList<VfModule> getVfModuleList() {
+ if (this.vfModules == null || this.vfModules.size() < 1) {
+ return null;
}
- public String getModelUuid() {
- return this.modelUuid;
+ ArrayList<VfModule> list = new ArrayList<VfModule>();
+ for (VfModule vfm : this.vfModules) {
+ list.add(vfm);
}
- public String getModelInvariantId() {
- return this.modelInvariantUuid;
+ return list;
}
- public void setModelInstanceName(String modelInstanceName) {
- this.modelInstanceName = modelInstanceName;
+
+ public String getModelVersion() {
+ return modelVersion;
}
- public String getModelInstanceName() {
- return this.modelInstanceName;
+
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
}
@Override
@@ -239,17 +211,14 @@ public class VnfResource extends MavenLikeVersioning {
StringBuffer buf = new StringBuffer();
buf.append("VNF=");
- buf.append(vnfType);
- buf.append(",version=");
- buf.append(version);
+ buf.append(",modelVersion=");
+ buf.append(modelVersion);
buf.append(",mode=");
buf.append(orchestrationMode);
- buf.append(",template=");
- buf.append(templateId);
+ buf.append(",heatTemplateArtifactUUId=");
+ buf.append(heatTemplateArtifactUUId);
buf.append(",envtId=");
- buf.append(environmentId);
buf.append(",asdcUuid=");
- buf.append(asdcUuid);
buf.append(",aicVersionMin=");
buf.append(this.aicVersionMin);
buf.append(",aicVersionMax=");
@@ -257,28 +226,25 @@ public class VnfResource extends MavenLikeVersioning {
buf.append(",modelInvariantUuid=");
buf.append(this.modelInvariantUuid);
buf.append(",modelVersion=");
- buf.append(this.modelVersion);
buf.append(",modelCustomizationName=");
- buf.append(this.modelCustomizationName);
buf.append(",modelName=");
buf.append(this.modelName);
buf.append(",serviceModelInvariantUUID=");
- buf.append(this.serviceModelInvariantUUID);
buf.append(",modelCustomizationUuid=");
- buf.append(this.modelCustomizationUuid);
+ buf.append(",toscaNodeType=");
+ buf.append(toscaNodeType);
if (created != null) {
buf.append(",created=");
buf.append(DateFormat.getInstance().format(created));
}
- if (this.vfModules != null && this.vfModules.size() > 0) {
- buf.append("VfModules:");
- int i=0;
- for (VfModule vfm : this.vfModules) {
- buf.append("vfModule[" + i++ + "]:" + vfm.toString());
+
+ for(VnfResourceCustomization vrc : vnfResourceCustomizations) {
+ buf.append("/n" + vrc.toString());
}
- } else {
- buf.append("VfModules: NONE");
+
+ for(VfModule vfm : vfModules) {
+ buf.append("/n" + vfm.toString());
}
return buf.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
index 2bc6b3ead3..9b835d439e 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
@@ -19,27 +19,42 @@
*/
package org.openecomp.mso.db.catalog.beans;
+import java.io.Serializable;
import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
-public class VnfResourceCustomization {
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
- private String modelCustomizationUuid;
+public class VnfResourceCustomization extends MavenLikeVersioning implements Serializable {
+
+ private static final long serialVersionUID = 768026109321305392L;
+
+ private String modelCustomizationUuid = null;
private String modelInstanceName;
- private Integer ecompHomed;
- private String homingPolicy;
- private Timestamp creationTimestamp;
- private String vnfResourceModelUuid;
+ private Timestamp created;
+ private String vnfResourceModelUuid = null;
+ private String vnfResourceModelUUID;
private Integer minInstances;
private Integer maxInstances;
private Integer availabilityZoneMaxCount;
private VnfResource vnfResource;
+ private String nfFunction;
+ private String nfType;
+ private String nfRole;
+ private String nfNamingCode;
+ private List<VfModuleCustomization> vfModuleCustomizations;
+ private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
public VnfResourceCustomization() {
}
+
public String getModelCustomizationUuid() {
- return this.modelCustomizationUuid;
+ return modelCustomizationUuid;
}
+
public void setModelCustomizationUuid(String modelCustomizationUuid) {
this.modelCustomizationUuid = modelCustomizationUuid;
}
@@ -51,33 +66,25 @@ public class VnfResourceCustomization {
this.modelInstanceName = modelInstanceName;
}
- public Integer getEcompHomed() {
- return this.ecompHomed;
- }
- public void setEcompHomed(Integer ecompHomed) {
- this.ecompHomed = ecompHomed;
- }
-
- public String getHomingPolicy() {
- return this.homingPolicy;
- }
- public void setHomingPolicy(String homingPolicy) {
- this.homingPolicy = homingPolicy;
- }
-
public Timestamp getCreationTimestamp() {
- return this.creationTimestamp;
+ return this.created;
}
- public void setCreationTimestamp(Timestamp creationTimestamp) {
- this.creationTimestamp = creationTimestamp;
+ public void setCreationTimestamp(Timestamp created) {
+ this.created = created;
}
public String getVnfResourceModelUuid() {
- return this.vnfResourceModelUuid;
+ return this.vnfResourceModelUuid == null ? this.vnfResourceModelUUID : this.vnfResourceModelUuid;
}
public void setVnfResourceModelUuid(String vnfResourceModelUuid) {
this.vnfResourceModelUuid = vnfResourceModelUuid;
}
+ public String getVnfResourceModelUUID() {
+ return this.vnfResourceModelUUID;
+ }
+ public void setVnfResourceModelUUID(String vnfResourceModelUUID) {
+ this.vnfResourceModelUUID = vnfResourceModelUUID;
+ }
public Integer getMinInstances() {
return this.minInstances;
}
@@ -106,22 +113,87 @@ public class VnfResourceCustomization {
this.vnfResource = vnfResource;
}
+ public String getNfFunction() {
+ return nfFunction;
+ }
+
+ public void setNfFunction(String nfFunction) {
+ this.nfFunction = nfFunction;
+ }
+
+ public String getNfType() {
+ return nfType;
+ }
+
+ public void setNfType(String nfType) {
+ this.nfType = nfType;
+ }
+
+ public String getNfRole() {
+ return nfRole;
+ }
+
+ public void setNfRole(String nfRole) {
+ this.nfRole = nfRole;
+ }
+
+ public String getNfNamingCode() {
+ return nfNamingCode;
+ }
+
+ public void setNfNamingCode(String nfNamingCode) {
+ this.nfNamingCode = nfNamingCode;
+ }
+ public List<VfModuleCustomization> getVfModuleCustomizations() {
+ return this.vfModuleCustomizations;
+ }
+ public void setVfModuleCustomizations(ArrayList<VfModuleCustomization> vfModuleCustomizations) {
+ this.vfModuleCustomizations = vfModuleCustomizations;
+ }
+ public void addVfModuleCustomization(VfModuleCustomization vfmc) {
+ if (vfmc != null) {
+ if (this.vfModuleCustomizations != null) {
+ this.vfModuleCustomizations.add(vfmc);
+ } else {
+ this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
+ this.vfModuleCustomizations.add(vfmc);
+ }
+ }
+ }
+ public Timestamp getCreated() {
+ return created;
+ }
+
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ public Set<ServiceToResourceCustomization> getServiceResourceCustomizations() {
+ return serviceResourceCustomizations;
+ }
+
+ public void setServiceResourceCustomizations(
+ Set<ServiceToResourceCustomization> serviceResourceCustomizations) {
+ this.serviceResourceCustomizations = serviceResourceCustomizations;
+ }
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder("VnfResourceCustomization: ");
- sb.append("ModelCustUuid=" + this.modelCustomizationUuid);
+ sb.append("ModelCustUuid=" + this.modelCustomizationUuid );
sb.append(", ModelInstanceName=" + this.modelInstanceName);
- sb.append(", ecompHomed=" + this.ecompHomed);
- sb.append(", homingPolicy=" + this.homingPolicy);
- sb.append(", vnfResourceModelUuid=" + this.vnfResourceModelUuid);
- sb.append(", creationTimestamp=" + this.creationTimestamp);
+ sb.append(", vnfResourceModelUuid=" + this.vnfResourceModelUUID);
+ sb.append(", creationTimestamp=" + this.created);
sb.append(", minInstances=" + this.minInstances);
sb.append(", maxInstances=" + this.maxInstances);
sb.append(", availabilityZoneMaxCount=" + this.availabilityZoneMaxCount);
- sb.append(", vnfResource:\n" + this.vnfResource.toString());
+// sb.append(", vnfResource:\n" + this.vnfResource == null ? "null" : this.vnfResource.toString());
+ sb.append(", nfFunction=" + this.nfFunction);
+ sb.append(", nfType=" + this.nfType);
+ sb.append(", nfRole=" + this.nfRole);
+ sb.append(", nfNamingCode=" + this.nfNamingCode);
+
return sb.toString();
}
-
-
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
index df1a1cb758..d557938d4d 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
@@ -51,7 +51,7 @@ public class MavenLikeVersioning implements Serializable {
*
*/
public boolean isMoreRecentThan (String versionToCompare) {
- if (versionToCompare == null || this.version == null) {
+ if (versionToCompare == null || versionToCompare.trim().equals("") || this.version == null || this.version.trim().equals("")) {
return false;
}
String [] currentVersionArray = this.version.split("\\.");
@@ -87,7 +87,7 @@ public class MavenLikeVersioning implements Serializable {
public boolean isTheSameVersion (String versionToCompare) {
if (versionToCompare == null && this.version == null) {
return true;
- } else if (versionToCompare == null || this.version == null) {
+ } else if (versionToCompare == null || versionToCompare.trim().equals("") || this.version == null || this.version.trim().equals("")) {
return false;
}
String [] currentVersionArray = this.version.split("\\.");
diff --git a/mso-catalog-db/src/main/resources/AllottedResource.hbm.xml b/mso-catalog-db/src/main/resources/AllottedResource.hbm.xml
new file mode 100644
index 0000000000..15fe12f9b6
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/AllottedResource.hbm.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Mar 29, 2017 4:25:31 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+ <class name="org.openecomp.mso.db.catalog.beans.AllottedResource" table="ALLOTTED_RESOURCE">
+ <id name="modelUuid" type="java.lang.String" length="200">
+ <column name="MODEL_UUID" />
+ <generator class="assigned" />
+ </id>
+ <property name="modelInvariantUuid" type="java.lang.String" length="200" not-null="true">
+ <column name="MODEL_INVARIANT_UUID" />
+ </property>
+ <property name="modelVersion" type="java.lang.String" length="20" not-null="true">
+ <column name="MODEL_VERSION" />
+ </property>
+ <property name="modelName" type="java.lang.String" length="200" not-null="true">
+ <column name="MODEL_NAME" />
+ </property>
+ <property name="toscaNodeType" type="java.lang.String" length="200">
+ <column name="TOSCA_NODE_TYPE" />
+ </property>
+ <property name="subcategory" type="java.lang.String" length="200">
+ <column name="SUBCATEGORY" />
+ </property>
+ <property name="description" type="java.lang.String" length="1200">
+ <column name="DESCRIPTION" />
+ </property>
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+ <column name="CREATION_TIMESTAMP" not-null="true"/>
+ </property>
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
index 2ca823fcba..7720a933ad 100644
--- a/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
+++ b/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
@@ -25,32 +25,41 @@
<class name="org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization"
table="ALLOTTED_RESOURCE_CUSTOMIZATION">
<id name="modelCustomizationUuid" type="java.lang.String">
- <column name="MODEL_CUSTOMIZATION_UUID" length="200" not-null="true"/>
+ <column name="MODEL_CUSTOMIZATION_UUID" length="200"/>
<generator class="assigned" />
</id>
- <property name="version">
- <column name="MODEL_VERSION" length="20" not-null="true"/>
+ <property name="modelInstanceName" type="java.lang.String" length="200" not-null="true">
+ <column name="MODEL_INSTANCE_NAME" />
</property>
- <property name="modelVersion" update="false" insert="false">
- <column name="MODEL_VERSION" />
+ <property name="arModelUuid" type="java.lang.String" length="200" not-null="true">
+ <column name="AR_MODEL_UUID" />
</property>
- <property name="modelUuid" type="java.lang.String">
- <column name="MODEL_UUID" length="200" not-null="true"/>
+ <property name="providingServiceModelInvariantUuid" type="java.lang.String" length="200">
+ <column name="PROVIDING_SERVICE_MODEL_INVARIANT_UUID" />
</property>
- <property name="modelName" type="java.lang.String">
- <column name="MODEL_NAME" length="200" not-null="true"/>
+ <property name="targetNetworkRole" type="java.lang.String" length="200">
+ <column name="TARGET_NETWORK_ROLE" />
</property>
- <property name="modelInstanceName" type="java.lang.String">
- <column name="MODEL_INSTANCE_NAME" length="200" not-null="true"/>
+ <property name="nfFunction" type="java.lang.String" length="200">
+ <column name="NF_FUNCTION" />
+ </property>
+ <property name="nfType" type="java.lang.String" length="200">
+ <column name="NF_TYPE" />
+ </property>
+ <property name="nfRole" type="java.lang.String" length="200">
+ <column name="NF_ROLE" />
+ </property>
+ <property name="nfNamingCode" type="java.lang.String" length="200">
+ <column name="NF_NAMING_CODE" />
+ </property>
+ <property name="minInstances" type="java.lang.Integer">
+ <column name="MIN_INSTANCES" />
+ </property>
+ <property name="maxInstances" type="java.lang.Integer">
+ <column name="MAX_INSTANCES" />
</property>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" >
<column name="CREATION_TIMESTAMP" not-null="true"/>
</property>
- <property name="description" type="java.lang.String">
- <column name="DESCRIPTION" length="200" not-null="false" default="null"/>
- </property>
- <property name="modelInvariantUuid" type="java.lang.String">
- <column name="MODEL_INVARIANT_UUID" length="200" not-null="true"/>
- </property>
</class>
</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml b/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml
index 8e86c584d5..711b73a336 100644
--- a/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml
+++ b/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml
@@ -27,35 +27,24 @@
<meta attribute="class-description">
This class describes a HEAT Environment
</meta>
-
- <id name="id" type="int" column="id">
- <generator class="native"/>
+ <id name="artifactUuid" type="string" column="ARTIFACT_UUID" length="200">
+ <generator class="assigned" />
</id>
- <properties name="uk_heatenv" unique="true">
<property name="name" type="string" >
<column name="NAME" length="100" not-null="true"/>
</property>
<property name="version" type="string" >
<column name="VERSION" length="20" not-null="true"/>
</property>
- <property name="asdcResourceName" type="string" >
- <column name="ASDC_RESOURCE_NAME" length="100" default="'MANUAL RECORD'" not-null="true"/>
- </property>
- <property name="asdcUuid" type="string">
- <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="true"/>
- </property>
- </properties>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
<property name="environment" type="text">
- <column name="ENVIRONMENT" not-null="true"/>
+ <column name="BODY" not-null="true"/>
</property>
<property name="created" type="timestamp" generated="insert" insert="false" update="false">
<column name="CREATION_TIMESTAMP" not-null="true"/>
</property>
- <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/>
<property name="artifactChecksum" type="string">
- <column name="ARTIFACT_CHECKSUM" length="200" default="'MANUAL RECORD'" not-null="true"/>
+ <column name="ARTIFACT_CHECKSUM" length="200" default="'MANUAL RECORD'" not-null="false"/>
</property>
-
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
new file mode 100644
index 0000000000..252649c4df
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Mar 31, 2017 3:39:01 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+ <class name="org.openecomp.mso.db.catalog.beans.HeatFiles" table="HEAT_FILES">
+ <id name="artifactUuid" type="java.lang.String" length="200">
+ <column name="ARTIFACT_UUID" />
+ <generator class="assigned" />
+ </id>
+ <property name="description" type="java.lang.String" length="1200">
+ <column name="DESCRIPTION" />
+ </property>
+ <property name="fileName" type="java.lang.String" length="200" not-null="true">
+ <column name="NAME" />
+ </property>
+ <property name="version" type="java.lang.String" length="20" not-null="true">
+ <column name="VERSION" />
+ </property>
+ <property name="fileBody" type="java.lang.String" not-null="true">
+ <column name="BODY" />
+ </property>
+ <property name="created" type="java.sql.Timestamp" generated="insert" update="false" insert="false">
+ <column name="CREATION_TIMESTAMP" not-null="true"/>
+ </property>
+ <property name="artifactChecksum" type="java.lang.String" length="200" not-null="true">
+ <column name="ARTIFACT_CHECKSUM"/>
+ </property>
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml b/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml
index 90ae8ab2ea..b89a93cd96 100644
--- a/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml
+++ b/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml
@@ -27,12 +27,12 @@
</meta>
<composite-id>
- <key-property name="parentTemplateId" column="PARENT_TEMPLATE_ID" type="int" />
- <key-property name="childTemplateId" column="CHILD_TEMPLATE_ID" type="int" />
+ <key-property name="parentTemplateId" column="PARENT_HEAT_TEMPLATE_UUID" type="string" length="200"/>
+ <key-property name="childTemplateId" column="CHILD_HEAT_TEMPLATE_UUID" type="string" length="200"/>
</composite-id>
<property name="providerResourceFile" column="PROVIDER_RESOURCE_FILE" type="string" length="100"/>
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml b/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml
index b77656896e..c1866e9530 100644
--- a/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml
+++ b/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml
@@ -27,47 +27,33 @@
This class describes a HEAT template
</meta>
- <id name="id" type="int" column="id">
- <generator class="native"/>
+ <id name="artifactUuid" type="string" column="ARTIFACT_UUID" length="200">
+ <generator class="assigned" />
</id>
- <properties name="uk_template" unique="true">
<property name="templateName" type="string" >
- <column name="TEMPLATE_NAME" length="200" not-null="true"/>
+ <column name="NAME" length="200" not-null="true"/>
</property>
<property name="version" type="string" >
<column name="VERSION" length="20" not-null="true"/>
</property>
- <property name="asdcResourceName" type="string" >
- <column name="ASDC_RESOURCE_NAME" default="'MANUAL RECORD'" length="100" not-null="true"/>
- </property>
- <property name="asdcUuid" type="string" >
- <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="true"/>
- </property>
- </properties>
- <property name="templatePath" column="TEMPLATE_PATH" type="string" length="100"/>
<property name="templateBody" type="text">
- <column name="TEMPLATE_BODY" not-null="true"/>
+ <column name="BODY" not-null="true"/>
</property>
<property name="timeoutMinutes" column="TIMEOUT_MINUTES" type="int"/>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
- <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/>
- <property name="artifactChecksum" type="string">
- <column name="ARTIFACT_CHECKSUM" length="200" default="'MANUAL RECORD'" not-null="true"/>
- </property>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" >
<column name="CREATION_TIMESTAMP" not-null="true"/>
</property>
-
- <set name="parameters" cascade="all">
- <key column="HEAT_TEMPLATE_ID"/>
+ <property name="artifactChecksum" type="string">
+ <column name="ARTIFACT_CHECKSUM" length="200" default="'MANUAL RECORD'" not-null="true"/>
+ </property>
+ <set name="parameters" inverse="true" cascade="all">
+ <key column="HEAT_TEMPLATE_ARTIFACT_UUID"/>
<one-to-many class="HeatTemplateParam"/>
</set>
- <set name="files" table="HEAT_NESTED_TEMPLATE" cascade="all">
- <key column="CHILD_TEMPLATE_ID"/>
- <one-to-many class="HeatTemplate" not-found="ignore"/>
- </set>
+
</class>
@@ -76,16 +62,17 @@
This class describes an input parameter to a heat template
</meta>
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
+ <composite-id>
+ <key-property name="heatTemplateArtifactUuid" column="HEAT_TEMPLATE_ARTIFACT_UUID" type="string" />
+ <key-property name="paramName" column="PARAM_NAME" type="string" />
+ </composite-id>
<properties name="uk_heat_params" unique="true">
- <property name="heatTemplateId" type="int">
- <column name="HEAT_TEMPLATE_ID" not-null="true"/>
+ <property name="heatTemplateArtifactUuid" type="string" insert="false" update="false">
+ <column name="HEAT_TEMPLATE_ARTIFACT_UUID" not-null="true"/>
</property>
- <property name="paramName" type="string" >
- <column name="PARAM_NAME" length="100" not-null="true"/>
+ <property name="paramName" type="string" insert="false" update="false">
+ <column name="PARAM_NAME" length="100" not-null="true" />
</property>
</properties>
<property name="required" type="boolean">
@@ -94,4 +81,5 @@
<property name="paramType" column="PARAM_TYPE" type="string" length="20"/>
<property name="paramAlias" column="PARAM_ALIAS" type="string" length="45"/>
</class>
+
</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
index 28589ea639..25c5ccd827 100644
--- a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
@@ -26,14 +26,14 @@
<meta attribute="class-description">
This class describes a Network recipe
</meta>
-
+
<id name="id" type="int" column="id">
<generator class="native"/>
</id>
<properties name="uk_network_recipe" unique="true">
- <property name="networkType" type="string" >
- <column name="NETWORK_TYPE" not-null="true" length="20"/>
+ <property name="modelName" type="string" >
+ <column name="MODEL_NAME" not-null="true" length="20"/>
</property>
<property name="action" type="string" >
<column name="ACTION" not-null="true" length="20"/>
@@ -41,21 +41,21 @@
<property name="version" type="string">
<column name="VERSION_STR" not-null="true" length="20"/>
</property>
-
+
</properties>
-
+
+ <property name="serviceType" type="string" length="45">
+ <column name="SERVICE_TYPE" not-null="false" length="45"/>
+ </property>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
<property name="orchestrationUri" type="string">
<column name="ORCHESTRATION_URI" not-null="true" length="256"/>
</property>
<property name="networkParamXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/>
<property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
- <property name="serviceType" type="string" >
- <column name="SERVICE_TYPE" not-null="false" length="45" default="null"/>
- </property>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" >
<column name="CREATION_TIMESTAMP" not-null="true"/>
</property>
</class>
-
-</hibernate-mapping>
+
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
index 931db68406..b8c2f39943 100644
--- a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
@@ -27,31 +27,25 @@
This class describes a Network Resource
</meta>
- <id name="id" type="int" column="id"/>
-
- <properties name="uk_network_resource" unique="true">
- <property name="networkType" type="string" >
- <column name="NETWORK_TYPE" not-null="true" length="45"/>
- </property>
- <property name="version" type="string" >
- <column name="VERSION_STR" not-null="true" length="20"/>
- </property>
- </properties>
- <property name="orchestrationMode" column="ORCHESTRATION_MODE" type="string" length="20"/>
- <property name="description" column="DESCRIPTION" type="string" length="1200"/>
- <property name="templateId" column="TEMPLATE_ID" type="int"/>
- <property name="neutronNetworkType" type="string" >
- <column name="NEUTRON_NETWORK_TYPE" not-null="false" default="null" length="20" />
- </property>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
+ <id name="modelUUID" column="MODEL_UUID" type="string" length="200"/>
+ <property name="modelName" column="MODEL_NAME" type="string" length="200" not-null="true" />
+ <property name="modelInvariantUUID" column="MODEL_INVARIANT_UUID" type="string" length="20"/>
+ <property name="modelVersion" column="MODEL_VERSION" type="string" length="20"/>
+ <property name="toscaNodeType" column="TOSCA_NODE_TYPE" type="string" length="200"/>
+ <property name="neutronNetworkType" column="NEUTRON_NETWORK_TYPE" type="string" length="20"/>
+ <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+ <property name="orchestrationMode" column="ORCHESTRATION_MODE" type="string" length="20"/>
+ <property name="heatTemplateArtifactUUID" column="HEAT_TEMPLATE_ARTIFACT_UUID" type="string" length="200" not-null="true" />
+
<property name="aicVersionMin" type="string" >
- <column name="AIC_VERSION_MIN" not-null="true" length="20" />
+ <column name="AIC_VERSION_MIN" not-null="true" default="2.5" length="20" />
</property>
<property name="aicVersionMax" type="string">
- <column name="AIC_VERSION_MAX" not-null="false" default="null" length="20"/>
+ <column name="AIC_VERSION_MAX" not-null="false" default="2.5" length="20"/>
</property>
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/NetworkResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResourceCustomization.hbm.xml
index b8287ed122..37bb77fe77 100644
--- a/mso-catalog-db/src/main/resources/NetworkResourceCustomization.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkResourceCustomization.hbm.xml
@@ -21,34 +21,24 @@
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization" table="NETWORK_RESOURCE_CUSTOMIZATION">
-
-
- <composite-id>
- <key-property name="modelCustomizationUuid" type="java.lang.String" >
- <column name="MODEL_CUSTOMIZATION_UUID" length="200" not-null="true"/>
- </key-property>
- <key-property name="networkResourceId" type="int" >
- <column name="NETWORK_RESOURCE_ID" length="11" not-null="false" default="null" />
- </key-property>
- </composite-id>
-
- <property name="modelUuid" type="java.lang.String">
- <column name="MODEL_UUID" length="200" not-null="true"/>
+ <class name="org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization" table="NETWORK_RESOURCE_CUSTOMIZATION">
+ <id name="modelCustomizationUuid" column="MODEL_CUSTOMIZATION_UUID" type="java.lang.String" length="200"/>
+ <property name="networkResourceModelUuid" column="NETWORK_RESOURCE_MODEL_UUID" type="java.lang.String" length="200" not-null="true"/>
+ <property name="modelInstanceName" type="java.lang.String" length="200" not-null="true">
+ <column name="MODEL_INSTANCE_NAME" />
</property>
- <property name="modelName" type="java.lang.String">
- <column name="MODEL_NAME" length="200" not-null="true"/>
+ <property name="networkTechnology" type="java.lang.String" length="45">
+ <column name="NETWORK_TECHNOLOGY" />
</property>
- <property name="modelInstanceName" type="java.lang.String">
- <column name="MODEL_INSTANCE_NAME" length="200" not-null="true"/>
+ <property name="networkType" type="java.lang.String" length="45">
+ <column name="NETWORK_TYPE" />
</property>
- <property name="modelVersion" type="java.lang.String">
- <column name="MODEL_VERSION" length="20" not-null="true"/>
+ <property name="networkScope" type="java.lang.String" length="45">
+ <column name="NETWORK_SCOPE" />
</property>
- <property name="modelInvariantUuid" type="java.lang.String">
- <column name="MODEL_INVARIANT_UUID" length="200" not-null="true"/>
+ <property name="networkRole" type="java.lang.String" length="200">
+ <column name="NETWORK_ROLE" />
</property>
-
<property name="created" type="timestamp" generated="insert" update="false" insert="false" >
<column name="CREATION_TIMESTAMP" not-null="true"/>
</property>
diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml
index f6049961fd..b48c55dec7 100644
--- a/mso-catalog-db/src/main/resources/Service.hbm.xml
+++ b/mso-catalog-db/src/main/resources/Service.hbm.xml
@@ -27,67 +27,28 @@
This class describes a Service that may be orchestrated
</meta>
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
-
- <properties name="uk" unique="true">
- <property name="serviceNameVersionId" type="string" >
- <column name="SERVICE_NAME_VERSION_ID" length="50" not-null="true" default="'MANUAL_RECORD'" />
- </property>
- <property name="serviceName" column="SERVICE_NAME" type="string" length="40"/>
- </properties>
-
- <property name="version" type="string" >
- <column name="VERSION_STR" length="20" not-null="true"/>
- </property>
+ <id name="modelUUID" column="MODEL_UUID" type="string" length="200"/>
+ <property name="modelName" column="MODEL_NAME" type="string" length="200" not-null="true"/>
+ <property name="version" column="MODEL_VERSION" type="string" length="20" not-null="true"/>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
+ <property name="toscaCsarArtifactUUID" column="TOSCA_CSAR_ARTIFACT_UUID" type="string" length="200" />
- <property name="serviceVersion" column="SERVICE_VERSION" type="string" length="10"/>
- <property name="httpMethod" column="HTTP_METHOD" type="string" length="50"/>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
<property name="modelInvariantUUID" type="string">
<column name="MODEL_INVARIANT_UUID" default="'MANUAL_RECORD'" not-null="true" length="200"/>
</property>
-
- <map name="recipes" cascade="all">
- <key column="SERVICE_ID"/>
+ <property name="serviceType" column="SERVICE_TYPE" type="string" length="20"/>
+ <property name="serviceRole" column="SERVICE_ROLE" type="string" length="20"/>
+
+ <map name="recipes" inverse="true" cascade="all">
+ <key column="SERVICE_MODEL_UUID"/>
<map-key column="action" type="string"/>
<one-to-many class="ServiceRecipe"/>
</map>
- </class>
-
- <class name="ServiceRecipe" table="SERVICE_RECIPE">
- <meta attribute="class-description">
- This class describes a Service recipe
- </meta>
-
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
- <properties name="uk1_service_recipe" unique="true">
- <property name="serviceId" type="int">
- <column name="SERVICE_ID" not-null="true" length="11"/>
- </property>
- <property name="action" type="string" >
- <column name="ACTION" not-null="true" length="40"/>
- </property>
- </properties>
- <property name="version" type="string">
- <column name="VERSION_STR" not-null="false" length="20" default="null"/>
- </property>
- <property name="description" column="DESCRIPTION" type="string" length="1200"/>
- <property name="orchestrationUri" type="string">
- <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
- </property>
- <property name="serviceParamXSD" column="SERVICE_PARAM_XSD" type="string" length="2048"/>
- <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
- <property name="serviceTimeoutInterim" column="SERVICE_TIMEOUT_INTERIM" type="java.lang.Integer"/>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
+ <set name="serviceResourceCustomizations" inverse="true" cascade="all">
+ <key column="SERVICE_MODEL_UUID" not-null="true" />
+ <one-to-many class="ServiceToResourceCustomization" />
+ </set>
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/ServiceRecipe.hbm.xml b/mso-catalog-db/src/main/resources/ServiceRecipe.hbm.xml
new file mode 100644
index 0000000000..0003c37ad2
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/ServiceRecipe.hbm.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="ServiceRecipe" table="SERVICE_RECIPE">
+ <meta attribute="class-description">
+ This class describes a Service recipe
+ </meta>
+
+ <id name="id" type="int" column="id">
+ <generator class="native"/>
+ </id>
+
+ <properties name="uk1_service_recipe" unique="true">
+ <property name="serviceModelUUID" type="string" >
+ <column name="SERVICE_MODEL_UUID" not-null="true" length="200" />
+ </property>
+ <property name="action" type="string" >
+ <column name="ACTION" not-null="true" length="40" />
+ </property>
+ </properties>
+
+ <property name="orchestrationUri" type="string" column="ORCHESTRATION_URI" not-null="true" length="256"/>
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+
+ <property name="action" column="ACTION" type="string" length="20" insert="false" update="false" />
+ <property name="version" column="VERSION_STR" type="string" length="20"/>
+ <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+ <property name="serviceParamXSD" column="SERVICE_PARAM_XSD" type="string" length="2048"/>
+ <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+ <property name="serviceTimeoutInterim" column="SERVICE_TIMEOUT_INTERIM" type="java.lang.Integer"/>
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/ServiceToResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/ServiceToResourceCustomization.hbm.xml
new file mode 100644
index 0000000000..dde156c89d
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/ServiceToResourceCustomization.hbm.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="ServiceToResourceCustomization" table="SERVICE_TO_RESOURCE_CUSTOMIZATIONS">
+ <meta attribute="class-description">
+ This class describes a Service To Resource Customization
+ </meta>
+
+ <composite-id>
+ <key-property name="modelType" type="string" column="MODEL_TYPE" length="20" />
+ <key-property name="resourceModelCustomizationUUID" type="string" column="RESOURCE_MODEL_CUSTOMIZATION_UUID" length="200" />
+ </composite-id>
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+ <property name="serviceModelUUID" type="string" column="SERVICE_MODEL_UUID" length="200" not-null="true"/>
+
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/TempNetworkHeatTemplateLookup.hbm.xml b/mso-catalog-db/src/main/resources/TempNetworkHeatTemplateLookup.hbm.xml
new file mode 100644
index 0000000000..d5d210864e
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/TempNetworkHeatTemplateLookup.hbm.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="TempNetworkHeatTemplateLookup" table="TEMP_NETWORK_HEAT_TEMPLATE_LOOKUP">
+ <meta attribute="class-description">
+ This class describes a VF Module to HEAT Files Entry
+ </meta>
+
+ <id name="networkResourceModelName" column="NETWORK_RESOURCE_MODEL_NAME" type="java.lang.String" length="200"/>
+
+ <property name="heatTemplateArtifactUuid" column="HEAT_TEMPLATE_ARTIFACT_UUID" type="java.lang.String" length="200" not-null="true"/>
+ <property name="aicVersionMin" type="string" >
+ <column name="AIC_VERSION_MIN" not-null="true" length="20"/>
+ </property>
+ <property name="aicVersionMax" type="string" >
+ <column name="AIC_VERSION_MAX" not-null="false" length="20"/>
+ </property>
+
+
+ </class>
+
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/ToscaCsar.hbm.xml b/mso-catalog-db/src/main/resources/ToscaCsar.hbm.xml
new file mode 100644
index 0000000000..9ffb7824cf
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/ToscaCsar.hbm.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="ToscaCsar" table="TOSCA_CSAR">
+ <meta attribute="class-description">
+ This class describes a Tosca Csar
+ </meta>
+
+ <id name="artifactUUID" column="ARTIFACT_UUID" type="string" length="200"/>
+ <property name="name" column="NAME" type="string" length="200" not-null="true"/>
+ <property name="version" column="VERSION" type="string" length="20" not-null="true"/>
+ <property name="artifactChecksum" column="ARTIFACT_CHECKSUM" type="string" length="200" not-null="true"/>
+ <property name="url" column="URL" type="string" length="200" not-null="true"/>
+ <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+
+ <set name="services" inverse="true" cascade="all">
+ <key column="TOSCA_CSAR_ARTIFACT_UUID" not-null="true" />
+ <one-to-many class="Service" />
+ </set>
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VfModule.hbm.xml b/mso-catalog-db/src/main/resources/VfModule.hbm.xml
index 1631057bfd..16f3d399ee 100644
--- a/mso-catalog-db/src/main/resources/VfModule.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VfModule.hbm.xml
@@ -24,69 +24,19 @@
<!-- Generated Apr 28, 2016 2:44:06 PM by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
<class name="VfModule" table="VF_MODULE">
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
- <property name="asdcUuid" type="java.lang.String" >
- <column name="ASDC_UUID" not-null="false" length="200" default="null"/>
- </property>
- <property name="volEnvironmentId" type="java.lang.Integer" >
- <column name="VOL_ENVIRONMENT_ID" not-null="false" length="11" default="null"/>
- </property>
- <properties name="uk_vfmodule" unique="true">
- <property name="type" type="string" >
- <column name="TYPE" not-null="true" length="200"/>
- </property>
- <property name="version" type="string">
- <column name="ASDC_SERVICE_MODEL_VERSION" not-null="true" length="20"/>
- </property>
- </properties>
- <property name="modelCustomizationUuid" type="java.lang.String" >
- <column name="MODEL_CUSTOMIZATION_UUID" not-null="false" length="200"/>
- </property>
- <property name="modelName" type="string" >
- <column name="MODEL_NAME" not-null="true" length="200"/>
- </property>
- <property name="modelVersion" type="string" >
- <column name="MODEL_VERSION" not-null="true" length="20"/>
- </property>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
- <property name="description" type="java.lang.String" >
- <column name="DESCRIPTION" not-null="false" length="255" default="null"/>
- </property>
- <property name="volTemplateId" type="java.lang.Integer" >
- <column name="VOL_TEMPLATE_ID" not-null="false" default="null" length="11"/>
- </property>
- <property name="templateId" type="java.lang.Integer" >
- <column name="TEMPLATE_ID" not-null="false" length="11" default="null"/>
- </property>
- <property name="vnfResourceId" type="java.lang.Integer" >
- <column name="VNF_RESOURCE_ID" not-null="true" length="11"/>
- </property>
- <property name="isBase" type="int">
- <column name="IS_BASE" not-null="true" length="11"/>
- </property>
- <property name="environmentId" type="java.lang.Integer" >
- <column name="ENVIRONMENT_ID" not-null="false"/>
- </property>
- <property name="modelInvariantUuid" type="java.lang.String" >
- <column name="MODEL_INVARIANT_UUID" not-null="false" length="200" default="null"/>
- </property>
+ <id name="modelUUID" type="string" column="MODEL_UUID" length="200" />
+
+ <property name="vnfResourceModelUUId" type="string" column="VNF_RESOURCE_MODEL_UUID" length="200" />
+ <property name="modelInvariantUUID" type="string" column="MODEL_INVARIANT_UUID" length="200"/>
+ <property name="version" type="string" column="MODEL_VERSION" length="20" not-null="true"/>
+ <property name="modelName" type="string" column="MODEL_NAME" length="200" not-null="true" />
+ <property name="description" type="string" column="DESCRIPTION" length="1200"/>
+ <property name="isBase" type="int" column="IS_BASE" not-null="true"/>
+ <property name="heatTemplateArtifactUUId" type="string" column="HEAT_TEMPLATE_ARTIFACT_UUID" length="200" not-null="true" />
+ <property name="volHeatTemplateArtifactUUId" type="string" column="VOL_HEAT_TEMPLATE_ARTIFACT_UUID" length="200" />
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column ="CREATION_TIMESTAMP" not-null="true"/>
- <property name="minInstances" type="java.lang.Integer" >
- <column name="MIN_INSTANCES" not-null="false" length="11" default="0"/>
- </property>
- <property name="maxInstances" type="java.lang.Integer" >
- <column name="MAX_INSTANCES" not-null="false" length="11" default="null"/>
- </property>
- <property name="initialCount" type="java.lang.Integer" >
- <column name="INITIAL_COUNT" not-null="false" length="11" default="0"/>
- </property>
- <property name="label" type="java.lang.String" >
- <column name="LABEL" not-null="false" length="200" default="null"/>
- </property>
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/VfModuleCustomization.hbm.xml b/mso-catalog-db/src/main/resources/VfModuleCustomization.hbm.xml
new file mode 100644
index 0000000000..2bf5be2501
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/VfModuleCustomization.hbm.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="VfModuleCustomization" table="VF_MODULE_CUSTOMIZATION">
+
+ <id name="modelCustomizationUuid" type="string" column="MODEL_CUSTOMIZATION_UUID" length="200">
+ </id>
+
+ <property name="vfModuleModelUuid" column="VF_MODULE_MODEL_UUID" type="java.lang.String" length="200" not-null="true"/>
+
+ <property name="volEnvironmentArtifactUuid" type="java.lang.String">
+ <column name="VOL_ENVIRONMENT_ARTIFACT_UUID" length="200" not-null="false" />
+ </property>
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+ <column name="CREATION_TIMESTAMP" not-null="true"/>
+ </property>
+
+ <property name="heatEnvironmentArtifactUuid" type="java.lang.String">
+ <column name="HEAT_ENVIRONMENT_ARTIFACT_UUID" length="200" not-null="false" />
+ </property>
+ <property name="minInstances" type="java.lang.Integer" >
+ <column name="MIN_INSTANCES" not-null="false"/>
+ </property>
+ <property name="maxInstances" type="java.lang.Integer" >
+ <column name="MAX_INSTANCES" not-null="false"/>
+ </property>
+ <property name="initialCount" type="java.lang.Integer" >
+ <column name="INITIAL_COUNT" not-null="false"/>
+ </property>
+ <property name="availabilityZoneCount" type="java.lang.Integer" >
+ <column name="AVAILABILITY_ZONE_COUNT" not-null="false"/>
+ </property>
+ <property name="label" type="java.lang.String" >
+ <column name="LABEL" not-null="false" length="200"/>
+ </property>
+
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml b/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml
index 9af02d866a..b8498be13b 100644
--- a/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml
@@ -27,10 +27,10 @@
</meta>
<composite-id>
- <key-property name="vfModuleId" column="VF_MODULE_ID" type="int" />
- <key-property name="heatFilesId" column="HEAT_FILES_ID" type="int" />
+ <key-property name="vfModuleModelUuid" column="VF_MODULE_MODEL_UUID" type="java.lang.String" length="200"/>
+ <key-property name="heatFilesArtifactUuid" column="HEAT_FILES_ARTIFACT_UUID" type="java.lang.String" length="200"/>
</composite-id>
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
index 6297e1c52f..69a3a456a1 100644
--- a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
@@ -32,16 +32,14 @@
</id>
<properties name="uk_vnf_component_recipe" unique="true">
<property name="vnfType" column="VNF_TYPE" type="string" length="200"/>
+ <property name="vfModuleModelUUId" column="VF_MODULE_MODEL_UUID" type="string" length="100" not-null="false"/>
<property name="vnfComponentType" type="string">
<column name="VNF_COMPONENT_TYPE" not-null="true" length="45"/>
</property>
- <property name="vfModuleId" column="VF_MODULE_ID" type="string" length="100" not-null="false"/>
<property name="action" type="string">
<column name="ACTION" not-null="true" length="20"/>
</property>
- <property name="serviceType" type="string">
- <column name="SERVICE_TYPE" not-null="false" length="45" default="null"/>
- </property>
+ <property name="serviceType" column="SERVICE_TYPE" type="string" length="45"/>
<property name="version" column="VERSION" type="string" length="20"/>
</properties>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
diff --git a/mso-catalog-db/src/main/resources/VnfResCustomToVfModuleCustom.hbm.xml b/mso-catalog-db/src/main/resources/VnfResCustomToVfModuleCustom.hbm.xml
new file mode 100644
index 0000000000..77d1dfe64f
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/VnfResCustomToVfModuleCustom.hbm.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="VnfResCustomToVfModuleCustom" table="VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM">
+ <meta attribute="class-description">
+ This class maps two UUIDs
+ </meta>
+
+ <composite-id>
+ <key-property name="vnfResourceCustModelCustomizationUuid" column="VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID" type="java.lang.String" length="200"/>
+ <key-property name="vfModuleCustModelCustomizationUuid" column="VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID" type="java.lang.String" length="200"/>
+ </composite-id>
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+ <column name="CREATION_TIMESTAMP" not-null="true"/>
+ </property>
+
+ </class>
+
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfResource.hbm.xml b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
index 2fc47009d7..85b9e2a751 100644
--- a/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
@@ -27,110 +27,26 @@
This class describes a VNF Resource
</meta>
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
- <properties name="uk1" unique="true">
- <property name="vnfType" type="string" >
- <column name="VNF_TYPE" not-null="true" length="200"/>
- </property>
- <property name="version" type="string" >
- <column name="ASDC_SERVICE_MODEL_VERSION" not-null="true" length="20"/>
- </property>
- <property name="serviceModelInvariantUUID" type="string" >
- <column name="SERVICE_MODEL_INVARIANT_UUID" not-null="false" length="200"/>
- </property>
- </properties>
- <property name="modelCustomizationName" type="string" >
- <column name="MODEL_CUSTOMIZATION_NAME" not-null="false" length="200"/>
- </property>
- <property name="orchestrationMode" type="string" >
- <column name="ORCHESTRATION_MODE" not-null="true" length="20"/>
- </property>
- <property name="description" type="string" >
- <column name="DESCRIPTION" not-null="false" length="1200"/>
- </property>
-
- <property name="templateId" type="int" not-null="false">
- <column name="TEMPLATE_ID" not-null="false"/>
- </property>
- <property name="environmentId" type="int">
- <column name="ENVIRONMENT_ID" not-null="false"/>
- </property>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
- <property name="asdcUuid" type="string" >
- <column name="ASDC_UUID" not-null="false" length="200"/>
- </property>
- <property name="aicVersionMin" type="string" >
- <column name="AIC_VERSION_MIN" not-null="false" length="20"/>
- </property>
- <property name="aicVersionMax" type="string" >
- <column name="AIC_VERSION_MAX" not-null="false" length="20"/>
- </property>
- <property name="modelInvariantUuid" type="string" >
- <column name="MODEL_INVARIANT_UUID" not-null="false" length="200"/>
- </property>
- <property name="modelVersion" type="string" >
- <column name="MODEL_VERSION" not-null="true" length="20"/>
- </property>
- <property name="modelName" type="string" >
- <column name="MODEL_NAME" not-null="false" length="200"/>
- </property>
- <property name="modelCustomizationUuid" type="string" >
- <column name="MODEL_CUSTOMIZATION_UUID" not-null="false" length="255"/>
- </property>
- <map name="heatFiles" cascade="all">
- <key column="VNF_RESOURCE_ID" foreign-key="none"/>
- <map-key column="FILE_NAME" type="string"/>
- <one-to-many class="HeatFiles"/>
- </map>
-
- </class>
-
- <class name="HeatFiles" table="HEAT_FILES">
- <meta attribute="class-description">
- This class describes a HEAT Template File
- </meta>
-
- <id name="id" type="int" column="id">
- <generator class="native"/>
- </id>
- <property name="description" type="string" >
- <column name="DESCRIPTION" not-null="false" length="1200" default="null"/>
- </property>
- <properties name="uk_heat_files" unique="true">
- <property name="fileName" type="string" >
- <column name="FILE_NAME" not-null="true" length="200"/>
- </property>
- <property name="asdcResourceName" type="string" >
- <column name="ASDC_RESOURCE_NAME" not-null="true" length="100"/>
- </property>
- <property name="version" type="string" >
- <column name="VERSION" not-null="true" length="20"/>
- </property>
- <property name="asdcUuid" type="string" >
- <column name="ASDC_UUID" not-null="false" length="200" default="'MANUAL RECORD'"/>
- </property>
- </properties>
-
- <property name="fileBody" type="text">
- <column name="FILE_BODY" not-null="true"/>
- </property>
- <property name="vnfResourceId" type="int">
- <column name="VNF_RESOURCE_ID" not-null="false" length="11" default="null"/>
- </property>
- <property name="created" type="timestamp" generated="insert" update="false" insert="false">
- <column name="CREATION_TIMESTAMP" not-null="true"/>
- </property>
- <property name="asdcLabel" type="string" >
- <column name="ASDC_LABEL" not-null="false" length="200"/>
- </property>
- <property name="artifactChecksum" type="string">
- <column name="ARTIFACT_CHECKSUM" length="200" default="'MANUAL RECORD'" not-null="true"/>
- </property>
-
+ <id name="modelUuid" type="string" column="MODEL_UUID" length="200"/>
+ <property name="modelInvariantUuid" type="string" column="MODEL_INVARIANT_UUID" length="200"/>
+ <property name="version" type="string" column="MODEL_VERSION" length="20" not-null="true"/>
+ <property name="modelName" type="string" column="MODEL_NAME" length="200"/>
+ <property name="toscaNodeType" type="string" column="TOSCA_NODE_TYPE" length="200"/>
+ <property name="description" type="string" column="DESCRIPTION" length="1200"/>
+ <property name="orchestrationMode" type="string" column="ORCHESTRATION_MODE" length="20" not-null="true"/>
+ <property name="aicVersionMin" type="string" column="AIC_VERSION_MIN" length="20"/>
+ <property name="aicVersionMax" type="string" column="AIC_VERSION_MAX" length="20"/>
+ <property name="heatTemplateArtifactUUId" type="string" column="HEAT_TEMPLATE_ARTIFACT_UUID" length="200" />
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+
+ <set name="vnfResourceCustomizations" inverse="true" access="field" cascade="all">
+ <key column="VNF_RESOURCE_MODEL_UUID" not-null="true" />
+ <one-to-many class="VnfResourceCustomization" />
+ </set>
+
+ <set name="vfModules" inverse="true" cascade="all">
+ <key column="VNF_RESOURCE_MODEL_UUID" not-null="true" />
+ <one-to-many class="VfModule" />
+ </set>
</class>
-
</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml
new file mode 100644
index 0000000000..a3e738bbed
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP MSO
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="VnfResourceCustomization" table="VNF_RESOURCE_CUSTOMIZATION">
+ <meta attribute="class-description">
+ This class describes a VNF Resource Customization
+ </meta>
+
+ <id name="modelCustomizationUuid" column="MODEL_CUSTOMIZATION_UUID" type="string" length="200"/>
+
+ <property name="modelInstanceName" column="MODEL_INSTANCE_NAME" type="string" length="200" not-null="true"/>
+ <property name="minInstances" column="MIN_INSTANCES" type="int" length="11"/>
+ <property name="maxInstances" column="MAX_INSTANCES" type="int" length="11"/>
+ <property name="availabilityZoneMaxCount" column="AVAILABILITY_ZONE_MAX_COUNT" type="int" length="11"/>
+ <property name="nfFunction" column="NF_FUNCTION" type="string" length="200"/>
+ <property name="nfType" column="NF_TYPE" type="string" length="200"/>
+ <property name="nfRole" column="NF_ROLE" type="string" length="200"/>
+ <property name="nfNamingCode" column="NF_NAMING_CODE" type="string" length="200"/>
+ <property name="vnfResourceModelUuid" column="VNF_RESOURCE_MODEL_UUID" type="string" length="200" not-null="true" />
+
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" column="CREATION_TIMESTAMP" not-null="true"/>
+
+ <set name="serviceResourceCustomizations" inverse="true" cascade="all">
+ <key column="SERVICE_MODEL_UUID" not-null="true" />
+ <one-to-many class="ServiceToResourceCustomization" />
+ </set>
+ </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/hibernate-catalog-core-mysql.cfg.xml b/mso-catalog-db/src/main/resources/hibernate-catalog-core-mysql.cfg.xml
index 306dfc6d0b..dd470a5442 100644
--- a/mso-catalog-db/src/main/resources/hibernate-catalog-core-mysql.cfg.xml
+++ b/mso-catalog-db/src/main/resources/hibernate-catalog-core-mysql.cfg.xml
@@ -35,18 +35,31 @@
<property name="hibernate.c3p0.max_statements">50</property>
<!-- <property name="hibernate.hbm2ddl.auto">create</property> -->
-
- <mapping resource="VnfResource.hbm.xml"/>
- <mapping resource="VnfRecipe.hbm.xml"/>
- <mapping resource="HeatTemplate.hbm.xml"/>
- <mapping resource="Service.hbm.xml"/>
- <mapping resource="NetworkResource.hbm.xml"/>
- <mapping resource="NetworkRecipe.hbm.xml"/>
+ <mapping resource="AllottedResource.hbm.xml"/>
+ <mapping resource="AllottedResourceCustomization.hbm.xml"/>
<mapping resource="HeatEnvironment.hbm.xml"/>
+ <mapping resource="HeatFiles.hbm.xml"/>
<mapping resource="HeatNestedTemplate.hbm.xml"/>
- <mapping resource="VnfComponent.hbm.xml"/>
- <mapping resource="VnfComponentsRecipe.hbm.xml"/>
+ <mapping resource="HeatTemplate.hbm.xml"/>
+ <mapping resource="ModelRecipe.hbm.xml"/>
+ <mapping resource="NetworkRecipe.hbm.xml"/>
+ <mapping resource="NetworkResource.hbm.xml"/>
+ <mapping resource="NetworkResourceCustomization.hbm.xml"/>
+ <mapping resource="Service.hbm.xml"/>
+ <mapping resource="ServiceRecipe.hbm.xml"/>
+ <mapping resource="ServiceToAllottedResources.hbm.xml"/>
+ <mapping resource="ServiceToNetworks.hbm.xml"/>
+ <mapping resource="ServiceToResourceCustomization.hbm.xml"/>
+ <mapping resource="TempNetworkHeatTemplateLookup.hbm.xml"/>
+ <mapping resource="ToscaCsar.hbm.xml"/>
<mapping resource="VfModule.hbm.xml"/>
+ <mapping resource="VfModuleCustomization.hbm.xml"/>
<mapping resource="VfModuleToHeatFiles.hbm.xml"/>
+ <mapping resource="VnfComponent.hbm.xml"/>
+ <mapping resource="VnfComponentsRecipe.hbm.xml"/>
+ <mapping resource="VnfRecipe.hbm.xml"/>
+ <mapping resource="VnfResCustomToVfModuleCustom.hbm.xml"/>
+ <mapping resource="VnfResource.hbm.xml"/>
+ <mapping resource="VnfResourceCustomization.hbm.xml"/>
</session-factory>
</hibernate-configuration>
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java
deleted file mode 100644
index b577afef66..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java
+++ /dev/null
@@ -1,1307 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:18:49 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
-import org.openecomp.mso.db.catalog.beans.HeatFiles;
-import org.openecomp.mso.db.catalog.beans.HeatTemplate;
-import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
-import org.openecomp.mso.db.catalog.beans.Service;
-import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
-import org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles;
-import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
-import org.openecomp.mso.db.catalog.beans.VnfRecipe;
-import org.openecomp.mso.db.catalog.beans.VnfResource;
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-import java.time.chrono.ChronoLocalDate;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.evosuite.runtime.mock.java.time.chrono.MockJapaneseDate;
-import org.evosuite.runtime.mock.java.time.chrono.MockThaiBuddhistDate;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- VfModuleToHeatFiles vfModuleToHeatFiles0 = mock(VfModuleToHeatFiles.class, new ViolatedAssumptionAnswer());
- List<VfModuleToHeatFiles> list0 = (List<VfModuleToHeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn(vfModuleToHeatFiles0).when(list0).get(anyInt());
- doReturn(false).when(list0).isEmpty();
- doReturn(1, 1).when(list0).size();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- List<ChronoLocalDate> list1 = (List<ChronoLocalDate>) mock(List.class, new ViolatedAssumptionAnswer());
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("YF}DP?7kbDc>q", (String) null, "", "").when(session0).toString();
- doReturn(query1).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatTemplate((String) null);
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles$$EnhancerByMockitoWithCGLIB$$309d9392 cannot be cast to org.openecomp.mso.db.catalog.beans.HeatTemplate
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_GENERATED_REQUEST_ID;
- MessageEnum messageEnum1 = MessageEnum.APIH_DUPLICATE_CHECK_EXC;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- catalogDatabase0.getVfModuleType((String) null, (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- VnfComponentsRecipe vnfComponentsRecipe0 = mock(VnfComponentsRecipe.class, new ViolatedAssumptionAnswer());
- List<VnfComponentsRecipe> list0 = (List<VnfComponentsRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn(true).when(list0).isEmpty();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- List<MockThaiBuddhistDate> list1 = (List<MockThaiBuddhistDate>) mock(List.class, new ViolatedAssumptionAnswer());
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(query2, query2, query2, query2).when(query3).setParameter(anyString() , any());
- doReturn(serviceRecipe0).when(query3).uniqueResult();
- Query query4 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((List) null).when(query4).list();
- doReturn((Query) null, (Query) null, (Query) null).when(query4).setParameter(anyString() , any());
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^", "", "", ",volTemplateId=", ", fileName=null").when(session1).toString();
- doReturn(",volTemplateId=").when(session1).save(any());
- doReturn(query1, query3, query4).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- catalogDatabase0.getHeatEnvironment((-1));
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- doReturn("~+(<.").when(heatTemplate0).getAsdcResourceName();
- doReturn("qOWRn", "@;i!EF=FjdS;").when(heatTemplate0).getTemplateName();
- doReturn("o~%Y*9E5Pu.f").when(heatTemplate0).getVersion();
- Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
- HeatFiles heatFiles0 = mock(HeatFiles.class, new ViolatedAssumptionAnswer());
- doReturn("").when(heatFiles0).getAsdcResourceName();
- doReturn("@;i!EF=FjdS;", "~+(<.").when(heatFiles0).getFileName();
- doReturn((-1)).when(heatFiles0).getVnfResourceId();
- doReturn("i#C").when(heatFiles0).getVersion();
- catalogDatabase0.saveHeatFiles(heatFiles0);
- Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- MockJapaneseDate mockJapaneseDate0 = new MockJapaneseDate();
- List<MockJapaneseDate> list0 = (List<MockJapaneseDate>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn(true).when(list0).isEmpty();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- List<HeatFiles> list1 = (List<HeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(list1).get(anyInt());
- doReturn(false).when(list1).isEmpty();
- doReturn(0).when(list1).size();
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list1).when(query3).list();
- doReturn(query2, query2, query2).when(query3).setParameter(anyString() , any());
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^", "po=vr", "po=vr", "po=vr").when(session1).toString();
- doReturn("po=vr").when(session1).save(any());
- doReturn(query1, query3).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- catalogDatabase0.getHeatEnvironment((-1));
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- doReturn("").when(heatTemplate0).getAsdcResourceName();
- doReturn(0).when(heatTemplate0).getId();
- doReturn("", "RDu8*C_[t4L").when(heatTemplate0).getTemplateName();
- doReturn((String) null).when(heatTemplate0).getVersion();
- Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
- doReturn(true).when(iterator0).hasNext();
- doReturn((Object) null).when(iterator0).next();
- Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
- doReturn(iterator0).when(set0).iterator();
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_DB_INVALID_STATUS;
- MessageEnum messageEnum1 = MessageEnum.LOGGER_UPDATE_SUC;
- MessageEnum messageEnum2 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HashMap<String, String> hashMap0 = new HashMap<String, String>();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getService(hashMap0, "Successfully. No template found");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getNestedTemplates(2377);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_QUERY_PARAM_WRONG;
- MessageEnum messageEnum1 = MessageEnum.RA_SEND_REQUEST_SDNC;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- List<VnfRecipe> list0 = (List<VnfRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(query0, query0).when(query1).setParameter(anyString() , any());
- doReturn((Object) null).when(query1).uniqueResult();
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((List) null).when(query2).list();
- doReturn((Query) null).when(query2).setParameter(anyString() , any());
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^", "getVfModuleRecipe").when(session1).toString();
- doReturn(query1, query2).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- catalogDatabase0.getVnfComponent(187, "");
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatEnvironment((-1));
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_PROPERTY_LOAD_SUC;
- MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HashMap<String, String> hashMap0 = new HashMap<String, String>();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null, (String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipe("B4@1", "v@(U", "", (String) null, "", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getService((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getVfModuleModelName("", "RiY");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_UPDATE_TENANT_ERR;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- VnfRecipe vnfRecipe0 = mock(VnfRecipe.class, new ViolatedAssumptionAnswer());
- Service service0 = new Service();
- // Undeclared exception!
- try {
- catalogDatabase0.saveService(service0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(session0).toString();
- doReturn((Query) null).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- // Undeclared exception!
- try {
- catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- VnfResource vnfResource0 = mock(VnfResource.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- catalogDatabase0.saveService((Service) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_CREATE_NETWORK_EXC;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate((HeatTemplate) null, (Set<HeatTemplateParam>) linkedHashSet0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- VnfResource vnfResource0 = mock(VnfResource.class, new ViolatedAssumptionAnswer());
- doReturn((-1)).when(vnfResource0).getId();
- doReturn("#5|%>JWRPJfP)S@").when(vnfResource0).getVnfType();
- // Undeclared exception!
- try {
- catalogDatabase0.saveOrUpdateVnfResource(vnfResource0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_ANALYZE_ERROR_EXC;
- MsoLogger.StatusCode.values();
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.saveVnfRecipe((VnfRecipe) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Service service0 = mock(Service.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(service0).getServiceName();
- doReturn((String) null, (String) null).when(service0).getServiceNameVersionId();
- doReturn((String) null).when(service0).getServiceVersion();
- // Undeclared exception!
- try {
- catalogDatabase0.saveService(service0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_BAD_ORDER;
- MessageEnum messageEnum1 = MessageEnum.RA_SEND_VNF_NOTIF_ERR;
- MessageEnum messageEnum2 = MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND;
- MessageEnum messageEnum3 = MessageEnum.RA_VNF_NOT_EXIST;
- MsoLogger.ErrorCode msoLogger_ErrorCode0 = MsoLogger.ErrorCode.PermissionError;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatEnvironment(heatEnvironment0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_GENERAL_METRICS;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatEnvironment((HeatEnvironment) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfRecipe((String) null, (String) null, (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- MsoLogger.ErrorCode.values();
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.rollback();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getAllHeatTemplates();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatFilesForVfModule((-1539));
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatEnvironment(0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getAllHeatEnvironment();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.commit();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setVersion("E0)WE F/LaV~i2U01");
- heatFiles0.setFileName("uIZl|");
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatFiles(heatFiles0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.saveVnfComponentsRecipe((VnfComponentsRecipe) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.INIT_LOGGER_FAIL;
- MessageEnum messageEnum1 = MessageEnum.ASDC_CREATE_SERVICE;
- MessageEnum messageEnum2 = MessageEnum.NO_PROPERTIES;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.healthCheck();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test32() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- catalogDatabase0.close();
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatTemplate(1197);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test33() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getAllNetworkResources();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test34() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipe("Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test35() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatTemplate((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test36() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponent(1987, "R$9=*_j3~I=:_");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test37() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatFiles(0, "r#j>oJCQI5r'@)jSH", "K6#W1{s", "vRm");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test38() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfResourcesByRole("");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test39() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_ASYNC_DELETE_VNF;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getAllVnfResources();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test40() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- List<VfModuleToHeatFiles> list0 = (List<VfModuleToHeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(list0).get(anyInt());
- doReturn(false).when(list0).isEmpty();
- doReturn(0, 0).when(list0).size();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((List) null).when(query2).list();
- doReturn((Query) null).when(query2).setParameter(anyString() , any());
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("YF}DP?7kbDc>q", (String) null, "", "", "").when(session0).toString();
- doReturn(query1, query2).when(session0).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- catalogDatabase0.getHeatTemplate((String) null);
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatEnvironment(148);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test41() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- List<VnfComponentsRecipe> list0 = (List<VnfComponentsRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(list0).get(anyInt());
- doReturn(false).when(list0).isEmpty();
- doReturn(0).when(list0).size();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((Query) null, (Query) null, (Query) null, (Query) null).when(query2).setParameter(anyString() , any());
- doReturn((Object) null).when(query2).uniqueResult();
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^", "", "", ",volTemplateId=", (String) null).when(session1).toString();
- doReturn(",volTemplateId=").when(session1).save(any());
- doReturn(query1, query2, (Query) null).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- catalogDatabase0.getHeatEnvironment((-1));
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- doReturn("~+(<.").when(heatTemplate0).getAsdcResourceName();
- doReturn("qOWRn", "@;i!EF=FjdS;").when(heatTemplate0).getTemplateName();
- doReturn("o~%Y*9E5Pu.f").when(heatTemplate0).getVersion();
- Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
- HeatFiles heatFiles0 = mock(HeatFiles.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(heatFiles0).getAsdcResourceName();
- doReturn((String) null, (String) null).when(heatFiles0).getFileName();
- doReturn(0).when(heatFiles0).getVnfResourceId();
- doReturn((String) null).when(heatFiles0).getVersion();
- catalogDatabase0.saveHeatFiles(heatFiles0);
- Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test42() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- List<HeatTemplateParam> list0 = (List<HeatTemplateParam>) mock(List.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(list0).get(anyInt());
- doReturn(false).when(list0).isEmpty();
- doReturn(0).when(list0).size();
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn(list0).when(query1).list();
- doReturn(query0).when(query1).setParameter(anyString() , any());
- Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((List) null).when(query2).list();
- doReturn((Query) null, (Query) null, (Query) null).when(query2).setParameter(anyString() , any());
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^", "", "ASDC_PROPERTIES_NOT_FOUND").when(session1).toString();
- doReturn(query1, query2).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- catalogDatabase0.getHeatEnvironment((-1));
- PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
- Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
- HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
- doReturn("-wAG8.gOR.b_dq").when(heatTemplate0).getAsdcResourceName();
- doReturn("", "f:DC0FeMtZ").when(heatTemplate0).getTemplateName();
- doReturn("F4D:=_l\"v%zem^./^").when(heatTemplate0).getVersion();
- Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
- Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test43() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
- Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
- doReturn((List) null).when(query0).list();
- doReturn((Query) null).when(query0).setParameter(anyString() , any());
- Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
- doReturn("F4D:=_l\"v%zem^./^").when(session1).toString();
- doReturn(query0).when(session1).createQuery(anyString());
- PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatEnvironment((-1));
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test44() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.GENERAL_EXCEPTION_ARG;
- MessageEnum messageEnum1 = MessageEnum.RA_EVALUATE_XPATH_ERROR;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = ", vnfResourceId=";
- String string1 = "";
- String string2 = "U`9Z8:QQUr-c(T@_/)";
- String string3 = "$q')fpKG]Q&i\"'{x";
- // Undeclared exception!
- try {
- catalogDatabase0.getNetworkResource("FT>Ri6U\"Ks<.H/g[");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test45() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- int int0 = 1030;
- // Undeclared exception!
- try {
- catalogDatabase0.getAllVfModules();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test46() throws Throwable {
- MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.DataNotFound;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVfModuleType("serviceVersion", "serviceVersion");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test47() throws Throwable {
- MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.Conflict;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getNestedTemplates(2377);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test48() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_SDNC_RESPONSE_ERROR;
- MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_SUC;
- MessageEnum messageEnum2 = MessageEnum.RA_UPDATE_NETWORK_ERR;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = null;
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfResource((String) null, (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test49() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = ", description=";
- // Undeclared exception!
- try {
- catalogDatabase0.getServiceRecipe((-1319), ", description=");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test50() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = ",hpGX76\"X~ow4";
- String string1 = "735uWxa&iIbU.4]O$";
- String string2 = "APIH_ERROR_FROM_BPEL_SERVER";
- // Undeclared exception!
- try {
- catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test51() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = ",hpGX76\"X~ow4";
- String string1 = "APIH_ERROR_FROM_BPEL_SERVER";
- // Undeclared exception!
- try {
- catalogDatabase0.getNetworkRecipe("", ",hpGX76\"X~ow4");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test52() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = "$iJG7Jh~P";
- String string1 = "b4v5f&LOV|\\";
- String string2 = "";
- String string3 = null;
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfResource((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test53() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = "Ikrt3T$WS\"UMs#Q";
- String string1 = null;
- // Undeclared exception!
- try {
- catalogDatabase0.getServiceByUUID("Ikrt3T$WS\"UMs#Q");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test54() throws Throwable {
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = "v@(U";
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipe("!4@@1", "v@(U", "", (String) null, "", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test55() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_DB_INVALID_STATUS;
- MessageEnum messageEnum1 = MessageEnum.LOGGER_UPDATE_SUC;
- MessageEnum messageEnum2 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- HashMap<String, String> hashMap0 = new HashMap<String, String>();
- // Undeclared exception!
- try {
- catalogDatabase0.getService(hashMap0, "Successfully. No template found");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test56() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_PROPERTY_LOAD_SUC;
- MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", "");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test57() throws Throwable {
- MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.ServiceNotAvailable;
- MessageEnum messageEnum0 = MessageEnum.RA_CONFIG_LOAD;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- String string0 = "";
- String string1 = "RiY";
- // Undeclared exception!
- try {
- catalogDatabase0.getHeatEnvironment("", "RiY", "RiY");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test58() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.RA_CREATE_NETWORK_EXC;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- int int0 = 4811;
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- // Undeclared exception!
- try {
- catalogDatabase0.saveHeatTemplate(heatTemplate0, (Set<HeatTemplateParam>) linkedHashSet0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test59() throws Throwable {
- MessageEnum messageEnum0 = MessageEnum.APIH_QUERY_PARAM_WRONG;
- MessageEnum messageEnum1 = MessageEnum.RA_SEND_REQUEST_SDNC;
- CatalogDatabase catalogDatabase0 = new CatalogDatabase();
- // Undeclared exception!
- try {
- catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
- }
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java
deleted file mode 100644
index c9bf8b40ba..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java
+++ /dev/null
@@ -1,1093 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:18:49 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class CatalogDatabaseESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.CatalogDatabase";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CatalogDatabaseESTestscaffolding.class.getClassLoader() ,
- "org.hibernate.sql.Alias",
- "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator",
- "org.hibernate.type.BasicType",
- "org.hibernate.service.spi.ServiceInitiator",
- "org.hibernate.type.UUIDBinaryType",
- "org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor",
- "org.hibernate.type.descriptor.java.NClobTypeDescriptor",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4$1",
- "org.hibernate.service.spi.SessionFactoryServiceRegistry",
- "org.hibernate.Transaction",
- "org.dom4j.tree.NamespaceStack",
- "org.hibernate.annotations.common.reflection.ReflectionManager",
- "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
- "org.hibernate.bytecode.spi.ReflectionOptimizer$InstantiationOptimizer",
- "org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor",
- "org.hibernate.mapping.FetchProfile",
- "org.hibernate.id.TableHiLoGenerator",
- "org.dom4j.tree.AbstractBranch",
- "org.hibernate.type.NumericBooleanType",
- "org.hibernate.annotations.common.reflection.ClassLoaderDelegate",
- "org.hibernate.NaturalIdLoadAccess",
- "org.hibernate.ScrollableResults",
- "org.dom4j.Namespace",
- "org.hibernate.engine.jdbc.batch.spi.BatchBuilder",
- "org.dom4j.tree.DefaultDocumentType",
- "org.hibernate.service.ConfigLoader",
- "org.hibernate.metamodel.source.MetadataImplementor",
- "org.hibernate.cfg.EJB3NamingStrategy",
- "org.hibernate.boot.registry.classloading.spi.ClassLoaderService",
- "org.hibernate.type.DoubleType",
- "org.hibernate.mapping.Value",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3$1",
- "org.hibernate.type.descriptor.java.ClassTypeDescriptor",
- "org.hibernate.service.internal.ConcurrentServiceBinding$Node",
- "org.hibernate.CacheMode",
- "org.hibernate.type.ForeignKeyDirection$2",
- "org.hibernate.type.IdentifierBagType",
- "org.hibernate.type.MapType",
- "org.hibernate.cfg.MetadataSourceType",
- "org.hibernate.dialect.Dialect",
- "org.hibernate.boot.registry.selector.StrategyRegistration",
- "org.hibernate.type.ForeignKeyDirection$1",
- "org.hibernate.ScrollMode",
- "org.hibernate.FetchMode",
- "org.hibernate.type.CurrencyType",
- "org.hibernate.persister.collection.CollectionPersister",
- "org.hibernate.service.internal.ConcurrentServiceBinding$Entry",
- "org.hibernate.metamodel.relational.Size",
- "org.hibernate.AssertionFailure",
- "org.hibernate.bytecode.spi.ReflectionOptimizer$AccessOptimizer",
- "org.dom4j.tree.FlyweightComment",
- "org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform",
- "org.hibernate.type.CustomType",
- "org.hibernate.id.enhanced.TableGenerator",
- "org.hibernate.mapping.RelationalModel",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5$1",
- "org.hibernate.event.spi.PostUpdateEventListener",
- "org.hibernate.type.descriptor.java.ClobTypeDescriptor",
- "org.hibernate.hql.spi.MultiTableBulkIdStrategy$DeleteHandler",
- "org.dom4j.tree.ConcurrentReaderHashMap$ValueIterator",
- "org.hibernate.cfg.beanvalidation.IntegrationException",
- "org.hibernate.proxy.ProxyFactory",
- "org.hibernate.mapping.Filterable",
- "org.hibernate.tool.hbm2ddl.SingleLineSqlCommandExtractor",
- "org.hibernate.type.SortedSetType",
- "org.hibernate.engine.config.spi.ConfigurationService",
- "org.hibernate.engine.config.internal.ConfigurationServiceInitiator",
- "org.hibernate.persister.spi.PersisterClassResolver",
- "org.hibernate.type.TypeFactory",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl",
- "org.hibernate.secure.spi.PermissibleAction$1",
- "org.hibernate.cfg.Configuration$CacheHolder",
- "org.hibernate.annotations.common.reflection.Filter",
- "org.hibernate.dialect.Sybase11Dialect",
- "org.hibernate.engine.jdbc.spi.JdbcServices",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4$1",
- "org.hibernate.engine.transaction.jta.platform.internal.JRun4JtaPlatform",
- "org.hibernate.type.descriptor.java.CalendarDateTypeDescriptor",
- "org.hibernate.type.descriptor.java.CurrencyTypeDescriptor",
- "org.hibernate.type.BlobType",
- "org.hibernate.type.descriptor.java.BlobTypeDescriptor$BlobMutabilityPlan",
- "org.hibernate.annotations.common.reflection.XClass",
- "org.hibernate.dialect.PostgresPlusDialect",
- "org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy",
- "org.hibernate.type.CharacterArrayType",
- "org.hibernate.metamodel.binding.AttributeBindingContainer",
- "org.hibernate.internal.util.xml.XmlDocument",
- "org.hibernate.engine.jdbc.spi.SqlExceptionHelper",
- "org.hibernate.dialect.DerbyTenSixDialect",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor",
- "org.hibernate.hql.spi.MultiTableBulkIdStrategy$UpdateHandler",
- "org.hibernate.integrator.spi.IntegratorService",
- "org.hibernate.dialect.SAPDBDialect",
- "org.hibernate.dialect.SybaseAnywhereDialect",
- "org.hibernate.internal.util.ValueHolder",
- "org.hibernate.engine.jdbc.internal.JdbcServicesImpl",
- "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
- "org.hibernate.dialect.SybaseASE15Dialect",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.hibernate.engine.jdbc.internal.JdbcServicesInitiator",
- "org.dom4j.tree.ConcurrentReaderHashMap$HashIterator",
- "org.hibernate.type.AnyType",
- "org.dom4j.util.SingletonStrategy",
- "org.hibernate.type.descriptor.java.ByteArrayTypeDescriptor",
- "org.dom4j.tree.BackedList",
- "org.hibernate.service.ServiceRegistryBuilder",
- "org.jboss.logging.JDKLoggerProvider",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl",
- "org.hibernate.service.internal.ConcurrentServiceBinding",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2$1",
- "org.hibernate.type.ListType",
- "org.hibernate.type.IntegerType",
- "org.hibernate.dialect.Ingres9Dialect",
- "org.hibernate.dialect.TeradataDialect",
- "org.hibernate.AnnotationException",
- "org.hibernate.proxy.EntityNotFoundDelegate",
- "org.hibernate.type.SetType",
- "org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator",
- "org.hibernate.ReplicationMode$1",
- "org.hibernate.type.NClobType",
- "org.hibernate.service.spi.Configurable",
- "org.hibernate.ReplicationMode$2",
- "org.hibernate.ReplicationMode$3",
- "org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory",
- "org.hibernate.ReplicationMode$4",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5$1",
- "org.openecomp.mso.db.catalog.beans.Service",
- "org.hibernate.annotations.common.reflection.java.JavaReflectionManager",
- "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor",
- "org.hibernate.TransientObjectException",
- "org.hibernate.id.IncrementGenerator",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.hibernate.annotations.common.reflection.java.generics.TypeEnvironmentFactory",
- "org.hibernate.engine.spi.FilterDefinition",
- "org.hibernate.type.TypeFactory$TypeScopeImpl",
- "org.hibernate.annotations.common.reflection.XMethod",
- "org.hibernate.engine.jdbc.connections.spi.ConnectionProvider",
- "org.hibernate.type.ByteType",
- "org.hibernate.event.spi.AbstractEvent",
- "org.hibernate.integrator.spi.Integrator",
- "org.hibernate.dialect.Oracle8iDialect",
- "org.dom4j.ElementHandler",
- "org.dom4j.tree.DefaultAttribute",
- "org.hibernate.engine.transaction.spi.LocalStatus",
- "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor",
- "org.hibernate.mapping.RootClass",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3$1",
- "org.hibernate.engine.loading.internal.CollectionLoadContext",
- "org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform",
- "org.hibernate.type.descriptor.sql.DoubleTypeDescriptor",
- "org.hibernate.type.CompositeCustomType",
- "org.hibernate.boot.registry.selector.spi.StrategySelectionException",
- "org.hibernate.dialect.JDataStoreDialect",
- "org.hibernate.annotations.common.util.impl.Log_$logger",
- "org.dom4j.rule.Pattern",
- "org.openecomp.mso.db.catalog.beans.HeatFiles",
- "org.hibernate.dialect.PointbaseDialect",
- "org.hibernate.dialect.DerbyDialect",
- "org.hibernate.event.internal.EntityCopyNotAllowedObserver",
- "org.hibernate.id.SelectGenerator",
- "org.hibernate.dialect.TimesTenDialect",
- "org.hibernate.internal.util.xml.ErrorLogger",
- "org.hibernate.id.insert.InsertGeneratedIdentifierDelegate",
- "org.dom4j.tree.AbstractComment",
- "org.hibernate.MultiTenancyStrategy",
- "org.dom4j.Branch",
- "org.jboss.logging.DelegatingBasicLogger",
- "org.hibernate.type.ShortType",
- "org.hibernate.service.StandardServiceInitiators",
- "org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry",
- "org.hibernate.type.descriptor.sql.NCharTypeDescriptor",
- "org.hibernate.service.spi.Manageable",
- "org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl",
- "org.hibernate.metamodel.domain.Type",
- "org.dom4j.XPath",
- "org.hibernate.type.VersionType",
- "org.hibernate.integrator.internal.IntegratorServiceImpl",
- "org.hibernate.dialect.Ingres10Dialect",
- "org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl",
- "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor$TimestampMutabilityPlan",
- "org.hibernate.type.AdaptedImmutableType",
- "org.hibernate.type.TypeResolver",
- "org.hibernate.type.descriptor.java.TimeZoneTypeDescriptor",
- "org.hibernate.type.BinaryType",
- "org.hibernate.bytecode.spi.BytecodeProvider",
- "org.hibernate.SynchronizeableQuery",
- "org.hibernate.engine.jdbc.spi.ExtractedDatabaseMetaData",
- "org.hibernate.metamodel.binding.EntityBinding",
- "org.hibernate.type.descriptor.java.CharacterTypeDescriptor",
- "org.hibernate.event.spi.EventSource",
- "org.hibernate.id.IntegralDataTypeHolder",
- "org.dom4j.tree.DefaultText",
- "org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator",
- "org.hibernate.type.ManyToOneType",
- "org.hibernate.engine.transaction.jta.platform.internal.JOTMJtaPlatform",
- "org.hibernate.engine.jdbc.LobCreationContext",
- "org.hibernate.engine.transaction.jta.platform.internal.JOnASJtaPlatform",
- "org.hibernate.id.enhanced.SequenceStyleGenerator",
- "org.hibernate.tuple.entity.DynamicMapEntityTuplizer",
- "org.dom4j.tree.ConcurrentReaderHashMap$KeyIterator",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.hibernate.LockOptions",
- "org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor",
- "org.hibernate.cache.internal.CollectionCacheInvalidator",
- "org.hibernate.dialect.AbstractTransactSQLDialect",
- "org.hibernate.annotations.common.reflection.XAnnotatedElement",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3",
- "org.hibernate.service.spi.ServiceContributor",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2",
- "org.hibernate.jdbc.WorkExecutorVisitable",
- "org.hibernate.service.spi.ServiceRegistryAwareService",
- "org.hibernate.type.descriptor.sql.DecimalTypeDescriptor",
- "org.dom4j.tree.AbstractDocument",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator",
- "org.hibernate.dialect.FirebirdDialect",
- "org.hibernate.id.SequenceIdentityGenerator",
- "org.dom4j.Attribute",
- "org.hibernate.type.descriptor.java.MutabilityPlan",
- "org.hibernate.dialect.DerbyTenSevenDialect",
- "org.jboss.logging.AbstractLoggerProvider",
- "org.dom4j.Document",
- "org.hibernate.boot.registry.BootstrapServiceRegistryBuilder",
- "org.hibernate.Criteria",
- "org.hibernate.annotations.common.reflection.java.JavaXCollectionType",
- "org.hibernate.event.internal.EntityCopyAllowedLoggedObserver",
- "org.dom4j.tree.ConcurrentReaderHashMap",
- "org.hibernate.SessionEventListener",
- "org.hibernate.dialect.MimerSQLDialect",
- "org.openecomp.mso.db.catalog.beans.VnfResource",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.hibernate.InvalidMappingException",
- "org.hibernate.service.UnknownUnwrapTypeException",
- "org.hibernate.exception.spi.ViolatedConstraintNameExtracter",
- "org.dom4j.tree.AbstractDocumentType",
- "org.hibernate.persister.internal.PersisterFactoryInitiator",
- "org.hibernate.metamodel.Metadata",
- "org.hibernate.engine.transaction.jta.platform.internal.BorlandEnterpriseServerJtaPlatform",
- "org.hibernate.engine.spi.Mapping",
- "org.hibernate.service.Service",
- "org.dom4j.CDATA",
- "org.dom4j.tree.FlyweightText",
- "org.hibernate.type.ObjectType",
- "org.openecomp.mso.db.catalog.CatalogDatabase",
- "org.hibernate.service.spi.ServiceRegistryImplementor",
- "org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver",
- "org.dom4j.tree.ConcurrentReaderHashMap$BarrierLock",
- "org.hibernate.type.descriptor.sql.LongVarbinaryTypeDescriptor",
- "org.hibernate.type.DbTimestampType",
- "org.hibernate.procedure.ProcedureCall",
- "org.hibernate.service.UnknownServiceException",
- "org.hibernate.id.BulkInsertionCapableIdentifierGenerator",
- "org.hibernate.service.spi.Stoppable",
- "org.hibernate.annotations.common.reflection.XProperty",
- "org.hibernate.boot.registry.BootstrapServiceRegistry",
- "org.hibernate.cfg.Configuration$MetadataSourceQueue",
- "org.hibernate.type.descriptor.sql.NVarcharTypeDescriptor",
- "org.hibernate.jdbc.Work",
- "org.hibernate.type.PrimitiveType",
- "org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor",
- "org.hibernate.tuple.entity.PojoEntityTuplizer",
- "org.hibernate.engine.jdbc.dialect.internal.DialectFactoryInitiator",
- "org.hibernate.usertype.UserType",
- "org.hibernate.type.TimeType",
- "org.hibernate.internal.util.xml.XMLHelper",
- "org.hibernate.annotations.common.reflection.MetadataProvider",
- "org.hibernate.cfg.beanvalidation.BeanValidationIntegrator",
- "org.hibernate.tuple.entity.AbstractEntityTuplizer",
- "org.hibernate.service.spi.ServiceBinding$ServiceLifecycleOwner",
- "org.jboss.logging.LoggerProvider",
- "org.hibernate.tool.hbm2ddl.ImportScriptException",
- "org.dom4j.io.SAXReader",
- "org.hibernate.id.IdentityGenerator",
- "org.hibernate.type.ForeignKeyDirection",
- "org.hibernate.persister.entity.Joinable",
- "org.hibernate.type.BigDecimalType",
- "org.hibernate.type.WrapperBinaryType",
- "org.hibernate.internal.util.ConfigHelper",
- "org.hibernate.id.enhanced.AccessCallback",
- "org.dom4j.DocumentType",
- "org.hibernate.dialect.PostgreSQL82Dialect",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.hibernate.id.Configurable",
- "org.hibernate.id.SequenceGenerator",
- "org.hibernate.dialect.Oracle9iDialect",
- "org.hibernate.cfg.Configuration",
- "org.dom4j.tree.DefaultDocument",
- "org.hibernate.engine.spi.SessionFactoryImplementor",
- "org.jboss.logging.AbstractMdcLoggerProvider",
- "org.hibernate.type.SerializationException",
- "org.hibernate.cfg.annotations.reflection.XMLContext$Default",
- "org.hibernate.type.descriptor.java.CalendarTypeDescriptor$CalendarMutabilityPlan",
- "org.openecomp.mso.logger.MsoLogger",
- "org.hibernate.engine.jndi.spi.JndiService",
- "org.dom4j.tree.ConcurrentReaderHashMap$KeySet",
- "org.hibernate.type.BooleanType",
- "org.hibernate.mapping.Collection",
- "org.hibernate.type.descriptor.sql.TimestampTypeDescriptor",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor",
- "org.hibernate.engine.jndi.internal.JndiServiceImpl",
- "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor",
- "org.hibernate.metamodel.source.BindingContext",
- "org.hibernate.cache.internal.RegionFactoryInitiator",
- "org.openecomp.mso.db.catalog.beans.HeatTemplateParam",
- "org.dom4j.util.SimpleSingleton",
- "org.hibernate.cfg.annotations.reflection.XMLContext",
- "org.hibernate.metamodel.binding.AttributeBinding",
- "org.hibernate.type.CharacterType",
- "org.hibernate.type.FloatType",
- "org.hibernate.annotations.common.reflection.AnnotationReader",
- "org.hibernate.internal.util.xml.XmlInfrastructureException",
- "org.jboss.logging.LoggerProviders$1",
- "org.hibernate.internal.util.xml.XmlDocumentImpl",
- "org.openecomp.mso.db.catalog.beans.HeatEnvironment",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4$1",
- "org.hibernate.id.factory.IdentifierGeneratorFactory",
- "org.hibernate.type.CollectionType",
- "org.hibernate.type.descriptor.java.ByteTypeDescriptor",
- "org.hibernate.boot.registry.StandardServiceRegistryBuilder",
- "org.hibernate.secure.internal.DisabledJaccServiceImpl",
- "org.hibernate.secure.spi.JaccService",
- "org.hibernate.tuple.Tuplizer",
- "org.hibernate.internal.util.ValueHolder$DeferredInitializer",
- "org.hibernate.internal.util.xml.Origin",
- "org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess",
- "org.hibernate.type.ComponentType",
- "org.hibernate.engine.jdbc.spi.ResultSetWrapper",
- "org.hibernate.service.spi.Startable",
- "org.hibernate.type.DiscriminatorType",
- "org.hibernate.type.descriptor.sql.BooleanTypeDescriptor",
- "org.dom4j.Comment",
- "org.hibernate.service.internal.ProvidedService",
- "org.hibernate.type.descriptor.java.BlobTypeDescriptor",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$TcclSafeAggregatedClassLoader",
- "org.jboss.logging.Slf4jLoggerProvider",
- "org.hibernate.type.SortedMapType",
- "org.hibernate.type.LongType",
- "org.hibernate.annotations.common.reflection.MetadataProviderInjector",
- "org.hibernate.type.descriptor.java.LongTypeDescriptor",
- "org.hibernate.id.UUIDGenerationStrategy",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.hibernate.LockMode",
- "org.jboss.logging.Slf4jLocationAwareLogger$1",
- "org.hibernate.boot.registry.selector.spi.StrategySelector",
- "org.hibernate.EntityMode",
- "org.hibernate.dialect.HSQLDialect",
- "org.hibernate.Session$LockRequest",
- "org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor",
- "org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory",
- "org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.openecomp.mso.db.catalog.beans.VnfComponent",
- "com.att.eelf.configuration.EELFManager",
- "org.dom4j.Text",
- "org.dom4j.tree.AbstractCharacterData",
- "org.hibernate.engine.transaction.jta.platform.internal.ResinJtaPlatform",
- "org.hibernate.service.ServiceRegistry",
- "org.dom4j.io.DOMReader",
- "org.hibernate.type.TimestampType",
- "org.hibernate.persister.internal.PersisterClassResolverInitiator",
- "org.jboss.logging.Logger$Level",
- "org.hibernate.type.NTextType",
- "org.hibernate.UnknownProfileException",
- "org.hibernate.engine.spi.CollectionKey",
- "org.hibernate.type.descriptor.java.JavaTypeDescriptor",
- "org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor",
- "org.hibernate.secure.spi.GrantedPermission",
- "org.hibernate.type.Type",
- "org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator",
- "org.hibernate.MappingNotFoundException",
- "org.hibernate.internal.util.collections.JoinedIterator",
- "org.hibernate.jmx.internal.JmxServiceInitiator",
- "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor",
- "org.hibernate.type.CustomCollectionType",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3$1",
- "org.hibernate.event.service.spi.DuplicationStrategy",
- "org.hibernate.type.PostgresUUIDType$PostgresUUIDSqlTypeDescriptor",
- "org.dom4j.io.DispatchHandler",
- "org.hibernate.annotations.common.util.impl.LoggerFactory",
- "org.hibernate.dialect.SQLServer2005Dialect",
- "org.dom4j.Entity",
- "org.hibernate.boot.registry.selector.StrategyRegistrationProvider",
- "org.hibernate.id.PostInsertIdentifierGenerator",
- "org.hibernate.type.descriptor.java.ShortTypeDescriptor",
- "org.hibernate.type.descriptor.sql.NumericTypeDescriptor",
- "org.hibernate.dialect.CUBRIDDialect",
- "org.hibernate.annotations.common.reflection.java.JavaXType",
- "org.hibernate.integrator.spi.ServiceContributingIntegrator",
- "org.hibernate.type.descriptor.java.StringTypeDescriptor",
- "org.dom4j.ProcessingInstruction",
- "org.hibernate.boot.registry.StandardServiceRegistry",
- "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor$DateMutabilityPlan",
- "org.hibernate.id.IdentifierGenerator",
- "org.hibernate.engine.jdbc.dialect.spi.DialectResolver",
- "org.hibernate.engine.jdbc.spi.SqlExceptionHelper$WarningHandler",
- "org.hibernate.type.OneToOneType",
- "org.hibernate.id.GUIDGenerator",
- "org.hibernate.internal.util.xml.MappingReader$SupportedOrmXsdVersion",
- "org.dom4j.io.ElementStack",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5",
- "org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl",
- "org.hibernate.SessionFactory",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4",
- "org.hibernate.type.MaterializedClobType",
- "org.hibernate.type.BigIntegerType",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2",
- "org.hibernate.service.internal.AbstractServiceRegistryImpl",
- "com.att.eelf.i18n.EELFMsgs",
- "org.hibernate.dialect.SybaseASE157Dialect",
- "org.dom4j.tree.AbstractText",
- "org.hibernate.Version",
- "org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform",
- "org.hibernate.cache.spi.OptimisticCacheSource",
- "org.hibernate.dialect.SQLServerDialect",
- "org.hibernate.dialect.SybaseDialect",
- "org.hibernate.engine.spi.CascadeStyle",
- "org.dom4j.tree.NamespaceCache",
- "org.hibernate.engine.jdbc.dialect.spi.DialectFactory",
- "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator",
- "org.hibernate.internal.util.xml.OriginImpl",
- "org.hibernate.jmx.spi.JmxService",
- "org.hibernate.id.UUIDGenerator",
- "org.hibernate.persister.spi.PersisterFactory",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2$1",
- "org.hibernate.TypeHelper",
- "org.hibernate.cfg.AvailableSettings",
- "org.hibernate.type.PostgresUUIDType",
- "org.hibernate.dialect.DB2Dialect",
- "org.hibernate.Session",
- "org.hibernate.internal.util.config.ConfigurationHelper",
- "org.dom4j.tree.QNameCache",
- "org.hibernate.SimpleNaturalIdLoadAccess",
- "org.hibernate.engine.transaction.jta.platform.internal.BitronixJtaPlatform",
- "org.jboss.logging.BasicLogger",
- "org.hibernate.type.SpecialOneToOneType",
- "org.hibernate.internal.util.config.ConfigurationException",
- "org.hibernate.metamodel.spi.TypeContributor",
- "org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform",
- "org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator",
- "org.hibernate.cfg.Environment",
- "org.hibernate.hql.spi.TemporaryTableBulkIdStrategy",
- "org.hibernate.type.LocaleType",
- "org.hibernate.boot.registry.internal.StandardServiceRegistryImpl",
- "org.hibernate.type.descriptor.sql.SqlTypeDescriptor",
- "org.dom4j.NodeFilter",
- "org.hibernate.type.descriptor.java.FloatTypeDescriptor",
- "org.hibernate.type.descriptor.java.UrlTypeDescriptor",
- "org.dom4j.tree.DefaultComment",
- "org.hibernate.type.descriptor.java.SerializableTypeDescriptor",
- "org.hibernate.dialect.MySQL5InnoDBDialect",
- "org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory",
- "org.hibernate.usertype.CompositeUserType",
- "org.hibernate.engine.jdbc.spi.SqlStatementLogger",
- "org.hibernate.mapping.Table",
- "org.hibernate.secure.spi.IntegrationException",
- "org.hibernate.mapping.AuxiliaryDatabaseObject",
- "org.hibernate.annotations.common.reflection.XMember",
- "org.hibernate.type.descriptor.sql.VarcharTypeDescriptor",
- "org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor",
- "org.hibernate.type.descriptor.java.UUIDTypeDescriptor",
- "org.hibernate.engine.jdbc.spi.ExtractedDatabaseMetaData$SQLStateType",
- "org.openecomp.mso.db.catalog.beans.Recipe",
- "org.hibernate.secure.spi.JaccIntegrator$1",
- "org.hibernate.id.factory.internal.MutableIdentifierGeneratorFactoryInitiator",
- "org.hibernate.cfg.SettingsFactory",
- "org.dom4j.io.SAXContentHandler",
- "org.dom4j.QName",
- "org.hibernate.type.AssociationType",
- "org.hibernate.cfg.ExtendsQueueEntry",
- "org.hibernate.ReplicationMode",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader",
- "org.dom4j.tree.DefaultElement",
- "org.hibernate.engine.transaction.spi.TransactionImplementor",
- "org.hibernate.persister.entity.EntityPersister",
- "org.dom4j.Node",
- "org.hibernate.service.spi.ServiceBinding",
- "org.hibernate.type.BasicTypeRegistry",
- "org.hibernate.internal.util.ValueHolder$1",
- "org.hibernate.dialect.function.SQLFunction",
- "org.hibernate.NonUniqueResultException",
- "org.hibernate.SessionFactoryObserver",
- "org.hibernate.type.descriptor.sql.RealTypeDescriptor",
- "org.hibernate.dialect.PostgreSQL81Dialect",
- "org.hibernate.collection.spi.PersistentCollection",
- "org.hibernate.type.descriptor.sql.DateTypeDescriptor",
- "org.dom4j.tree.AbstractAttribute",
- "org.hibernate.internal.CoreMessageLogger_$logger",
- "org.hibernate.dialect.PostgreSQLDialect",
- "org.hibernate.dialect.MySQLDialect",
- "org.hibernate.internal.jaxb.cfg.JaxbHibernateConfiguration",
- "org.openecomp.mso.db.catalog.beans.VnfRecipe",
- "org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform",
- "org.hibernate.service.ConfigLoader$1",
- "org.hibernate.type.MaterializedNClobType",
- "org.hibernate.type.IdentifierType",
- "org.hibernate.type.SingleColumnType",
- "org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor",
- "org.hibernate.SessionBuilder",
- "org.openecomp.mso.db.catalog.beans.NetworkRecipe",
- "org.hibernate.mapping.MetaAttributable",
- "org.hibernate.type.descriptor.java.MutableMutabilityPlan",
- "org.hibernate.secure.spi.JaccPermissionDeclarations",
- "org.hibernate.type.UrlType",
- "org.hibernate.tuple.entity.AbstractEntityTuplizer$MappedIdentifierValueMarshaller",
- "org.hibernate.tuple.component.ComponentMetamodel",
- "org.hibernate.persister.walking.spi.EntityDefinition",
- "org.hibernate.type.YesNoType",
- "org.hibernate.id.AbstractPostInsertGenerator",
- "org.openecomp.mso.db.catalog.beans.VfModule",
- "org.hibernate.annotations.common.reflection.java.JavaXArrayType",
- "org.hibernate.exception.spi.SQLExceptionConverter",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader$1",
- "org.hibernate.type.AbstractStandardBasicType",
- "org.hibernate.hql.spi.QueryTranslatorFactory",
- "org.hibernate.SharedSessionContract",
- "org.hibernate.cfg.Configuration$ObjectNameNormalizerImpl",
- "org.hibernate.annotations.common.reflection.java.JavaXSimpleType",
- "org.hibernate.cfg.ObjectNameNormalizer",
- "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryImpl",
- "org.hibernate.service.internal.ServiceDependencyException",
- "org.hibernate.event.spi.PostDeleteEvent",
- "org.hibernate.type.descriptor.java.BooleanTypeDescriptor",
- "org.hibernate.type.descriptor.sql.FloatTypeDescriptor",
- "org.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry",
- "org.hibernate.dialect.InformixDialect",
- "org.jboss.logging.Logger",
- "org.hibernate.cfg.Configuration$1",
- "org.hibernate.tuple.entity.EntityMetamodel$GenerationStrategyPair",
- "org.hibernate.type.ImageType",
- "org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory",
- "org.hibernate.engine.transaction.jta.platform.internal.JBossStandAloneJtaPlatform",
- "org.hibernate.cfg.Configuration$3",
- "org.hibernate.engine.jndi.JndiNameException",
- "org.hibernate.dialect.PostgreSQL9Dialect",
- "org.hibernate.type.CompositeType",
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
- "org.dom4j.ElementPath",
- "org.jboss.logging.LoggerProviders",
- "org.hibernate.type.descriptor.WrapperOptions",
- "org.hibernate.id.SequenceHiLoGenerator",
- "org.hibernate.type.descriptor.java.NClobTypeDescriptor$NClobMutabilityPlan",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3",
- "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles",
- "org.openecomp.mso.entity.MsoRequest",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4",
- "org.hibernate.secure.spi.JaccIntegrator",
- "org.hibernate.tuple.entity.EntityMetamodel",
- "org.hibernate.dialect.DerbyTenFiveDialect",
- "org.hibernate.tuple.Instantiator",
- "org.hibernate.type.descriptor.java.AbstractTypeDescriptor",
- "org.hibernate.type.BagType",
- "org.hibernate.type.CalendarType",
- "org.hibernate.internal.util.ClassLoaderHelper",
- "org.hibernate.BasicQueryContract",
- "org.hibernate.CallbackException",
- "org.hibernate.engine.jdbc.LobCreator",
- "org.hibernate.type.descriptor.java.DoubleTypeDescriptor",
- "org.dom4j.Element",
- "org.hibernate.dialect.FrontBaseDialect",
- "org.hibernate.boot.registry.classloading.spi.ClassLoadingException",
- "org.hibernate.tuple.entity.EntityTuplizerFactory",
- "org.hibernate.stat.SessionStatistics",
- "org.hibernate.type.OrderedSetType",
- "org.hibernate.mapping.TableOwner",
- "org.hibernate.type.descriptor.ValueBinder",
- "org.hibernate.bytecode.spi.ReflectionOptimizer",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$Work",
- "org.hibernate.dialect.DB2390Dialect",
- "org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl",
- "org.hibernate.type.descriptor.java.LocaleTypeDescriptor",
- "org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatform",
- "org.hibernate.engine.jdbc.spi.JdbcConnectionAccess",
- "org.hibernate.SharedSessionBuilder",
- "org.openecomp.mso.db.catalog.beans.NetworkResource",
- "org.hibernate.type.TimeZoneType",
- "org.hibernate.mapping.PersistentClass",
- "org.hibernate.tuple.entity.EntityTuplizer",
- "org.hibernate.engine.transaction.jta.platform.internal.OC4JJtaPlatform",
- "org.hibernate.type.descriptor.java.ClobTypeDescriptor$ClobMutabilityPlan",
- "org.hibernate.Query",
- "org.hibernate.annotations.common.reflection.java.generics.TypeEnvironment",
- "org.hibernate.internal.util.beans.BeanInfoHelper$BeanInfoDelegate",
- "org.hibernate.event.spi.PostDeleteEventListener",
- "org.jboss.logging.Slf4jLogger",
- "org.hibernate.annotations.common.Version",
- "org.hibernate.EmptyInterceptor",
- "org.hibernate.type.descriptor.sql.TimeTypeDescriptor",
- "org.hibernate.type.descriptor.java.IntegerTypeDescriptor",
- "org.hibernate.bytecode.spi.ClassTransformer",
- "org.hibernate.id.TableGenerator",
- "org.hibernate.id.Assigned",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.hibernate.type.ClobType",
- "org.hibernate.id.UUIDHexGenerator",
- "org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory",
- "org.hibernate.id.enhanced.DatabaseStructure",
- "org.hibernate.cache.CacheException",
- "org.hibernate.event.spi.PostUpdateEvent",
- "org.hibernate.type.TypeFactory$1",
- "org.hibernate.HibernateException",
- "org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider",
- "org.hibernate.cfg.annotations.reflection.JPAMetadataProvider",
- "org.hibernate.cfg.NamingStrategy",
- "org.hibernate.dialect.H2Dialect",
- "org.hibernate.type.descriptor.sql.BasicBinder",
- "org.hibernate.dialect.IngresDialect",
- "org.hibernate.persister.walking.spi.CollectionDefinition",
- "org.dom4j.tree.ConcurrentReaderHashMap$Entry",
- "org.hibernate.tool.hbm2ddl.DatabaseMetadata",
- "org.hibernate.id.ForeignGenerator",
- "org.hibernate.type.EmbeddedComponentType",
- "org.hibernate.event.spi.PostInsertEvent",
- "com.att.eelf.configuration.EELFLogger",
- "org.hibernate.type.descriptor.sql.LongNVarcharTypeDescriptor",
- "org.hibernate.type.descriptor.sql.CharTypeDescriptor",
- "org.hibernate.type.descriptor.sql.IntegerTypeDescriptor",
- "org.hibernate.type.CharacterNCharType",
- "org.hibernate.internal.util.xml.DTDEntityResolver",
- "org.dom4j.io.JAXPHelper",
- "org.hibernate.cache.spi.RegionFactory",
- "org.dom4j.tree.FlyweightAttribute",
- "org.hibernate.engine.jndi.internal.JndiServiceInitiator",
- "org.dom4j.IllegalAddException",
- "org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor",
- "org.hibernate.annotations.common.reflection.XPackage",
- "org.hibernate.persister.walking.spi.AttributeSource",
- "org.hibernate.internal.util.compare.ComparableComparator",
- "org.dom4j.tree.AbstractNode",
- "org.dom4j.Visitor",
- "org.hibernate.type.XmlRepresentableType",
- "org.dom4j.CharacterData",
- "org.hibernate.type.AbstractSingleColumnStandardBasicType",
- "org.hibernate.bytecode.spi.ProxyFactoryFactory",
- "org.hibernate.cfg.Mappings",
- "org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform",
- "org.hibernate.type.DateType",
- "org.hibernate.type.descriptor.java.UUIDTypeDescriptor$ValueTransformer",
- "org.hibernate.cfg.RecoverableException",
- "org.hibernate.type.SerializableType",
- "org.hibernate.bytecode.buildtime.spi.ClassFilter",
- "org.hibernate.internal.util.xml.MappingReader",
- "org.hibernate.dialect.DB2400Dialect",
- "org.openecomp.mso.db.catalog.beans.HeatTemplate",
- "org.hibernate.hql.spi.PersistentTableBulkIdStrategy",
- "org.hibernate.engine.jdbc.spi.SchemaNameResolver",
- "org.hibernate.annotations.common.util.StandardClassLoaderDelegateImpl",
- "org.hibernate.IdentifierLoadAccess",
- "org.hibernate.annotations.common.reflection.ClassLoadingException",
- "org.hibernate.metamodel.domain.AttributeContainer",
- "org.hibernate.type.UUIDCharType",
- "org.hibernate.transform.ResultTransformer",
- "org.hibernate.cache.internal.NoCachingRegionFactory",
- "org.hibernate.service.spi.ServiceException",
- "org.hibernate.internal.util.collections.CollectionHelper",
- "org.hibernate.exception.spi.SQLExceptionConversionDelegate",
- "org.hibernate.secure.spi.PermissibleAction",
- "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe",
- "org.hibernate.annotations.common.reflection.java.JavaMetadataProvider",
- "org.hibernate.Filter",
- "org.hibernate.context.spi.CurrentTenantIdentifierResolver",
- "org.hibernate.SQLQuery",
- "org.hibernate.Interceptor",
- "org.dom4j.tree.ConcurrentReaderHashMap$Values",
- "org.dom4j.io.SAXHelper",
- "org.hibernate.engine.jndi.JndiException",
- "org.hibernate.dialect.MckoiDialect",
- "org.hibernate.engine.transaction.internal.TransactionFactoryInitiator",
- "org.hibernate.LobHelper",
- "org.hibernate.exception.spi.ConversionContext",
- "org.hibernate.JDBCException",
- "org.hibernate.engine.jdbc.dialect.internal.DialectResolverSet",
- "org.hibernate.type.TextType",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor",
- "org.hibernate.dialect.Oracle10gDialect",
- "org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport",
- "org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder",
- "org.hibernate.id.AbstractUUIDGenerator",
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
- "org.hibernate.hql.spi.MultiTableBulkIdStrategy",
- "org.hibernate.type.LiteralType",
- "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryInitiator",
- "org.hibernate.service.spi.SessionFactoryServiceRegistryFactory",
- "org.hibernate.metamodel.spi.TypeContributions",
- "org.hibernate.service.spi.InjectService",
- "org.hibernate.engine.loading.internal.EntityLoadContext",
- "org.hibernate.type.ClassType",
- "org.hibernate.type.TypeFactory$TypeScope",
- "org.hibernate.type.descriptor.java.ArrayMutabilityPlan",
- "org.hibernate.bytecode.buildtime.spi.FieldFilter",
- "org.hibernate.cache.spi.QueryCacheFactory",
- "org.hibernate.criterion.CriteriaSpecification",
- "org.hibernate.type.ArrayType",
- "org.hibernate.type.CharArrayType",
- "org.hibernate.engine.transaction.jta.platform.internal.OrionJtaPlatform",
- "org.jboss.logging.Logger$1",
- "org.hibernate.boot.registry.selector.internal.StrategySelectorImpl",
- "org.hibernate.type.ProcedureParameterExtractionAware",
- "org.hibernate.MappingException",
- "org.hibernate.mapping.Fetchable",
- "org.hibernate.type.AbstractType",
- "org.hibernate.dialect.MySQL5Dialect",
- "org.hibernate.engine.spi.SessionImplementor",
- "org.hibernate.dialect.InterbaseDialect",
- "org.hibernate.type.descriptor.sql.BinaryTypeDescriptor",
- "org.dom4j.tree.ConcurrentReaderHashMap$1",
- "org.hibernate.type.TrueFalseType",
- "org.hibernate.event.spi.PostInsertEventListener",
- "org.hibernate.type.StringRepresentableType",
- "org.hibernate.internal.CoreMessageLogger",
- "org.hibernate.tuple.InDatabaseValueGenerationStrategy",
- "org.hibernate.dialect.Cache71Dialect",
- "org.hibernate.secure.spi.PermissionCheckEntityInformation",
- "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor$TimeMutabilityPlan",
- "org.hibernate.tuple.InMemoryValueGenerationStrategy",
- "org.hibernate.type.EntityType",
- "org.hibernate.event.internal.EntityCopyAllowedObserver",
- "org.dom4j.tree.AbstractElement",
- "org.hibernate.dialect.ProgressDialect",
- "org.hibernate.cfg.Settings",
- "org.dom4j.DocumentFactory",
- "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractorInitiator",
- "org.dom4j.DocumentException",
- "org.hibernate.type.descriptor.java.SerializableTypeDescriptor$SerializableMutabilityPlan",
- "org.dom4j.tree.ConcurrentReaderHashMap$EntrySet",
- "org.hibernate.type.CalendarDateType",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.hibernate.type.StringType",
- "org.openecomp.mso.logger.MessageEnum",
- "org.jboss.logging.Slf4jLocationAwareLogger",
- "org.hibernate.type.StringNVarcharType",
- "org.hibernate.engine.transaction.spi.TransactionFactory",
- "org.hibernate.cfg.AttributeConverterDefinition",
- "org.hibernate.FlushMode",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2$1",
- "org.hibernate.type.MaterializedBlobType",
- "org.hibernate.event.spi.EntityCopyObserver",
- "org.hibernate.cfg.EJB3DTDEntityResolver",
- "org.hibernate.annotations.common.util.impl.Log",
- "org.hibernate.dialect.SQLServer2008Dialect",
- "org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfoSource",
- "org.hibernate.type.descriptor.java.CalendarTypeDescriptor",
- "org.hibernate.type.descriptor.ValueExtractor",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.hibernate.service.spi.Wrapped",
- "org.hibernate.bytecode.spi.EntityInstrumentationMetadata",
- "org.hibernate.id.PersistentIdentifierGenerator",
- "org.hibernate.internal.CoreLogging",
- "org.hibernate.type.OrderedMapType",
- "org.hibernate.jdbc.ReturningWork",
- "org.hibernate.metamodel.relational.Size$LobMultiplier",
- "org.hibernate.boot.registry.StandardServiceInitiator"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CatalogDatabaseESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.db.catalog.CatalogDatabase",
- "org.openecomp.mso.db.catalog.beans.VnfComponent",
- "org.openecomp.mso.db.catalog.beans.HeatTemplate",
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
- "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles",
- "org.jboss.logging.Logger",
- "org.jboss.logging.DelegatingBasicLogger",
- "org.hibernate.internal.CoreMessageLogger_$logger",
- "org.jboss.logging.Slf4jLocationAwareLogger",
- "org.jboss.logging.Logger$Level",
- "org.jboss.logging.Slf4jLocationAwareLogger$1",
- "org.jboss.logging.LoggerProviders",
- "org.hibernate.cfg.MetadataSourceType",
- "org.hibernate.cfg.Configuration",
- "org.hibernate.cfg.SettingsFactory",
- "org.hibernate.type.TypeResolver",
- "org.hibernate.type.BasicTypeRegistry",
- "org.hibernate.metamodel.relational.Size",
- "org.hibernate.metamodel.relational.Size$LobMultiplier",
- "org.hibernate.type.AbstractStandardBasicType",
- "org.hibernate.type.AbstractSingleColumnStandardBasicType",
- "org.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry",
- "org.hibernate.type.descriptor.sql.BooleanTypeDescriptor",
- "org.hibernate.type.descriptor.java.AbstractTypeDescriptor",
- "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
- "org.hibernate.internal.util.compare.ComparableComparator",
- "org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry",
- "org.hibernate.type.descriptor.java.BooleanTypeDescriptor",
- "org.hibernate.type.BooleanType",
- "org.hibernate.type.descriptor.sql.IntegerTypeDescriptor",
- "org.hibernate.type.NumericBooleanType",
- "org.hibernate.type.descriptor.sql.VarcharTypeDescriptor",
- "org.hibernate.type.descriptor.sql.CharTypeDescriptor",
- "org.hibernate.type.TrueFalseType",
- "org.hibernate.type.YesNoType",
- "org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor",
- "org.hibernate.type.descriptor.java.ByteTypeDescriptor",
- "org.hibernate.type.ByteType",
- "org.hibernate.type.descriptor.java.CharacterTypeDescriptor",
- "org.hibernate.type.CharacterType",
- "org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor",
- "org.hibernate.type.descriptor.java.ShortTypeDescriptor",
- "org.hibernate.type.ShortType",
- "org.hibernate.type.descriptor.java.IntegerTypeDescriptor",
- "org.hibernate.type.IntegerType",
- "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
- "org.hibernate.type.descriptor.java.LongTypeDescriptor",
- "org.hibernate.type.LongType",
- "org.hibernate.type.descriptor.sql.RealTypeDescriptor",
- "org.hibernate.type.descriptor.sql.FloatTypeDescriptor",
- "org.hibernate.type.descriptor.java.FloatTypeDescriptor",
- "org.hibernate.type.FloatType",
- "org.hibernate.type.descriptor.sql.DoubleTypeDescriptor",
- "org.hibernate.type.descriptor.java.DoubleTypeDescriptor",
- "org.hibernate.type.DoubleType",
- "org.hibernate.type.descriptor.sql.DecimalTypeDescriptor",
- "org.hibernate.type.descriptor.sql.NumericTypeDescriptor",
- "org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor",
- "org.hibernate.type.BigDecimalType",
- "org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor",
- "org.hibernate.type.BigIntegerType",
- "org.hibernate.type.descriptor.java.StringTypeDescriptor",
- "org.hibernate.type.StringType",
- "org.hibernate.type.descriptor.sql.NVarcharTypeDescriptor",
- "org.hibernate.type.StringNVarcharType",
- "org.hibernate.type.descriptor.sql.NCharTypeDescriptor",
- "org.hibernate.type.CharacterNCharType",
- "org.hibernate.type.descriptor.java.UrlTypeDescriptor",
- "org.hibernate.type.UrlType",
- "org.hibernate.type.descriptor.sql.DateTypeDescriptor",
- "org.hibernate.type.descriptor.java.MutableMutabilityPlan",
- "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor$DateMutabilityPlan",
- "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor",
- "org.hibernate.type.DateType",
- "org.hibernate.type.descriptor.sql.TimeTypeDescriptor",
- "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor$TimeMutabilityPlan",
- "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor",
- "org.hibernate.type.TimeType",
- "org.hibernate.type.descriptor.sql.TimestampTypeDescriptor",
- "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor$TimestampMutabilityPlan",
- "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor",
- "org.hibernate.type.TimestampType",
- "org.hibernate.type.DbTimestampType",
- "org.hibernate.type.descriptor.java.CalendarTypeDescriptor$CalendarMutabilityPlan",
- "org.hibernate.type.descriptor.java.CalendarTypeDescriptor",
- "org.hibernate.type.CalendarType",
- "org.hibernate.type.descriptor.java.CalendarDateTypeDescriptor",
- "org.hibernate.type.CalendarDateType",
- "org.hibernate.type.descriptor.java.LocaleTypeDescriptor",
- "org.hibernate.type.LocaleType",
- "org.hibernate.type.descriptor.java.CurrencyTypeDescriptor",
- "org.hibernate.type.CurrencyType",
- "org.hibernate.type.descriptor.java.TimeZoneTypeDescriptor",
- "org.hibernate.type.TimeZoneType",
- "org.hibernate.type.descriptor.java.ClassTypeDescriptor",
- "org.hibernate.type.ClassType",
- "org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor",
- "org.hibernate.type.descriptor.sql.BinaryTypeDescriptor",
- "org.hibernate.type.descriptor.java.UUIDTypeDescriptor",
- "org.hibernate.type.UUIDBinaryType",
- "org.hibernate.type.UUIDCharType",
- "org.hibernate.type.PostgresUUIDType$PostgresUUIDSqlTypeDescriptor",
- "org.hibernate.type.PostgresUUIDType",
- "org.hibernate.type.descriptor.java.ArrayMutabilityPlan",
- "org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor",
- "org.hibernate.type.BinaryType",
- "org.hibernate.type.descriptor.java.ByteArrayTypeDescriptor",
- "org.hibernate.type.WrapperBinaryType",
- "org.hibernate.type.descriptor.sql.LongVarbinaryTypeDescriptor",
- "org.hibernate.type.ImageType",
- "org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor",
- "org.hibernate.type.CharArrayType",
- "org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor",
- "org.hibernate.type.CharacterArrayType",
- "org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor",
- "org.hibernate.type.TextType",
- "org.hibernate.type.descriptor.sql.LongNVarcharTypeDescriptor",
- "org.hibernate.type.NTextType",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5",
- "org.hibernate.type.descriptor.sql.BlobTypeDescriptor",
- "org.hibernate.type.descriptor.java.BlobTypeDescriptor$BlobMutabilityPlan",
- "org.hibernate.type.descriptor.java.BlobTypeDescriptor",
- "org.hibernate.type.BlobType",
- "org.hibernate.type.MaterializedBlobType",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5",
- "org.hibernate.type.descriptor.sql.ClobTypeDescriptor",
- "org.hibernate.type.descriptor.java.ClobTypeDescriptor$ClobMutabilityPlan",
- "org.hibernate.type.descriptor.java.ClobTypeDescriptor",
- "org.hibernate.type.ClobType",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4",
- "org.hibernate.type.descriptor.sql.NClobTypeDescriptor",
- "org.hibernate.type.descriptor.java.NClobTypeDescriptor$NClobMutabilityPlan",
- "org.hibernate.type.descriptor.java.NClobTypeDescriptor",
- "org.hibernate.type.NClobType",
- "org.hibernate.type.MaterializedClobType",
- "org.hibernate.type.MaterializedNClobType",
- "org.hibernate.type.descriptor.java.SerializableTypeDescriptor",
- "org.hibernate.type.descriptor.java.SerializableTypeDescriptor$SerializableMutabilityPlan",
- "org.hibernate.type.SerializableType",
- "org.hibernate.type.AbstractType",
- "org.hibernate.type.AnyType",
- "org.hibernate.type.ObjectType",
- "org.hibernate.type.AdaptedImmutableType",
- "org.hibernate.type.TypeFactory",
- "org.hibernate.type.TypeFactory$TypeScopeImpl",
- "org.hibernate.cfg.Configuration$ObjectNameNormalizerImpl",
- "org.hibernate.cfg.Configuration$MetadataSourceQueue",
- "org.hibernate.cfg.annotations.reflection.JPAMetadataProvider",
- "org.hibernate.cfg.annotations.reflection.XMLContext",
- "org.hibernate.annotations.common.util.impl.Log_$logger",
- "org.hibernate.annotations.common.reflection.java.JavaReflectionManager",
- "org.hibernate.annotations.common.util.StandardClassLoaderDelegateImpl",
- "org.hibernate.internal.util.xml.DTDEntityResolver",
- "org.hibernate.internal.util.xml.XMLHelper",
- "org.hibernate.EmptyInterceptor",
- "org.hibernate.internal.util.ConfigHelper",
- "org.hibernate.internal.util.ClassLoaderHelper",
- "org.hibernate.HibernateException",
- "org.hibernate.internal.util.config.ConfigurationHelper",
- "org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl",
- "org.hibernate.cfg.Environment",
- "org.hibernate.tuple.entity.EntityTuplizerFactory",
- "org.hibernate.EntityMode",
- "org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory",
- "org.hibernate.cfg.EJB3NamingStrategy",
- "org.hibernate.cfg.EJB3DTDEntityResolver",
- "org.hibernate.internal.util.xml.ErrorLogger",
- "org.dom4j.io.SAXReader",
- "org.dom4j.io.SAXHelper",
- "org.dom4j.DocumentFactory",
- "org.dom4j.tree.AbstractNode",
- "org.dom4j.tree.AbstractBranch",
- "org.dom4j.tree.AbstractDocument",
- "org.dom4j.tree.DefaultDocument",
- "org.dom4j.tree.AbstractCharacterData",
- "org.dom4j.tree.AbstractComment",
- "org.dom4j.tree.FlyweightComment",
- "org.dom4j.tree.DefaultComment",
- "org.dom4j.tree.AbstractDocumentType",
- "org.dom4j.tree.DefaultDocumentType",
- "org.dom4j.tree.NamespaceCache",
- "org.dom4j.tree.ConcurrentReaderHashMap",
- "org.dom4j.tree.ConcurrentReaderHashMap$BarrierLock",
- "org.dom4j.Namespace",
- "org.dom4j.QName",
- "org.dom4j.tree.AbstractElement",
- "org.dom4j.tree.DefaultElement",
- "org.dom4j.tree.AbstractAttribute",
- "org.dom4j.tree.FlyweightAttribute",
- "org.dom4j.tree.DefaultAttribute",
- "org.dom4j.tree.AbstractText",
- "org.dom4j.tree.FlyweightText",
- "org.dom4j.tree.DefaultText",
- "org.dom4j.tree.BackedList",
- "org.hibernate.internal.util.xml.OriginImpl",
- "org.hibernate.internal.util.xml.MappingReader",
- "org.hibernate.internal.util.xml.XmlDocumentImpl",
- "org.hibernate.boot.registry.StandardServiceRegistryBuilder",
- "org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder",
- "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl",
- "org.hibernate.integrator.internal.IntegratorServiceImpl",
- "org.hibernate.cfg.beanvalidation.BeanValidationIntegrator",
- "org.hibernate.secure.spi.JaccIntegrator",
- "org.hibernate.cache.internal.CollectionCacheInvalidator",
- "org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl",
- "org.hibernate.boot.registry.selector.internal.StrategySelectorImpl",
- "org.hibernate.service.spi.ServiceBinding",
- "org.hibernate.engine.config.internal.ConfigurationServiceInitiator",
- "org.hibernate.tool.hbm2ddl.SingleLineSqlCommandExtractor",
- "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractorInitiator",
- "org.hibernate.engine.jndi.internal.JndiServiceInitiator",
- "org.hibernate.jmx.internal.JmxServiceInitiator",
- "org.hibernate.persister.internal.PersisterClassResolverInitiator",
- "org.hibernate.persister.internal.PersisterFactoryInitiator",
- "org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator",
- "org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator",
- "org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator",
- "org.hibernate.engine.jdbc.dialect.internal.DialectFactoryInitiator",
- "org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator",
- "org.hibernate.engine.jdbc.internal.JdbcServicesInitiator",
- "org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator",
- "org.hibernate.id.factory.internal.MutableIdentifierGeneratorFactoryInitiator",
- "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator",
- "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator",
- "org.hibernate.engine.transaction.internal.TransactionFactoryInitiator",
- "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryInitiator",
- "org.hibernate.cache.internal.RegionFactoryInitiator",
- "org.hibernate.service.StandardServiceInitiators",
- "org.hibernate.service.ConfigLoader",
- "org.hibernate.internal.util.ValueHolder",
- "org.hibernate.secure.internal.DisabledJaccServiceImpl",
- "org.hibernate.service.internal.AbstractServiceRegistryImpl",
- "org.hibernate.service.internal.ConcurrentServiceBinding",
- "org.hibernate.internal.util.collections.CollectionHelper",
- "org.hibernate.engine.jdbc.internal.JdbcServicesImpl",
- "org.hibernate.MultiTenancyStrategy",
- "org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl",
- "org.hibernate.engine.jndi.internal.JndiServiceImpl"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java
deleted file mode 100644
index 2f0a1c85ae..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:34:38 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import java.sql.Timestamp;
-import java.time.Instant;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.mock.java.time.MockInstant;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class AllottedResourceCustomizationESTest extends AllottedResourceCustomizationESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelVersion("T2<n67gDL");
- String string0 = allottedResourceCustomization0.getModelVersion();
- assertEquals("T2<n67gDL", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelUuid("/jt");
- String string0 = allottedResourceCustomization0.getModelUuid();
- assertEquals("/jt", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelName("Pf");
- String string0 = allottedResourceCustomization0.getModelName();
- assertEquals("Pf", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelInvariantUuid("");
- String string0 = allottedResourceCustomization0.getModelInvariantUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelInstanceName("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null");
- String string0 = allottedResourceCustomization0.getModelInstanceName();
- assertEquals("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelCustomizationUuid("(;CXN3pGApF720T|Z");
- String string0 = allottedResourceCustomization0.getModelCustomizationUuid();
- assertEquals("(;CXN3pGApF720T|Z", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setDescription("Pf");
- String string0 = allottedResourceCustomization0.getDescription();
- assertEquals("Pf", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setDescription("");
- String string0 = allottedResourceCustomization0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- Instant instant0 = MockInstant.now();
- Timestamp timestamp0 = Timestamp.from(instant0);
- allottedResourceCustomization0.setCreated(timestamp0);
- Timestamp timestamp1 = allottedResourceCustomization0.getCreated();
- assertEquals(320000000, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.toString();
- assertEquals("modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelUuid("");
- String string0 = allottedResourceCustomization0.getModelUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelCustomizationUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelVersion();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- Timestamp timestamp0 = new Timestamp(0L);
- allottedResourceCustomization0.setCreated(timestamp0);
- Timestamp timestamp1 = allottedResourceCustomization0.getCreated();
- assertEquals(0, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelInstanceName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelVersion("");
- String string0 = allottedResourceCustomization0.getModelVersion();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelName("");
- String string0 = allottedResourceCustomization0.getModelName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelInstanceName("");
- String string0 = allottedResourceCustomization0.getModelInstanceName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- String string0 = allottedResourceCustomization0.getModelInvariantUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelInvariantUuid("JxwW-uj$dU[pMX`|;GM");
- String string0 = allottedResourceCustomization0.getModelInvariantUuid();
- assertEquals("JxwW-uj$dU[pMX`|;GM", string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- Timestamp timestamp0 = allottedResourceCustomization0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- allottedResourceCustomization0.setModelCustomizationUuid("");
- String string0 = allottedResourceCustomization0.getModelCustomizationUuid();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java
deleted file mode 100644
index b1b8251957..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomizationESTestscaffolding.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:34:38 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class AllottedResourceCustomizationESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AllottedResourceCustomizationESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java
deleted file mode 100644
index 4c3a257acf..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:13:39 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HeatEnvironmentESTest extends HeatEnvironmentESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setName("");
- String string0 = heatEnvironment0.getName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setId(4618);
- int int0 = heatEnvironment0.getId();
- assertEquals(4618, int0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setId((-2248));
- int int0 = heatEnvironment0.getId();
- assertEquals((-2248), int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setEnvironment("=?");
- String string0 = heatEnvironment0.getEnvironment();
- assertEquals("=?", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setEnvironment("");
- String string0 = heatEnvironment0.getEnvironment();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setDescription("&G");
- String string0 = heatEnvironment0.getDescription();
- assertEquals("&G", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setDescription("");
- String string0 = heatEnvironment0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- Timestamp timestamp0 = new Timestamp((long) 0);
- heatEnvironment0.setCreated(timestamp0);
- Timestamp timestamp1 = heatEnvironment0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcUuid("L5UX?<T)6#pS4l");
- String string0 = heatEnvironment0.getAsdcUuid();
- assertEquals("L5UX?<T)6#pS4l", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcUuid("");
- String string0 = heatEnvironment0.getAsdcUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcResourceName("?zKdIbs8Xk_.4!");
- String string0 = heatEnvironment0.getAsdcResourceName();
- assertEquals("?zKdIbs8Xk_.4!", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcResourceName("");
- String string0 = heatEnvironment0.getAsdcResourceName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcLabel(".");
- String string0 = heatEnvironment0.getAsdcLabel();
- assertEquals(".", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcLabel("");
- String string0 = heatEnvironment0.getAsdcLabel();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- Timestamp timestamp0 = new Timestamp((long) 0);
- heatEnvironment0.setCreated(timestamp0);
- String string0 = heatEnvironment0.toString();
- assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=null, asdcResourceName=null,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcResourceName("?zKdIbs8Xk_.4!");
- String string0 = heatEnvironment0.toString();
- assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=null, asdcResourceName=?zKdIbs8Xk_.4!", string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setAsdcUuid("");
- String string0 = heatEnvironment0.toString();
- assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=, asdcResourceName=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setDescription("?zKdIbs8Xk_.4!");
- String string0 = heatEnvironment0.toString();
- assertEquals("ID=0, name=null, version=null, description=?zKdIbs8Xk_.4!, environment=null, asdcUuid=null, asdcResourceName=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setName("}");
- String string0 = heatEnvironment0.getName();
- assertEquals("}", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getAsdcUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getEnvironment();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- int int0 = heatEnvironment0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- Timestamp timestamp0 = new Timestamp(356L);
- heatEnvironment0.setCreated(timestamp0);
- Timestamp timestamp1 = heatEnvironment0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getAsdcResourceName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- heatEnvironment0.setEnvironment("");
- String string0 = heatEnvironment0.toString();
- assertEquals("ID=0, name=null, version=null, description=null, environment=, asdcUuid=null, asdcResourceName=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- Timestamp timestamp0 = heatEnvironment0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getAsdcLabel();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- HeatEnvironment heatEnvironment0 = new HeatEnvironment();
- String string0 = heatEnvironment0.getDescription();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java
deleted file mode 100644
index 2a67441402..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:13:39 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HeatEnvironmentESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatEnvironment";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatEnvironmentESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.HeatEnvironment"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java
deleted file mode 100644
index ceb7f3b57c..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:17:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HeatFilesESTest extends HeatFilesESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setVnfResourceId(1);
- int int0 = heatFiles0.getVnfResourceId();
- assertEquals(1, int0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setVnfResourceId((-1));
- int int0 = heatFiles0.getVnfResourceId();
- assertEquals((-1), int0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setId(1401);
- int int0 = heatFiles0.getId();
- assertEquals(1401, int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setId((-356));
- int int0 = heatFiles0.getId();
- assertEquals((-356), int0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileName("~%Ab#a%tf");
- String string0 = heatFiles0.getFileName();
- assertEquals("~%Ab#a%tf", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileName("");
- String string0 = heatFiles0.getFileName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileBody("M9]V'AWK/44+BD");
- String string0 = heatFiles0.getFileBody();
- assertEquals("M9]V'AWK/44+BD", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileBody("");
- String string0 = heatFiles0.getFileBody();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setDescription("~%Ab#a%tf");
- String string0 = heatFiles0.getDescription();
- assertEquals("~%Ab#a%tf", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setDescription("");
- String string0 = heatFiles0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- Timestamp timestamp0 = new Timestamp(0L);
- heatFiles0.setCreated(timestamp0);
- Timestamp timestamp1 = heatFiles0.getCreated();
- assertEquals("1970-01-01 00:00:00.0", timestamp1.toString());
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcUuid("g$ vwC-q.`GT#b[<C");
- String string0 = heatFiles0.getAsdcUuid();
- assertEquals("g$ vwC-q.`GT#b[<C", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcUuid("");
- String string0 = heatFiles0.getAsdcUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcResourceName("");
- String string0 = heatFiles0.getAsdcResourceName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcLabel("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0");
- String string0 = heatFiles0.getAsdcLabel();
- assertEquals("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- Timestamp timestamp0 = new Timestamp(0L);
- heatFiles0.setCreated(timestamp0);
- String string0 = heatFiles0.toString();
- assertEquals("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null,created=1/1/70 12:00 AM, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcResourceName("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0");
- String string0 = heatFiles0.toString();
- assertEquals("ID=0, description=null, fileName=null, fileBody=null,asdcResourceName=ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setDescription(".");
- String string0 = heatFiles0.toString();
- assertEquals("ID=0, description=., fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcResourceName("+^hG");
- String string0 = heatFiles0.getAsdcResourceName();
- assertEquals("+^hG", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileName("");
- String string0 = heatFiles0.toString();
- assertEquals("ID=0, description=null,fileName=, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- int int0 = heatFiles0.getVnfResourceId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- Timestamp timestamp0 = heatFiles0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- Timestamp timestamp0 = new Timestamp(2247L);
- heatFiles0.setCreated(timestamp0);
- Timestamp timestamp1 = heatFiles0.getCreated();
- assertEquals(247000000, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setFileBody("");
- String string0 = heatFiles0.toString();
- assertEquals("ID=0, description=null, fileName=null,fileBody=, asdcResourceName=null, vnfResourceId=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getAsdcLabel();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getFileName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- int int0 = heatFiles0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getFileBody();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getAsdcResourceName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- String string0 = heatFiles0.getAsdcUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- HeatFiles heatFiles0 = new HeatFiles();
- heatFiles0.setAsdcLabel("");
- String string0 = heatFiles0.getAsdcLabel();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java
deleted file mode 100644
index 8fd20de9ce..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:17:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HeatFilesESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatFiles";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatFilesESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.HeatFiles"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java
deleted file mode 100644
index a741bb6896..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:15:57 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HeatNestedTemplateESTest extends HeatNestedTemplateESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setChildTemplateId(3403);
- heatNestedTemplate0.hashCode();
- assertEquals(3403, heatNestedTemplate0.getChildTemplateId());
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setParentTemplateId(1980);
- HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
- boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
- assertEquals(1980, heatNestedTemplate0.getParentTemplateId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
- heatNestedTemplate0.setChildTemplateId((-2202));
- boolean boolean0 = heatNestedTemplate1.equals(heatNestedTemplate0);
- assertEquals(-2202, heatNestedTemplate0.getChildTemplateId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate0);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setProviderResourceFile("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate");
- String string0 = heatNestedTemplate0.getProviderResourceFile();
- assertEquals("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setProviderResourceFile("");
- String string0 = heatNestedTemplate0.getProviderResourceFile();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setParentTemplateId(1173);
- int int0 = heatNestedTemplate0.getParentTemplateId();
- assertEquals(1173, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setParentTemplateId((-1085));
- int int0 = heatNestedTemplate0.getParentTemplateId();
- assertEquals((-1085), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setChildTemplateId(1307);
- int int0 = heatNestedTemplate0.getChildTemplateId();
- assertEquals(1307, int0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setChildTemplateId((-1857));
- int int0 = heatNestedTemplate0.getChildTemplateId();
- assertEquals((-1857), int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- int int0 = heatNestedTemplate0.getParentTemplateId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- int int0 = heatNestedTemplate0.getChildTemplateId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
- heatNestedTemplate1.setChildTemplateId(231);
- boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
- assertEquals(231, heatNestedTemplate1.getChildTemplateId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- boolean boolean0 = heatNestedTemplate0.equals((Object) null);
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- String string0 = heatNestedTemplate0.toString();
- assertEquals("ParentTemplateId=0, ChildTemplateId=0, providerResourceFile=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setProviderResourceFile("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate");
- String string0 = heatNestedTemplate0.toString();
- assertEquals("ParentTemplateId=0, ChildTemplateId=0,providerResourceFile=org.openecomp.mso.db.catalog.beans.HeatNestedTemplate", string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- String string0 = heatNestedTemplate0.getProviderResourceFile();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
- boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- heatNestedTemplate0.setParentTemplateId((-511));
- HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
- boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
- assertEquals(-511, heatNestedTemplate0.getParentTemplateId());
- assertFalse(boolean0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java
deleted file mode 100644
index 31b4b0304c..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:15:57 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HeatNestedTemplateESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatNestedTemplateESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HeatNestedTemplateESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java
deleted file mode 100644
index d20f64af9a..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:12:27 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.sql.Timestamp;
-import java.time.LocalDateTime;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
-import org.evosuite.runtime.testdata.EvoSuiteFile;
-import org.evosuite.runtime.testdata.FileSystemHandling;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HeatTemplateESTest extends HeatTemplateESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTimeoutMinutes(313);
- int int0 = heatTemplate0.getTimeoutMinutes();
- assertEquals(313, int0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTimeoutMinutes((-1781));
- int int0 = heatTemplate0.getTimeoutMinutes();
- assertEquals((-1781), int0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplatePath("9PO'c]OQ>6N |");
- String string0 = heatTemplate0.getTemplatePath();
- assertEquals("9PO'c]OQ>6N |", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateName("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null");
- String string0 = heatTemplate0.getTemplateName();
- assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateName("");
- String string0 = heatTemplate0.getTemplateName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateBody("ParentTemplateId=");
- String string0 = heatTemplate0.getTemplateBody();
- assertEquals("ParentTemplateId=", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateBody("");
- String string0 = heatTemplate0.getTemplateBody();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- heatTemplate0.setParameters(linkedHashSet0);
- Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
- assertEquals(0, set0.size());
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- linkedHashSet0.add(heatTemplateParam0);
- heatTemplate0.setParameters(linkedHashSet0);
- Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
- assertFalse(set0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setId(118);
- int int0 = heatTemplate0.getId();
- assertEquals(118, int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setId((-340));
- int int0 = heatTemplate0.getId();
- assertEquals((-340), int0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatNestedTemplate> linkedHashSet0 = new LinkedHashSet<HeatNestedTemplate>();
- HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
- linkedHashSet0.add(heatNestedTemplate0);
- heatTemplate0.setFiles(linkedHashSet0);
- Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
- assertFalse(set0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setDescription("PARENT_COMPLETE");
- String string0 = heatTemplate0.getDescription();
- assertEquals("PARENT_COMPLETE", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setDescription("");
- String string0 = heatTemplate0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LocalDateTime localDateTime0 = MockLocalDateTime.now();
- Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
- heatTemplate0.setCreated(timestamp0);
- Timestamp timestamp1 = heatTemplate0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcUuid("msg");
- String string0 = heatTemplate0.getAsdcUuid();
- assertEquals("msg", string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcResourceName("!IMW$RE2UtEWIEeJc5");
- String string0 = heatTemplate0.getAsdcResourceName();
- assertEquals("!IMW$RE2UtEWIEeJc5", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcLabel("<JH|c2");
- String string0 = heatTemplate0.getAsdcLabel();
- assertEquals("<JH|c2", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcLabel("");
- String string0 = heatTemplate0.getAsdcLabel();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- linkedHashSet0.add((HeatTemplateParam) null);
- heatTemplate0.setParameters(linkedHashSet0);
- // Undeclared exception!
- try {
- heatTemplate0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.beans.HeatTemplate", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setRequired(true);
- linkedHashSet0.add(heatTemplateParam0);
- heatTemplate0.setParameters(linkedHashSet0);
- String string0 = heatTemplate0.toString();
- assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,params=[null(reqd)]", string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- linkedHashSet0.add(heatTemplateParam0);
- heatTemplate0.setParameters(linkedHashSet0);
- String string0 = heatTemplate0.toString();
- assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,params=[null]", string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LocalDateTime localDateTime0 = MockLocalDateTime.now();
- Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
- heatTemplate0.setCreated(timestamp0);
- String string0 = heatTemplate0.toString();
- assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,created=2/14/14 8:21 PM", string0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateBody("]");
- String string0 = heatTemplate0.toString();
- assertEquals("Template=null,version=null,path=null,body=(1 chars),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateBody("]");
- String string0 = heatTemplate0.getHeatTemplate();
- assertEquals("]", string0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getAsdcLabel();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getTemplatePath();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
- assertNull(set0);
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplateBody("");
- String string0 = heatTemplate0.getHeatTemplate();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test32() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- Timestamp timestamp0 = heatTemplate0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test33() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
- assertNull(set0);
- }
-
- @Test(timeout = 4000)
- public void test34() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test35() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcResourceName("");
- String string0 = heatTemplate0.getAsdcResourceName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test36() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getAsdcUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test37() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatNestedTemplate> linkedHashSet0 = new LinkedHashSet<HeatNestedTemplate>();
- heatTemplate0.setFiles(linkedHashSet0);
- Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
- assertTrue(set0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test38() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
- heatTemplate0.setParameters(linkedHashSet0);
- String string0 = heatTemplate0.toString();
- assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test39() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setTemplatePath("");
- String string0 = heatTemplate0.getTemplatePath();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test40() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- Timestamp timestamp0 = new Timestamp(0L);
- heatTemplate0.setCreated(timestamp0);
- Timestamp timestamp1 = heatTemplate0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test41() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getAsdcResourceName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test42() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- int int0 = heatTemplate0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test43() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getTemplateName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test44() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- String string0 = heatTemplate0.getTemplateBody();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test45() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- int int0 = heatTemplate0.getTimeoutMinutes();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test46() throws Throwable {
- HeatTemplate heatTemplate0 = new HeatTemplate();
- heatTemplate0.setAsdcUuid("");
- String string0 = heatTemplate0.getAsdcUuid();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java
deleted file mode 100644
index 538852c3b0..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:12:27 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HeatTemplateESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatTemplate";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatTemplateESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.entity.MsoRequest",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "com.att.eelf.configuration.EELFLogger",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.db.catalog.beans.HeatTemplate",
- "org.openecomp.mso.db.catalog.beans.HeatTemplateParam",
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
- "com.att.eelf.configuration.SLF4jWrapper",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "com.att.eelf.i18n.EELFResourceManager"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HeatTemplateESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.db.catalog.beans.HeatTemplate",
- "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java
deleted file mode 100644
index f084204170..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:22:57 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HeatTemplateParamESTest extends HeatTemplateParamESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setRequired(true);
- boolean boolean0 = heatTemplateParam0.isRequired();
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamType("");
- String string0 = heatTemplateParam0.getParamType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamName("c_(T_3dD%");
- String string0 = heatTemplateParam0.getParamName();
- assertEquals("c_(T_3dD%", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamName("");
- String string0 = heatTemplateParam0.getParamName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamAlias("Param=c_(T_3dD%,type=null,required=false,paramAlias=null");
- String string0 = heatTemplateParam0.getParamAlias();
- assertEquals("Param=c_(T_3dD%,type=null,required=false,paramAlias=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamAlias("");
- String string0 = heatTemplateParam0.getParamAlias();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setId(10);
- int int0 = heatTemplateParam0.getId();
- assertEquals(10, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setId((-5343));
- int int0 = heatTemplateParam0.getId();
- assertEquals((-5343), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setHeatTemplateId(10);
- int int0 = heatTemplateParam0.getHeatTemplateId();
- assertEquals(10, int0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- String string0 = heatTemplateParam0.toString();
- assertEquals("Param=null,type=null,required=false,paramAlias=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- int int0 = heatTemplateParam0.getHeatTemplateId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- String string0 = heatTemplateParam0.getParamType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- String string0 = heatTemplateParam0.getParamAlias();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- boolean boolean0 = heatTemplateParam0.isRequired();
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setHeatTemplateId((-1));
- int int0 = heatTemplateParam0.getHeatTemplateId();
- assertEquals((-1), int0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- int int0 = heatTemplateParam0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- String string0 = heatTemplateParam0.getParamName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
- heatTemplateParam0.setParamType("(pA6");
- String string0 = heatTemplateParam0.getParamType();
- assertEquals("(pA6", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java
deleted file mode 100644
index 1fbef16290..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:22:57 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HeatTemplateParamESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatTemplateParam";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatTemplateParamESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.HeatTemplateParam"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java
deleted file mode 100644
index 545d689378..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTest.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:32:26 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import java.sql.Timestamp;
-import java.util.HashMap;
-import java.util.Map;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ModelESTest extends ModelESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- Model model0 = new Model();
- HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- hashMap0.putIfAbsent("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", serviceRecipe0);
- model0.setRecipes(hashMap0);
- Map<String, ServiceRecipe> map0 = model0.getRecipes();
- assertEquals(1, map0.size());
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- Model model0 = new Model();
- model0.setModelVersionId("9WI;kp?]");
- String string0 = model0.getModelVersionId();
- assertEquals("9WI;kp?]", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- Model model0 = new Model();
- model0.setModelVersion("_Y+vZ)59ie");
- String string0 = model0.getModelVersion();
- assertEquals("_Y+vZ)59ie", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- Model model0 = new Model();
- model0.setModelType("{!]r;T");
- String string0 = model0.getModelType();
- assertEquals("{!]r;T", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- Model model0 = new Model();
- model0.setModelName(", description=");
- String string0 = model0.getModelName();
- assertEquals(", description=", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- Model model0 = new Model();
- model0.setModelInvariantId(".m");
- String string0 = model0.getModelInvariantId();
- assertEquals(".m", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- Model model0 = new Model();
- model0.setModelCustomizationName("|<HBAfp\"RZv\"?mz&H");
- String string0 = model0.getModelCustomizationName();
- assertEquals("|<HBAfp\"RZv\"?mz&H", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- Model model0 = new Model();
- model0.setModelCustomizationId("RA");
- String string0 = model0.getModelCustomizationId();
- assertEquals("RA", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- Model model0 = new Model();
- model0.setModelCustomizationId("");
- String string0 = model0.getModelCustomizationId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- Model model0 = new Model();
- model0.setId((-2490));
- int int0 = model0.getId();
- assertEquals((-2490), int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- Model model0 = new Model();
- Timestamp timestamp0 = new Timestamp(0L);
- model0.setCreated(timestamp0);
- Timestamp timestamp1 = model0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- Model model0 = new Model();
- Timestamp timestamp0 = new Timestamp(1L);
- model0.setCreated(timestamp0);
- Timestamp timestamp1 = model0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.toString();
- assertEquals("Model: modelCustomizationId=null,modelCustomizationName=null,modelInvariantId=null,modelName=null,modelType=null,modelVersion=null,modelVersionId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- Model model0 = new Model();
- model0.setModelType("");
- String string0 = model0.getModelType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelInvariantId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- Model model0 = new Model();
- Map<String, ServiceRecipe> map0 = model0.getRecipes();
- assertNull(map0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelCustomizationName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- Model model0 = new Model();
- model0.setModelVersion("");
- String string0 = model0.getModelVersion();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- Model model0 = new Model();
- model0.setModelVersionId("");
- String string0 = model0.getModelVersionId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- Model model0 = new Model();
- model0.setModelInvariantId("");
- String string0 = model0.getModelInvariantId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- Model model0 = new Model();
- model0.setModelName("");
- String string0 = model0.getModelName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- Model model0 = new Model();
- model0.setModelCustomizationName("");
- String string0 = model0.getModelCustomizationName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- Model model0 = new Model();
- Timestamp timestamp0 = new Timestamp(0L);
- model0.setCreated(timestamp0);
- String string0 = model0.toString();
- assertEquals("Model: modelCustomizationId=null,modelCustomizationName=null,modelInvariantId=null,modelName=null,modelType=null,modelVersion=null,modelVersionId=null,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- Model model0 = new Model();
- int int0 = model0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- Model model0 = new Model();
- HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
- model0.setRecipes(hashMap0);
- Map<String, ServiceRecipe> map0 = model0.getRecipes();
- assertTrue(map0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelVersionId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelCustomizationId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelVersion();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- Model model0 = new Model();
- Timestamp timestamp0 = model0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- Model model0 = new Model();
- String string0 = model0.getModelName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- Model model0 = new Model();
- model0.setId(2803);
- int int0 = model0.getId();
- assertEquals(2803, int0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java
deleted file mode 100644
index d9576e0681..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelESTestscaffolding.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:32:26 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ModelESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Model";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ModelESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.Model",
- "com.att.eelf.configuration.EELFManager",
- "com.att.eelf.configuration.EELFLogger",
- "com.att.eelf.i18n.EELFMsgs",
- "org.openecomp.mso.entity.MsoRequest",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "com.att.eelf.configuration.SLF4jWrapper",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ModelESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java
deleted file mode 100644
index d148e94246..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTest.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:32:08 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ModelRecipeESTest extends ModelRecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setSchemaVersion("594t4m7A7,kaNK");
- String string0 = modelRecipe0.getSchemaVersion();
- assertEquals("594t4m7A7,kaNK", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(0);
- modelRecipe0.setRecipeTimeout(integer0);
- Integer integer1 = modelRecipe0.getRecipeTimeout();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(1303);
- modelRecipe0.setRecipeTimeout(integer0);
- Integer integer1 = modelRecipe0.getRecipeTimeout();
- assertEquals(1303, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer((-8));
- modelRecipe0.setRecipeTimeout(integer0);
- Integer integer1 = modelRecipe0.getRecipeTimeout();
- assertEquals((-8), (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setOrchestrationUri("+");
- String string0 = modelRecipe0.getOrchestrationUri();
- assertEquals("+", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setModelParamXSD("");
- String string0 = modelRecipe0.getModelParamXSD();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(1);
- modelRecipe0.setModelId(integer0);
- Integer integer1 = modelRecipe0.getModelId();
- assertEquals(1, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer((-8));
- modelRecipe0.setModelId(integer0);
- Integer integer1 = modelRecipe0.getModelId();
- assertEquals((-8), (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setId(2372);
- int int0 = modelRecipe0.getId();
- assertEquals(2372, int0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setId((-438));
- int int0 = modelRecipe0.getId();
- assertEquals((-438), int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setDescription("D|`<b3b");
- String string0 = modelRecipe0.getDescription();
- assertEquals("D|`<b3b", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Timestamp timestamp0 = new Timestamp(0L);
- modelRecipe0.setCreated(timestamp0);
- Timestamp timestamp1 = modelRecipe0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Timestamp timestamp0 = new Timestamp(619L);
- modelRecipe0.setCreated(timestamp0);
- Timestamp timestamp1 = modelRecipe0.getCreated();
- assertEquals("1970-01-01 00:00:00.619", timestamp1.toString());
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setAction("hz4FY");
- String string0 = modelRecipe0.getAction();
- assertEquals("hz4FY", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setAction("");
- String string0 = modelRecipe0.getAction();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- // Undeclared exception!
- try {
- modelRecipe0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.beans.ModelRecipe", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(7);
- modelRecipe0.setRecipeTimeout(integer0);
- modelRecipe0.setModelId(integer0);
- String string0 = modelRecipe0.toString();
- assertEquals("ModelRecipe: modelId=7,action=null,schemaVersion=null,orchestrationUri=null,modelParamXSD=null,recipeTimeout=7", string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = modelRecipe0.getModelId();
- assertNull(integer0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(0);
- modelRecipe0.setRecipeTimeout(integer0);
- modelRecipe0.setModelId(integer0);
- Timestamp timestamp0 = new Timestamp((long) 0);
- modelRecipe0.setCreated(timestamp0);
- String string0 = modelRecipe0.toString();
- assertEquals("ModelRecipe: modelId=0,action=null,schemaVersion=null,orchestrationUri=null,modelParamXSD=null,recipeTimeout=0,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- String string0 = modelRecipe0.getAction();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setDescription("");
- String string0 = modelRecipe0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setModelParamXSD("nb[xSaP");
- String string0 = modelRecipe0.getModelParamXSD();
- assertEquals("nb[xSaP", string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setSchemaVersion("");
- String string0 = modelRecipe0.getSchemaVersion();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = new Integer(0);
- modelRecipe0.setModelId(integer0);
- Integer integer1 = modelRecipe0.getModelId();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- int int0 = modelRecipe0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- String string0 = modelRecipe0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- String string0 = modelRecipe0.getSchemaVersion();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Integer integer0 = modelRecipe0.getRecipeTimeout();
- assertNull(integer0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- String string0 = modelRecipe0.getOrchestrationUri();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- Timestamp timestamp0 = modelRecipe0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- modelRecipe0.setOrchestrationUri("");
- String string0 = modelRecipe0.getOrchestrationUri();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- ModelRecipe modelRecipe0 = new ModelRecipe();
- String string0 = modelRecipe0.getModelParamXSD();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java
deleted file mode 100644
index 710e5372f6..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ModelRecipeESTestscaffolding.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:32:08 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ModelRecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ModelRecipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ModelRecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.ModelRecipe"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java
deleted file mode 100644
index 4d7d131b00..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:22:12 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class NetworkRecipeESTest extends NetworkRecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setOrchestrationUri("");
- String string0 = networkRecipe0.toString();
- assertEquals("RECIPE: null,uri=,networkType=null,networkParamXSD=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setAction("WL:?f53^x");
- String string0 = networkRecipe0.toString();
- assertEquals("RECIPE: WL:?f53^x,uri=null,networkType=null,networkParamXSD=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setNetworkType("RECIPE: ");
- String string0 = networkRecipe0.getNetworkType();
- assertEquals("RECIPE: ", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setNetworkParamXSD("!R\"am4?r!");
- String string0 = networkRecipe0.getNetworkParamXSD();
- assertEquals("!R\"am4?r!", string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- String string0 = networkRecipe0.getNetworkParamXSD();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setNetworkType("");
- String string0 = networkRecipe0.getNetworkType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- networkRecipe0.setNetworkParamXSD("");
- String string0 = networkRecipe0.getNetworkParamXSD();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- NetworkRecipe networkRecipe0 = new NetworkRecipe();
- String string0 = networkRecipe0.getNetworkType();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java
deleted file mode 100644
index 04184f50e2..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:22:12 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class NetworkRecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.NetworkRecipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkRecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.NetworkRecipe",
- "org.openecomp.mso.db.catalog.beans.Recipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java
deleted file mode 100644
index 71520bb983..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:21:59 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class NetworkResourceESTest extends NetworkResourceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setTemplateId((-835));
- int int0 = networkResource0.getTemplateId();
- assertEquals((-835), int0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setOrchestrationMode("V");
- String string0 = networkResource0.getOrchestrationMode();
- assertEquals("V", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setOrchestrationMode("");
- String string0 = networkResource0.getOrchestrationMode();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setNeutronNetworkType(",aicVersionMin=");
- String string0 = networkResource0.getNeutronNetworkType();
- assertEquals(",aicVersionMin=", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setNeutronNetworkType("");
- String string0 = networkResource0.getNeutronNetworkType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setNetworkType("zOD2");
- String string0 = networkResource0.getNetworkType();
- assertEquals("zOD2", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setId(1);
- int int0 = networkResource0.getId();
- assertEquals(1, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setId((-6321));
- int int0 = networkResource0.getId();
- assertEquals((-6321), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setDescription("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=VO>5~X,aicVersionMax=VO>5~Xid=0");
- String string0 = networkResource0.getDescription();
- assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=VO>5~X,aicVersionMax=VO>5~Xid=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setAicVersionMin("");
- String string0 = networkResource0.getAicVersionMin();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setAicVersionMax("E{6!_C$30Kby>]gllF");
- String string0 = networkResource0.getAicVersionMax();
- assertEquals("E{6!_C$30Kby>]gllF", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setAicVersionMax("");
- String string0 = networkResource0.getAicVersionMax();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
- doReturn(1L).when(timestamp0).getTime();
- networkResource0.setCreated(timestamp0);
- String string0 = networkResource0.toString();
- assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=null,aicVersionMax=nullid=0,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.toString();
- assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=null,aicVersionMax=nullid=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setAicVersionMin("VO>5~X");
- String string0 = networkResource0.getAicVersionMin();
- assertEquals("VO>5~X", string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getNeutronNetworkType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getOrchestrationMode();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getAicVersionMax();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getAicVersionMin();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- int int0 = networkResource0.getTemplateId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setDescription("");
- String string0 = networkResource0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- String string0 = networkResource0.getNetworkType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- Timestamp timestamp0 = networkResource0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- int int0 = networkResource0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setNetworkType("");
- String string0 = networkResource0.getNetworkType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- NetworkResource networkResource0 = new NetworkResource();
- networkResource0.setTemplateId(2085);
- int int0 = networkResource0.getTemplateId();
- assertEquals(2085, int0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java
deleted file mode 100644
index fdef26efcb..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:21:59 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class NetworkResourceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.NetworkResource";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkResourceESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.NetworkResource",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java
deleted file mode 100644
index 03ad09cda5..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:21:28 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RecipeESTest extends RecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setOrchestrationUri("");
- String string0 = recipe0.toString();
- assertEquals("RECIPE: null,uri=", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setServiceType("s5s< CkZ9K:R0~ ;");
- String string0 = recipe0.getServiceType();
- assertEquals("s5s< CkZ9K:R0~ ;", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setServiceType("");
- String string0 = recipe0.getServiceType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setRecipeTimeout((-639));
- int int0 = recipe0.getRecipeTimeout();
- assertEquals((-639), int0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.orchestrationUri = ".";
- String string0 = recipe0.getOrchestrationUri();
- assertEquals(".", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setOrchestrationUri("");
- String string0 = recipe0.getOrchestrationUri();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setId(1);
- int int0 = recipe0.getId();
- assertEquals(1, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setId((-529));
- int int0 = recipe0.getId();
- assertEquals((-529), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setDescription("F+/=");
- String string0 = recipe0.getDescription();
- assertEquals("F+/=", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setDescription("");
- String string0 = recipe0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setAction("RECIPE: null,uri=null");
- String string0 = recipe0.getAction();
- assertEquals("RECIPE: null,uri=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.action = "";
- String string0 = recipe0.getAction();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- Recipe recipe0 = new Recipe();
- Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
- doReturn(0L).when(timestamp0).getTime();
- recipe0.setCreated(timestamp0);
- String string0 = recipe0.toString();
- assertEquals("RECIPE: null,uri=null,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- Recipe recipe0 = new Recipe();
- int int0 = recipe0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- Recipe recipe0 = new Recipe();
- String string0 = recipe0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- Recipe recipe0 = new Recipe();
- int int0 = recipe0.getRecipeTimeout();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- Recipe recipe0 = new Recipe();
- recipe0.setRecipeTimeout(957);
- int int0 = recipe0.getRecipeTimeout();
- assertEquals(957, int0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- Recipe recipe0 = new Recipe();
- String string0 = recipe0.getAction();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- Recipe recipe0 = new Recipe();
- Timestamp timestamp0 = recipe0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- Recipe recipe0 = new Recipe();
- String string0 = recipe0.getOrchestrationUri();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- Recipe recipe0 = new Recipe();
- String string0 = recipe0.getServiceType();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java
deleted file mode 100644
index 667bc9387a..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:21:28 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Recipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.Recipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java
deleted file mode 100644
index 57f2d5d7a8..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:19:44 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.sql.Timestamp;
-import java.time.Clock;
-import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.evosuite.runtime.mock.java.time.MockClock;
-import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ServiceESTest extends ServiceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- Service service0 = new Service();
- service0.setServiceVersion("RECIPE: ");
- String string0 = service0.getServiceVersion();
- assertEquals("RECIPE: ", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- Service service0 = new Service();
- service0.setServiceNameVersionId(">{PeD}EDcITG;{Z%FH");
- String string0 = service0.getServiceNameVersionId();
- assertEquals(">{PeD}EDcITG;{Z%FH", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- Service service0 = new Service();
- service0.setServiceName("RECIPE: ");
- String string0 = service0.getServiceName();
- assertEquals("RECIPE: ", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- Service service0 = new Service();
- service0.setServiceName("");
- String string0 = service0.getServiceName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- Service service0 = new Service();
- HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- hashMap0.put(",created=", serviceRecipe0);
- service0.setRecipes(hashMap0);
- Map<String, ServiceRecipe> map0 = service0.getRecipes();
- assertFalse(map0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- Service service0 = new Service();
- service0.setModelInvariantUUID("BZ@s");
- String string0 = service0.getModelInvariantUUID();
- assertEquals("BZ@s", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- Service service0 = new Service();
- service0.setId(1033);
- int int0 = service0.getId();
- assertEquals(1033, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- Service service0 = new Service();
- service0.setId((-164));
- int int0 = service0.getId();
- assertEquals((-164), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- Service service0 = new Service();
- service0.setHttpMethod(",description=");
- String string0 = service0.getHttpMethod();
- assertEquals(",description=", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- Service service0 = new Service();
- service0.setDescription("");
- String string0 = service0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- Service service0 = new Service();
- Timestamp timestamp0 = new Timestamp(0L);
- service0.setCreated(timestamp0);
- Timestamp timestamp1 = service0.getCreated();
- assertEquals(0, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- Service service0 = new Service();
- Clock clock0 = MockClock.systemUTC();
- LocalDateTime localDateTime0 = MockLocalDateTime.now(clock0);
- Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
- service0.setCreated(timestamp0);
- Timestamp timestamp1 = service0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- Service service0 = new Service();
- // Undeclared exception!
- try {
- service0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- Service service0 = new Service();
- HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- hashMap0.put(",created=", serviceRecipe0);
- service0.setRecipes(hashMap0);
- String string0 = service0.toString();
- assertEquals("SERVICE: id=0,name=null,version=null,description=null,modelInvariantUUID=null\nRECIPE: null,uri=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- Service service0 = new Service();
- service0.setServiceNameVersionId("83y*#72]},kHXOT");
- service0.setServiceNameVersionId("f6t}qujI)DMM>b=J");
- Map<String, ServiceRecipe> map0 = (Map<String, ServiceRecipe>) mock(Map.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(map0).toString();
- doReturn((Set) null).when(map0).keySet();
- service0.setRecipes(map0);
- service0.isTheSameVersion("83y*#72]},kHXOT");
- service0.isMoreRecentThan(")0");
- service0.getRecipes();
- // Undeclared exception!
- try {
- service0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- Service service0 = new Service();
- HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
- service0.setRecipes(hashMap0);
- Map<String, ServiceRecipe> map0 = service0.getRecipes();
- assertEquals(0, map0.size());
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- Service service0 = new Service();
- int int0 = service0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getServiceName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- Service service0 = new Service();
- service0.setHttpMethod("");
- String string0 = service0.getHttpMethod();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getModelInvariantUUID();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getServiceVersion();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- Service service0 = new Service();
- service0.setServiceNameVersionId("");
- String string0 = service0.getServiceNameVersionId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getHttpMethod();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- Service service0 = new Service();
- Map<String, ServiceRecipe> map0 = service0.getRecipes();
- assertNull(map0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- Service service0 = new Service();
- service0.setDescription("Ir%#'ua8B=h&yW\"(|");
- String string0 = service0.getDescription();
- assertEquals("Ir%#'ua8B=h&yW\"(|", string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- Service service0 = new Service();
- String string0 = service0.getServiceNameVersionId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- Service service0 = new Service();
- service0.setServiceVersion("");
- String string0 = service0.getServiceVersion();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- Service service0 = new Service();
- Timestamp timestamp0 = service0.getCreated();
- service0.setCreated(timestamp0);
- assertNull(service0.getServiceName());
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- Service service0 = new Service();
- service0.setModelInvariantUUID("");
- String string0 = service0.getModelInvariantUUID();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java
deleted file mode 100644
index d420236688..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:19:44 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ServiceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Service";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.Service"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java
deleted file mode 100644
index eafc69906f..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTest.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Tue Feb 21 15:49:25 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.util.ArrayList;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ServiceMacroHolderESTest extends ServiceMacroHolderESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null);
- ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources();
- assertNull(arrayList0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- VnfResource vnfResource0 = new VnfResource();
- serviceMacroHolder0.addVnfResource(vnfResource0);
- ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources();
- assertEquals(1, arrayList0.size());
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- Service service0 = serviceMacroHolder0.getService();
- assertNull(service0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- service0.setId(1124);
- Service service1 = serviceMacroHolder0.getService();
- assertNull(service1.getServiceNameVersionId());
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- service0.setId((-760));
- Service service1 = serviceMacroHolder0.getService();
- assertNull(service1.getServiceNameVersionId());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0);
- ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization();
- assertFalse(arrayList0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null);
- ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization();
- assertNull(arrayList0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0);
- ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization();
- assertFalse(arrayList0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullnone", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullnone", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- Service service0 = mock(Service.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(service0).toString();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- ArrayList<Object> arrayList0 = new ArrayList<Object>();
- arrayList0.add((Object) serviceMacroHolder0);
- PrivateAccess.setVariable((Class<ServiceMacroHolder>) ServiceMacroHolder.class, serviceMacroHolder0, "vnfResources", (Object) arrayList0);
- // Undeclared exception!
- try {
- serviceMacroHolder0.toString();
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // org.openecomp.mso.db.catalog.beans.ServiceMacroHolder cannot be cast to org.openecomp.mso.db.catalog.beans.VnfResource
- //
- verifyException("org.openecomp.mso.db.catalog.beans.ServiceMacroHolder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullnone", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- // Undeclared exception!
- try {
- serviceMacroHolder0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullnoneAllottedResourceCustomizations:ARC[0]: modelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullnoneNetworkResourceCustomizations:NRC[0]: modelName=nullmodelUuid=nullmodelUuid=nullmodelInvariantUuid=nullmodelVersion=nullmodelCustomizationUuid=nullmodelInstanceName=nullnetworkResourceId=0networkType=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null);
- serviceMacroHolder0.addNetworkResourceCustomization(networkResourceCustomization0);
- assertNull(networkResourceCustomization0.getModelInstanceName());
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setVnfResources((ArrayList<VnfResource>) null);
- VnfResource vnfResource0 = new VnfResource();
- serviceMacroHolder0.addVnfResource(vnfResource0);
- assertNull(vnfResource0.getModelCustomizationUuid());
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- VnfResource vnfResource0 = new VnfResource();
- serviceMacroHolder0.addVnfResource(vnfResource0);
- String string0 = serviceMacroHolder0.toString();
- assertEquals("ServicePlus: service: nullVnfResources: , vnfResource[0]:VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null,modelCustomizationUuid=nullVfModules: NONE", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.addVnfResource((VnfResource) null);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- serviceMacroHolder0.setNetworkResourceCustomization((ArrayList<NetworkResourceCustomization>) null);
- ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization();
- assertNull(arrayList0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- Service service1 = serviceMacroHolder0.getService();
- assertNull(service1.getModelInvariantUUID());
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- ArrayList<NetworkResourceCustomization> arrayList0 = serviceMacroHolder0.getNetworkResourceCustomization();
- assertEquals(0, arrayList0.size());
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- serviceMacroHolder0.setAllottedResourceCustomization((ArrayList<AllottedResourceCustomization>) null);
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- serviceMacroHolder0.addAllottedResourceCustomization(allottedResourceCustomization0);
- assertNull(allottedResourceCustomization0.getVersion());
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder();
- Service service0 = new Service();
- serviceMacroHolder0.setService(service0);
- assertNull(service0.getModelInvariantUUID());
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- ArrayList<AllottedResourceCustomization> arrayList0 = serviceMacroHolder0.getAllottedResourceCustomization();
- assertEquals(0, arrayList0.size());
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- Service service0 = new Service();
- ServiceMacroHolder serviceMacroHolder0 = new ServiceMacroHolder(service0);
- ArrayList<VnfResource> arrayList0 = serviceMacroHolder0.getVnfResources();
- assertTrue(arrayList0.isEmpty());
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java
deleted file mode 100644
index 43ccd7b728..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolderESTestscaffolding.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Tue Feb 21 15:49:25 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ServiceMacroHolderESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceMacroHolder";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceMacroHolderESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.VfModule",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.db.catalog.beans.Service",
- "org.openecomp.mso.db.catalog.beans.NetworkResource",
- "org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.VnfResource",
- "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization",
- "org.openecomp.mso.db.catalog.beans.ServiceMacroHolder"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceMacroHolderESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java
deleted file mode 100644
index 4b4ec68325..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:20:36 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ServiceRecipeESTest extends ServiceRecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Integer integer0 = new Integer(0);
- serviceRecipe0.setServiceTimeoutInterim(integer0);
- Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Integer integer0 = new Integer(536);
- serviceRecipe0.setServiceTimeoutInterim(integer0);
- Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
- assertEquals(536, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Integer integer0 = new Integer((-1032));
- serviceRecipe0.setServiceTimeoutInterim(integer0);
- Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
- assertEquals((-1032), (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setServiceParamXSD("*9+?bc]Ov");
- String string0 = serviceRecipe0.getServiceParamXSD();
- assertEquals("*9+?bc]Ov", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setServiceId(1643);
- int int0 = serviceRecipe0.getServiceId();
- assertEquals(1643, int0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setServiceId((-1639));
- int int0 = serviceRecipe0.getServiceId();
- assertEquals((-1639), int0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setRecipeTimeout(536);
- int int0 = serviceRecipe0.getRecipeTimeout();
- assertEquals(536, int0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setRecipeTimeout((-1));
- int int0 = serviceRecipe0.getRecipeTimeout();
- assertEquals((-1), int0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setOrchestrationUri("R~N]`p<1UHw6JYz");
- String string0 = serviceRecipe0.getOrchestrationUri();
- assertEquals("R~N]`p<1UHw6JYz", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setId(1);
- int int0 = serviceRecipe0.getId();
- assertEquals(1, int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setDescription("wLV^;f35^#");
- String string0 = serviceRecipe0.getDescription();
- assertEquals("wLV^;f35^#", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setAction("@T7x,XN.)]mDZ");
- String string0 = serviceRecipe0.getAction();
- assertEquals("@T7x,XN.)]mDZ", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setAction("");
- String string0 = serviceRecipe0.getAction();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
- doReturn(0L).when(timestamp0).getTime();
- serviceRecipe0.setCreated(timestamp0);
- String string0 = serviceRecipe0.toString();
- assertEquals("RECIPE: null,uri=null,created=1/1/70 12:00 AM", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- String string0 = serviceRecipe0.toString();
- assertEquals("RECIPE: null,uri=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- String string0 = serviceRecipe0.getOrchestrationUri();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- String string0 = serviceRecipe0.getAction();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Timestamp timestamp0 = serviceRecipe0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- String string0 = serviceRecipe0.getServiceParamXSD();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setId((-642));
- int int0 = serviceRecipe0.getId();
- assertEquals((-642), int0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setDescription("");
- String string0 = serviceRecipe0.getDescription();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- String string0 = serviceRecipe0.getDescription();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- int int0 = serviceRecipe0.getServiceId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- Integer integer0 = serviceRecipe0.getServiceTimeoutInterim();
- assertNull(integer0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- int int0 = serviceRecipe0.getRecipeTimeout();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setOrchestrationUri("");
- String string0 = serviceRecipe0.getOrchestrationUri();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- int int0 = serviceRecipe0.getId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- ServiceRecipe serviceRecipe0 = new ServiceRecipe();
- serviceRecipe0.setServiceParamXSD("");
- String string0 = serviceRecipe0.getServiceParamXSD();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java
deleted file mode 100644
index b17b447241..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:20:36 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ServiceRecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceRecipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceRecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java
deleted file mode 100644
index 84fbcb5391..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:33:37 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ServiceToAllottedResourcesESTest extends ServiceToAllottedResourcesESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- serviceToAllottedResources0.setServiceModelUuid("serviceModelUuid=nullarModelCustomizationUuid=null");
- String string0 = serviceToAllottedResources0.getServiceModelUuid();
- assertEquals("serviceModelUuid=nullarModelCustomizationUuid=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- Timestamp timestamp0 = new Timestamp(0L);
- serviceToAllottedResources0.setCreated(timestamp0);
- Timestamp timestamp1 = serviceToAllottedResources0.getCreated();
- assertEquals("1970-01-01 00:00:00.0", timestamp1.toString());
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- serviceToAllottedResources0.setArModelCustomizationUuid("D7q@");
- String string0 = serviceToAllottedResources0.getArModelCustomizationUuid();
- assertEquals("D7q@", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- serviceToAllottedResources0.setArModelCustomizationUuid("");
- String string0 = serviceToAllottedResources0.getArModelCustomizationUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- String string0 = serviceToAllottedResources0.toString();
- assertEquals("serviceModelUuid=nullarModelCustomizationUuid=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- serviceToAllottedResources0.setServiceModelUuid("");
- String string0 = serviceToAllottedResources0.getServiceModelUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- Timestamp timestamp0 = new Timestamp((-683L));
- serviceToAllottedResources0.setCreated(timestamp0);
- Timestamp timestamp1 = serviceToAllottedResources0.getCreated();
- assertEquals("1969-12-31 23:59:59.317", timestamp1.toString());
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- String string0 = serviceToAllottedResources0.getServiceModelUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- String string0 = serviceToAllottedResources0.getArModelCustomizationUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- ServiceToAllottedResources serviceToAllottedResources0 = new ServiceToAllottedResources();
- Timestamp timestamp0 = serviceToAllottedResources0.getCreated();
- assertNull(timestamp0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java
deleted file mode 100644
index 14ff62fb02..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResourcesESTestscaffolding.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:33:37 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ServiceToAllottedResourcesESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceToAllottedResourcesESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceToAllottedResourcesESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java
deleted file mode 100644
index aa2ba2a488..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:34:56 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ServiceToNetworksESTest extends ServiceToNetworksESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- serviceToNetworks0.setServiceModelUuid("XcrRZj-Y)7");
- String string0 = serviceToNetworks0.getServiceModelUuid();
- assertEquals("XcrRZj-Y)7", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- serviceToNetworks0.setNetworkModelCustomizationUuid("XcrRZj-Y)7");
- String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid();
- assertEquals("XcrRZj-Y)7", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- Timestamp timestamp0 = new Timestamp(4701L);
- serviceToNetworks0.setCreated(timestamp0);
- Timestamp timestamp1 = serviceToNetworks0.getCreated();
- assertEquals(701000000, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- Timestamp timestamp0 = serviceToNetworks0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- String string0 = serviceToNetworks0.getServiceModelUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- String string0 = serviceToNetworks0.toString();
- assertEquals("ServiceToNetworks mapping: serviceModelUuid=null,networkModelCustomizationUuid=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- Timestamp timestamp0 = new Timestamp(0L);
- serviceToNetworks0.setCreated(timestamp0);
- Timestamp timestamp1 = serviceToNetworks0.getCreated();
- assertEquals(0, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- serviceToNetworks0.setNetworkModelCustomizationUuid("");
- String string0 = serviceToNetworks0.getNetworkModelCustomizationUuid();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- ServiceToNetworks serviceToNetworks0 = new ServiceToNetworks();
- serviceToNetworks0.setServiceModelUuid("");
- String string0 = serviceToNetworks0.getServiceModelUuid();
- assertEquals("", string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java
deleted file mode 100644
index ba0c5d7d5b..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworksESTestscaffolding.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:34:56 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ServiceToNetworksESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceToNetworks";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceToNetworksESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.ServiceToNetworks"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ServiceToNetworksESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.beans.ServiceToNetworks"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java
deleted file mode 100644
index 1ab15a22fb..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java
+++ /dev/null
@@ -1,978 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Tue Feb 21 15:51:08 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.sql.Timestamp;
-import java.time.Instant;
-import java.time.temporal.ChronoField;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.TemporalField;
-import java.time.temporal.UnsupportedTemporalTypeException;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.System;
-import org.evosuite.runtime.mock.java.time.MockInstant;
-import org.evosuite.runtime.mock.java.util.MockDate;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.db.catalog.beans.VfModule;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VfModuleESTest extends VfModuleESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setIsBase(1684);
- vfModule0.getMinInstances();
- vfModule0.setMaxInstances((Integer) null);
- vfModule0.isBase();
- vfModule0.setVolTemplateId((Integer) null);
- vfModule0.setModelVersion("p(>v(f\"rnCo");
- vfModule0.getIsBase();
- vfModule0.getModelInvariantUuid();
- vfModule0.setModelVersion("a,U*#FCv(}H+aG}");
- vfModule0.getVolTemplateId();
- vfModule0.getMinInstances();
- vfModule0.toString();
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Instant instant0 = MockInstant.now();
- Timestamp timestamp0 = Timestamp.from(instant0);
- vfModule0.setCreated(timestamp0);
- vfModule0.setLabel("7.");
- vfModule0.isBase();
- vfModule0.getId();
- vfModule0.getLabel();
- vfModule0.toString();
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = Integer.valueOf((-3299));
- vfModule0.getEnvironmentId();
- Integer.toUnsignedString((-697));
- vfModule0.setMinInstances((Integer) null);
- vfModule0.setMaxInstances(integer0);
- Integer integer1 = new Integer(5932);
- Integer integer2 = Integer.getInteger("DZ>}qM>", integer1);
- vfModule0.setVolEnvironmentId(integer0);
- vfModule0.setTemplateId(integer2);
- Integer.toUnsignedString(5932);
- vfModule0.getVolTemplateId();
- vfModule0.setTemplateId((Integer) null);
- Integer.divideUnsigned((-3299), (-3299));
- vfModule0.setEnvironmentId((Integer) null);
- vfModule0.setVolEnvironmentId((Integer) null);
- vfModule0.setMinInstances(integer1);
- vfModule0.setIsBase((-3299));
- vfModule0.setIsBase((-745));
- vfModule0.setModelVersion("5932");
- vfModule0.getVolTemplateId();
- vfModule0.getVolEnvironmentId();
- vfModule0.getMinInstances();
- vfModule0.getVolEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- vfModule0.setVolTemplateId(integer0);
- vfModule0.getVolTemplateId();
- Integer integer1 = vfModule0.getVolTemplateId();
- vfModule0.setVolTemplateId(integer1);
- vfModule0.setIsBase(863);
- Integer integer2 = new Integer(1554);
- vfModule0.setVnfResourceId(integer2);
- vfModule0.setIsBase(780);
- vfModule0.setMaxInstances(integer2);
- vfModule0.getEnvironmentId();
- vfModule0.getVolEnvironmentId();
- vfModule0.getVolEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Timestamp timestamp0 = new Timestamp((-2168L));
- vfModule0.setCreated(timestamp0);
- vfModule0.setId((-1));
- vfModule0.getEnvironmentId();
- vfModule0.setCreated(timestamp0);
- vfModule0.setVolTemplateId((Integer) null);
- vfModule0.setLabel(".");
- vfModule0.getModelName();
- vfModule0.getCreated();
- vfModule0.getTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.isMoreRecentThan("");
- vfModule0.setLabel("");
- Integer integer0 = new Integer(1183);
- vfModule0.setMaxInstances(integer0);
- Integer.compare(1183, 1183);
- vfModule0.setTemplateId(integer0);
- vfModule0.getLabel();
- vfModule0.getDescription();
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- Integer.compare(1, 0);
- vfModule0.setMaxInstances(integer0);
- vfModule0.getVolEnvironmentId();
- Integer.sum(0, 1);
- vfModule0.setVolTemplateId((Integer) null);
- vfModule0.setMaxInstances((Integer) null);
- vfModule0.setModelVersion("");
- vfModule0.setIsBase((-1435));
- vfModule0.setVnfResourceId((Integer) null);
- vfModule0.getVnfResourceId();
- vfModule0.setIsBase((-3635));
- vfModule0.getDescription();
- vfModule0.getAsdcUuid();
- Integer integer1 = new Integer((-3635));
- Integer integer2 = new Integer(1);
- Integer.getInteger(".", integer2);
- vfModule0.setVolTemplateId(integer1);
- vfModule0.getVnfResourceId();
- vfModule0.getModelVersion();
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setIsBase(597);
- vfModule0.setId(662);
- Integer integer0 = Integer.valueOf(597);
- Integer.compare((-1), 0);
- Integer.divideUnsigned(597, (-3368));
- vfModule0.setVolTemplateId(integer0);
- Integer.getInteger(",modelCustomizationUuid=", 0);
- vfModule0.setVolEnvironmentId(integer0);
- vfModule0.setId(0);
- vfModule0.getVnfResourceId();
- Integer integer1 = new Integer(0);
- vfModule0.setMaxInstances(integer1);
- vfModule0.getMaxInstances();
- vfModule0.setModelName("");
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- vfModule0.setInitialCount(integer0);
- Integer integer1 = new Integer((-2063));
- vfModule0.setVolTemplateId(integer1);
- vfModule0.getModelVersion();
- Integer integer2 = new Integer(0);
- vfModule0.setInitialCount(integer2);
- vfModule0.getLabel();
- vfModule0.setTemplateId(integer0);
- Integer integer3 = vfModule0.getInitialCount();
- vfModule0.setMaxInstances(integer3);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setModelInvariantUuid("");
- vfModule0.setDescription(",templateId=");
- Timestamp timestamp0 = new Timestamp((-1360L));
- MockDate mockDate0 = new MockDate(0, 0, (-1723), (-3154), (-1723));
- vfModule0.setId((-1158));
- mockDate0.setTime(0L);
- timestamp0.after(mockDate0);
- vfModule0.setCreated(timestamp0);
- vfModule0.setType(".");
- vfModule0.getId();
- Integer integer0 = new Integer((-1158));
- vfModule0.setVnfResourceId(integer0);
- vfModule0.isBase();
- vfModule0.setMinInstances((Integer) null);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.isTheSameVersion("");
- vfModule0.setMaxInstances((Integer) null);
- vfModule0.setId((-2621));
- vfModule0.setModelVersion("");
- vfModule0.setAsdcUuid(".");
- Integer integer0 = new Integer((-2621));
- vfModule0.isTheSameVersion("");
- vfModule0.setTemplateId(integer0);
- vfModule0.getTemplateId();
- vfModule0.getModelVersion();
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.toString();
- vfModule0.setType("\"~J0_gjDe<M|_&}EQ");
- vfModule0.getModelCustomizationUuid();
- Integer integer0 = new Integer((-1597));
- vfModule0.setEnvironmentId(integer0);
- vfModule0.setVnfResourceId(integer0);
- vfModule0.getModelCustomizationUuid();
- vfModule0.setModelInvariantUuid((String) null);
- vfModule0.getIsBase();
- vfModule0.getVolEnvironmentId();
- vfModule0.getLabel();
- vfModule0.getVnfResourceId();
- vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.getCreated();
- Integer integer1 = new Integer((-805));
- vfModule0.setTemplateId(integer1);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setDescription("");
- vfModule0.getLabel();
- Integer integer0 = new Integer(1);
- vfModule0.setVnfResourceId(integer0);
- vfModule0.getModelCustomizationUuid();
- vfModule0.getLabel();
- Integer integer1 = new Integer(1);
- Integer.sum(542, 542);
- vfModule0.setVolTemplateId(integer1);
- vfModule0.getEnvironmentId();
- vfModule0.setIsBase(1084);
- vfModule0.setAsdcUuid((String) null);
- vfModule0.getId();
- vfModule0.getVnfResourceId();
- vfModule0.setModelCustomizationUuid("o?;po<j");
- vfModule0.getTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setMinInstances((Integer) null);
- Integer integer0 = new Integer(334);
- Integer.sum(334, (-2392));
- vfModule0.setTemplateId(integer0);
- Integer.getInteger("");
- vfModule0.setVnfResourceId(integer0);
- Integer integer1 = new Integer((-2392));
- Integer.toUnsignedLong(0);
- vfModule0.setMaxInstances(integer1);
- vfModule0.setModelInvariantUuid("");
- vfModule0.getTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setType("");
- vfModule0.setModelCustomizationUuid("");
- vfModule0.getIsBase();
- vfModule0.setModelVersion("");
- vfModule0.isMoreRecentThan("");
- Integer integer0 = Integer.valueOf(3556);
- Integer.compareUnsigned(0, 2007);
- Integer.toUnsignedString(0);
- vfModule0.setMaxInstances(integer0);
- vfModule0.getType();
- vfModule0.setType("");
- vfModule0.setModelName("<>]");
- vfModule0.getModelCustomizationUuid();
- vfModule0.toString();
- vfModule0.getTemplateId();
- vfModule0.getMaxInstances();
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getModelName();
- vfModule0.setModelName("uQAnJq?Z");
- vfModule0.getTemplateId();
- vfModule0.setModelCustomizationUuid("");
- vfModule0.getModelCustomizationUuid();
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getInitialCount();
- vfModule0.setMinInstances((Integer) null);
- vfModule0.isBase();
- vfModule0.getVolEnvironmentId();
- Integer integer0 = new Integer((-414));
- vfModule0.setMaxInstances(integer0);
- vfModule0.getVolEnvironmentId();
- vfModule0.getMaxInstances();
- System.setCurrentTimeMillis(0L);
- vfModule0.getMaxInstances();
- vfModule0.getTemplateId();
- vfModule0.getInitialCount();
- vfModule0.getEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setVolEnvironmentId((Integer) null);
- vfModule0.setAsdcUuid(",created=");
- Integer integer0 = new Integer(0);
- vfModule0.setVnfResourceId(integer0);
- Integer.getInteger(",created=", (Integer) null);
- vfModule0.setDescription(",label=");
- vfModule0.setLabel(".");
- vfModule0.getModelName();
- vfModule0.setId(0);
- Integer.max(0, 0);
- vfModule0.setMinInstances(integer0);
- vfModule0.setMaxInstances((Integer) null);
- vfModule0.getCreated();
- vfModule0.getMaxInstances();
- vfModule0.getAsdcUuid();
- vfModule0.getDescription();
- vfModule0.getMaxInstances();
- Integer integer1 = new Integer(0);
- vfModule0.setMaxInstances(integer1);
- vfModule0.toString();
- vfModule0.setCreated((Timestamp) null);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setModelCustomizationUuid(",modelVersion=");
- Integer integer0 = new Integer((-4139));
- vfModule0.setInitialCount(integer0);
- Integer integer1 = new Integer((-789));
- Integer.sum((-4139), (-2408));
- Integer.toUnsignedString((-1850));
- Integer.sum(958, (-176));
- Integer.getInteger(",modelVersion=", integer0);
- Integer.remainderUnsigned((-789), (-789));
- vfModule0.setAsdcUuid("Y?ht4");
- vfModule0.setEnvironmentId(integer1);
- vfModule0.getEnvironmentId();
- System.setCurrentTimeMillis(0L);
- System.setCurrentTimeMillis((-2179L));
- vfModule0.getMinInstances();
- vfModule0.getVolTemplateId();
- vfModule0.isBase();
- vfModule0.isBase();
- vfModule0.isBase();
- vfModule0.getVnfResourceId();
- vfModule0.getCreated();
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(714);
- vfModule0.setEnvironmentId(integer0);
- vfModule0.setInitialCount((Integer) null);
- vfModule0.toString();
- vfModule0.setDescription("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=714,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=714,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.setInitialCount((Integer) null);
- vfModule0.setIsBase(1549);
- vfModule0.setMinInstances((Integer) null);
- vfModule0.getModelCustomizationUuid();
- Integer integer1 = vfModule0.getEnvironmentId();
- vfModule0.setAsdcUuid(".");
- vfModule0.getVolEnvironmentId();
- vfModule0.getLabel();
- Integer.remainderUnsigned(1544, 1549);
- Integer.sum((-277), (-277));
- vfModule0.setMaxInstances(integer1);
- vfModule0.getVolTemplateId();
- vfModule0.getIsBase();
- vfModule0.getInitialCount();
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setId(0);
- vfModule0.setDescription("sh;.zWRp.C?-rn");
- vfModule0.setModelInvariantUuid(",label=");
- vfModule0.getLabel();
- vfModule0.getModelInvariantUuid();
- Timestamp timestamp0 = new Timestamp((long) 0);
- vfModule0.setCreated(timestamp0);
- vfModule0.setDescription("");
- vfModule0.setModelInvariantUuid((String) null);
- vfModule0.getDescription();
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.toString();
- vfModule0.getDescription();
- vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.getModelName();
- Integer integer0 = new Integer(0);
- Integer.toUnsignedString(378);
- Integer.sum(0, 0);
- vfModule0.setMaxInstances(integer0);
- vfModule0.setModelInvariantUuid((String) null);
- vfModule0.setType("}^`%'{@?s`OiaLz");
- vfModule0.setInitialCount(integer0);
- vfModule0.getType();
- vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- VfModule vfModule1 = new VfModule();
- vfModule0.setType("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.toString();
- vfModule0.getId();
- vfModule1.setVnfResourceId(integer0);
- vfModule0.getDescription();
- vfModule0.getType();
- vfModule0.getVolEnvironmentId();
- vfModule0.getTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setId(2389);
- vfModule0.setModelCustomizationUuid("");
- vfModule0.isTheSameVersion("");
- vfModule0.getVolTemplateId();
- vfModule0.getLabel();
- vfModule0.setInitialCount((Integer) null);
- vfModule0.getCreated();
- vfModule0.setAsdcUuid("");
- vfModule0.getAsdcUuid();
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(1268);
- vfModule0.setInitialCount(integer0);
- Integer integer1 = new Integer(0);
- Integer.compare(1268, 1);
- vfModule0.setEnvironmentId(integer1);
- vfModule0.setVersion("");
- vfModule0.getEnvironmentId();
- vfModule0.getVnfResourceId();
- vfModule0.getType();
- vfModule0.getIsBase();
- vfModule0.getCreated();
- ChronoUnit chronoUnit0 = ChronoUnit.MINUTES;
- // Undeclared exception!
- try {
- MockInstant.truncatedTo((Instant) null, chronoUnit0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.evosuite.runtime.mock.java.time.MockInstant", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setTemplateId((Integer) null);
- Integer integer0 = new Integer(2617);
- vfModule0.setVolEnvironmentId(integer0);
- vfModule0.setEnvironmentId((Integer) null);
- vfModule0.setType("");
- vfModule0.toString();
- VfModule vfModule1 = new VfModule();
- vfModule0.toString();
- vfModule0.isMoreRecentThan("");
- vfModule0.getModelName();
- vfModule1.getLabel();
- Integer integer1 = new Integer(321);
- vfModule1.setVolTemplateId(integer1);
- vfModule1.getVnfResourceId();
- vfModule0.getVolTemplateId();
- vfModule0.getVnfResourceId();
- vfModule0.getVolEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getLabel();
- Integer integer0 = new Integer(0);
- vfModule0.setEnvironmentId(integer0);
- vfModule0.isMoreRecentThan("!X");
- vfModule0.setIsBase(0);
- vfModule0.setId(4322);
- vfModule0.getMaxInstances();
- vfModule0.setAsdcUuid("");
- vfModule0.getDescription();
- vfModule0.setDescription((String) null);
- vfModule0.setIsBase(0);
- vfModule0.setAsdcUuid((String) null);
- vfModule0.setId(4322);
- Integer.min(4322, (-1));
- vfModule0.getDescription();
- Integer.divideUnsigned((-2839), 4322);
- vfModule0.getIsBase();
- vfModule0.setInitialCount(integer0);
- vfModule0.toString();
- vfModule0.getModelName();
- vfModule0.getVolEnvironmentId();
- vfModule0.setAsdcUuid("");
- vfModule0.getId();
- VfModule vfModule1 = new VfModule();
- vfModule1.getTemplateId();
- Integer integer1 = new Integer(4322);
- vfModule1.setMinInstances(integer1);
- vfModule0.getId();
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getAsdcUuid();
- vfModule0.getModelVersion();
- vfModule0.setModelName((String) null);
- vfModule0.getVolEnvironmentId();
- vfModule0.getIsBase();
- Integer integer0 = new Integer((-1));
- vfModule0.setEnvironmentId(integer0);
- vfModule0.setMinInstances(integer0);
- vfModule0.getVolTemplateId();
- vfModule0.setModelVersion((String) null);
- VfModule vfModule1 = new VfModule();
- vfModule1.setId(0);
- vfModule1.setModelInvariantUuid((String) null);
- vfModule1.getModelInvariantUuid();
- vfModule1.getModelName();
- vfModule1.setVolEnvironmentId(integer0);
- vfModule1.getMinInstances();
- vfModule0.setModelName("");
- Integer.getInteger("");
- vfModule0.setTemplateId((Integer) null);
- vfModule0.getModelName();
- Integer integer1 = new Integer((-1));
- vfModule0.setVolEnvironmentId(integer1);
- vfModule1.getVnfResourceId();
- Integer integer2 = vfModule1.getVolEnvironmentId();
- vfModule0.setVolEnvironmentId(integer2);
- vfModule1.setMinInstances((Integer) null);
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.toString();
- vfModule0.setModelVersion("LBV90^6*");
- vfModule0.setDescription("LBV90^6*");
- vfModule0.getVnfResourceId();
- vfModule0.setTemplateId((Integer) null);
- vfModule0.isBase();
- vfModule0.setIsBase((-531));
- Integer integer0 = new Integer(2646);
- vfModule0.setVolEnvironmentId(integer0);
- Integer integer1 = new Integer((-531));
- Integer.divideUnsigned((-531), 2646);
- Integer.compare((-1), (-531));
- Integer.toUnsignedLong((-1));
- vfModule0.setVolEnvironmentId((Integer) null);
- vfModule0.setVolEnvironmentId(integer1);
- vfModule0.setTemplateId((Integer) null);
- vfModule0.getVolEnvironmentId();
- vfModule0.setModelName("LBV90^6*");
- vfModule0.getTemplateId();
- vfModule0.getModelName();
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(2752);
- vfModule0.setVolEnvironmentId(integer0);
- Integer integer1 = vfModule0.getVolEnvironmentId();
- vfModule0.setVnfResourceId(integer1);
- vfModule0.getModelVersion();
- vfModule0.setModelVersion((String) null);
- vfModule0.getMinInstances();
- vfModule0.getAsdcUuid();
- Integer integer2 = new Integer((-672));
- Instant instant0 = MockInstant.now();
- ChronoField chronoField0 = ChronoField.EPOCH_DAY;
- // Undeclared exception!
- try {
- MockInstant.with(instant0, (TemporalField) chronoField0, 1268L);
- fail("Expecting exception: UnsupportedTemporalTypeException");
-
- } catch(UnsupportedTemporalTypeException e) {
- //
- // Unsupported field: EpochDay
- //
- verifyException("java.time.Instant", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getMinInstances();
- Integer integer0 = new Integer(397);
- vfModule0.setInitialCount(integer0);
- vfModule0.setMaxInstances((Integer) null);
- vfModule0.isBase();
- vfModule0.setVolEnvironmentId((Integer) null);
- vfModule0.setModelVersion("p(>v(f\"rnCo");
- vfModule0.setMinInstances((Integer) null);
- vfModule0.setModelVersion("*");
- vfModule0.getIsBase();
- vfModule0.getModelInvariantUuid();
- vfModule0.setIsBase((-1066));
- vfModule0.getInitialCount();
- vfModule0.toString();
- vfModule0.getVolTemplateId();
- vfModule0.getCreated();
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getTemplateId();
- Instant instant0 = MockInstant.ofEpochSecond(1L);
- Timestamp timestamp0 = Timestamp.from(instant0);
- vfModule0.setCreated(timestamp0);
- vfModule0.getCreated();
- vfModule0.getTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- vfModule0.setTemplateId(integer0);
- vfModule0.setModelVersion("");
- vfModule0.getModelName();
- vfModule0.setId(0);
- vfModule0.setModelVersion("wk~z+v");
- Integer integer1 = new Integer(0);
- Integer.getInteger((String) null, 0);
- vfModule0.setEnvironmentId(integer1);
- vfModule0.getTemplateId();
- vfModule0.setModelName("a(");
- Integer integer2 = vfModule0.getTemplateId();
- vfModule0.setMinInstances(integer2);
- vfModule0.setModelCustomizationUuid("01*}(,sCh");
- vfModule0.getModelCustomizationUuid();
- vfModule0.getVolEnvironmentId();
- vfModule0.getVolEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test32() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(4222);
- vfModule0.setEnvironmentId(integer0);
- vfModule0.getModelName();
- vfModule0.setAsdcUuid((String) null);
- vfModule0.setModelCustomizationUuid((String) null);
- vfModule0.setType(",minInstances=");
- vfModule0.setVnfResourceId(integer0);
- vfModule0.getEnvironmentId();
- vfModule0.getMaxInstances();
- vfModule0.getVolEnvironmentId();
- }
-
- @Test(timeout = 4000)
- public void test33() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- Integer integer1 = new Integer(1244);
- Integer.compareUnsigned(0, 1549);
- Integer.getInteger("", integer1);
- vfModule0.setVolEnvironmentId(integer0);
- vfModule0.getCreated();
- vfModule0.getVolEnvironmentId();
- System.setCurrentTimeMillis(1856L);
- vfModule0.getVolTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test34() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getModelName();
- Integer integer0 = new Integer(0);
- vfModule0.setVnfResourceId(integer0);
- vfModule0.setId(0);
- vfModule0.setModelVersion((String) null);
- Integer integer1 = new Integer(0);
- Integer.getInteger((String) null, 0);
- vfModule0.setEnvironmentId(integer1);
- vfModule0.getTemplateId();
- vfModule0.setModelName((String) null);
- vfModule0.setMinInstances(integer1);
- vfModule0.setModelCustomizationUuid("01*}(,sCh");
- vfModule0.getCreated();
- vfModule0.getVnfResourceId();
- vfModule0.getVolTemplateId();
- }
-
- @Test(timeout = 4000)
- public void test35() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getInitialCount();
- Integer integer0 = new Integer((-1066));
- vfModule0.getVolEnvironmentId();
- Integer.getInteger("", (Integer) null);
- Integer.getInteger(",envtId=", (-1066));
- vfModule0.setMinInstances(integer0);
- vfModule0.toString();
- vfModule0.setVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=-1066,maxInstances=null,initialCount=null,label=null");
- vfModule0.getVolTemplateId();
- vfModule0.getVolTemplateId();
- vfModule0.getVnfResourceId();
- vfModule0.getMinInstances();
- vfModule0.getVolTemplateId();
- vfModule0.setVersion("");
- vfModule0.getVnfResourceId();
- System.setCurrentTimeMillis((-1066));
- vfModule0.setModelCustomizationUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=-1066,maxInstances=null,initialCount=null,label=null");
- vfModule0.getCreated();
- vfModule0.getCreated();
- System.setCurrentTimeMillis((-1066));
- }
-
- @Test(timeout = 4000)
- public void test36() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getEnvironmentId();
- vfModule0.setVolEnvironmentId((Integer) null);
- int int0 = vfModule0.getId();
- assertEquals(0, int0);
-
- vfModule0.getVolTemplateId();
- String string0 = vfModule0.toString();
- assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test37() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.isTheSameVersion("X+]2+]y^$6");
- vfModule0.getTemplateId();
- vfModule0.getId();
- Integer.toUnsignedString(0);
- vfModule0.getLabel();
- Integer.remainderUnsigned((-472), 1579);
- Integer integer0 = new Integer((-1701));
- Integer.compare((-1701), (-1));
- Integer.getInteger("0", integer0);
- vfModule0.setEnvironmentId((Integer) null);
- vfModule0.setModelInvariantUuid((String) null);
- vfModule0.getAsdcUuid();
- Integer integer1 = new Integer((-1701));
- vfModule0.setVnfResourceId((Integer) null);
- vfModule0.getIsBase();
- Integer.compareUnsigned(1, 0);
- vfModule0.getType();
- vfModule0.getVnfResourceId();
- vfModule0.setInitialCount(integer1);
- vfModule0.setDescription("");
- vfModule0.getEnvironmentId();
- vfModule0.setInitialCount(integer1);
- vfModule0.setId(1946);
- vfModule0.getCreated();
- vfModule0.getInitialCount();
- vfModule0.getVnfResourceId();
- vfModule0.getCreated();
- assertEquals(1946, vfModule0.getId());
- }
-
- @Test(timeout = 4000)
- public void test38() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getMaxInstances();
- Integer integer0 = new Integer(550);
- vfModule0.setMinInstances(integer0);
- Integer integer1 = new Integer(275);
- Integer.max(0, 0);
- vfModule0.setInitialCount(integer1);
- vfModule0.setIsBase(275);
- vfModule0.getEnvironmentId();
- Integer.compare(275, 275);
- vfModule0.setMinInstances((Integer) null);
- vfModule0.setType("");
- vfModule0.setVersion("]");
- vfModule0.getId();
- vfModule0.setId(0);
- vfModule0.setIsBase((-17));
- vfModule0.setId((-17));
- vfModule0.getDescription();
- vfModule0.getAsdcUuid();
- vfModule0.getIsBase();
- vfModule0.getModelName();
- vfModule0.getEnvironmentId();
- vfModule0.toString();
- vfModule0.setModelInvariantUuid("D2");
- vfModule0.getInitialCount();
- assertEquals(-17, vfModule0.getIsBase());
- }
-
- @Test(timeout = 4000)
- public void test39() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(4477);
- vfModule0.setVolTemplateId(integer0);
- vfModule0.getModelInvariantUuid();
- vfModule0.getModelInvariantUuid();
- vfModule0.getVolTemplateId();
- vfModule0.getMinInstances();
- System.setCurrentTimeMillis((-1006L));
- }
-
- @Test(timeout = 4000)
- public void test40() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(0);
- vfModule0.setMinInstances(integer0);
- vfModule0.setType((String) null);
- vfModule0.setAsdcUuid(",asdcUuid=");
- Integer integer1 = vfModule0.getMinInstances();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test41() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getDescription();
- String string0 = vfModule0.getModelCustomizationUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test42() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Instant instant0 = MockInstant.now();
- Timestamp timestamp0 = Timestamp.from(instant0);
- vfModule0.setCreated(timestamp0);
- int int0 = vfModule0.getId();
- assertEquals(0, int0);
-
- vfModule0.getLabel();
- String string0 = vfModule0.toString();
- assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null,created=2/14/14 8:21 PM", string0);
- }
-
- @Test(timeout = 4000)
- public void test43() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getMinInstances();
- vfModule0.isBase();
- vfModule0.setModelVersion("");
- vfModule0.getIsBase();
- vfModule0.getModelInvariantUuid();
- vfModule0.setIsBase((-1066));
- vfModule0.toString();
- boolean boolean0 = vfModule0.isBase();
- assertEquals(-1066, vfModule0.getIsBase());
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test44() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.getMinInstances();
- vfModule0.toString();
- vfModule0.setLabel("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelCustomizationUuid=null,minInstances=null,maxInstances=null,initialCount=null,label=null");
- vfModule0.getDescription();
- vfModule0.getModelVersion();
- PrivateAccess.setVariable((Class<VfModule>) VfModule.class, vfModule0, "minInstances", (Object) null);
- assertEquals(0, vfModule0.getIsBase());
- }
-
- @Test(timeout = 4000)
- public void test45() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setAsdcUuid(",maxInstances=");
- vfModule0.isTheSameVersion(",maxInstances=");
- Integer integer0 = new Integer(0);
- vfModule0.setEnvironmentId(integer0);
- vfModule0.setTemplateId(integer0);
- vfModule0.setModelCustomizationUuid(",maxInstances=");
- vfModule0.getModelInvariantUuid();
- vfModule0.getType();
- vfModule0.getModelCustomizationUuid();
- vfModule0.setVolEnvironmentId(integer0);
- vfModule0.getMaxInstances();
- String string0 = vfModule0.toString();
- assertEquals("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=0,envtId=0,volTemplateId=null,volEnvtId=0, description=null,asdcUuid=,maxInstances=,modelVersion=null,modelCustomizationUuid=,maxInstances=,minInstances=null,maxInstances=null,initialCount=null,label=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test46() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer((-1));
- Integer.remainderUnsigned((-1), (-1));
- Integer.remainderUnsigned(0, (-1));
- Integer.compareUnsigned((-1), 0);
- vfModule0.setMaxInstances(integer0);
- vfModule0.setMaxInstances(integer0);
- vfModule0.setIsBase((-1));
- vfModule0.setVolTemplateId(integer0);
- vfModule0.getTemplateId();
- Integer.divideUnsigned(0, (-1));
- vfModule0.setMinInstances((Integer) null);
- vfModule0.getVnfResourceId();
- vfModule0.getVolTemplateId();
- vfModule0.setIsBase(0);
- vfModule0.getInitialCount();
- int int0 = vfModule0.getIsBase();
- assertFalse(vfModule0.isBase());
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test47() throws Throwable {
- VfModule vfModule0 = new VfModule();
- vfModule0.setType("");
- vfModule0.setVolEnvironmentId((Integer) null);
- vfModule0.setDescription("");
- vfModule0.setModelInvariantUuid("");
- vfModule0.getModelInvariantUuid();
- vfModule0.getVolEnvironmentId();
- vfModule0.setVnfResourceId((Integer) null);
- vfModule0.setModelName("");
- assertEquals(0, vfModule0.getIsBase());
- }
-
- @Test(timeout = 4000)
- public void test48() throws Throwable {
- VfModule vfModule0 = new VfModule();
- Integer integer0 = new Integer(275);
- vfModule0.setInitialCount(integer0);
- vfModule0.getEnvironmentId();
- vfModule0.setId(275);
- vfModule0.getAsdcUuid();
- vfModule0.getModelName();
- vfModule0.getAsdcUuid();
- vfModule0.getCreated();
- assertEquals(275, vfModule0.getId());
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java
deleted file mode 100644
index 5688849059..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:19:11 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VfModuleESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VfModule";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.VfModule"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java
deleted file mode 100644
index fa35d936ea..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:18:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VfModuleToHeatFilesESTest extends VfModuleToHeatFilesESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setVfModuleId(1842);
- VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
- boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
- assertEquals(1842, vfModuleToHeatFiles0.getVfModuleId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setVfModuleId((-999));
- int int0 = vfModuleToHeatFiles0.getVfModuleId();
- assertEquals((-999), int0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setHeatFilesId(3619);
- int int0 = vfModuleToHeatFiles0.getHeatFilesId();
- assertEquals(3619, int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setHeatFilesId((-1390));
- int int0 = vfModuleToHeatFiles0.getHeatFilesId();
- assertEquals((-1390), int0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
- boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
- assertTrue(boolean0);
- assertEquals(0, vfModuleToHeatFiles1.getVfModuleId());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setVfModuleId((-232));
- boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
- assertEquals(-232, vfModuleToHeatFiles0.getVfModuleId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- Object object0 = new Object();
- boolean boolean0 = vfModuleToHeatFiles0.equals(object0);
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles0);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- int int0 = vfModuleToHeatFiles0.getHeatFilesId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- int int0 = vfModuleToHeatFiles0.getVfModuleId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.hashCode();
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- String string0 = vfModuleToHeatFiles0.toString();
- assertEquals("VF_MODULE_ID=0, HEAT_FILES_ID=0", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setHeatFilesId((-1));
- vfModuleToHeatFiles0.hashCode();
- assertEquals(-1, vfModuleToHeatFiles0.getHeatFilesId());
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
- vfModuleToHeatFiles0.setVfModuleId(1);
- int int0 = vfModuleToHeatFiles0.getVfModuleId();
- assertEquals(1, int0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java
deleted file mode 100644
index d22bff428d..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:18:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VfModuleToHeatFilesESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleToHeatFilesESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfModuleToHeatFilesESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java
deleted file mode 100644
index 7a31349d12..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:14:48 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.sql.Timestamp;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VnfComponentESTest extends VnfComponentESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setVnfId(2405);
- VnfComponent vnfComponent1 = new VnfComponent();
- boolean boolean0 = vnfComponent0.equals(vnfComponent1);
- assertEquals(2405, vnfComponent0.getVnfId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- boolean boolean0 = vnfComponent0.equals(vnfComponent0);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setVnfId(1343);
- int int0 = vnfComponent0.getVnfId();
- assertEquals(1343, int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setVnfId((-1));
- int int0 = vnfComponent0.getVnfId();
- assertEquals((-1), int0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer(0);
- vnfComponent0.setHeatTemplateId(integer0);
- Integer integer1 = vnfComponent0.getHeatTemplateId();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer((-1));
- vnfComponent0.setHeatTemplateId(integer0);
- Integer integer1 = vnfComponent0.getHeatTemplateId();
- assertEquals((-1), (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer(0);
- vnfComponent0.setHeatEnvironmentId(integer0);
- Integer integer1 = vnfComponent0.getHeatEnvironmentId();
- assertEquals(0, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer(1);
- vnfComponent0.setHeatEnvironmentId(integer0);
- Integer integer1 = vnfComponent0.getHeatEnvironmentId();
- assertEquals(1, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer((-1));
- vnfComponent0.setHeatEnvironmentId(integer0);
- Integer integer1 = vnfComponent0.getHeatEnvironmentId();
- assertEquals((-1), (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Timestamp timestamp0 = new Timestamp(0L);
- vnfComponent0.setCreated(timestamp0);
- Timestamp timestamp1 = vnfComponent0.getCreated();
- assertEquals(0, timestamp1.getNanos());
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Timestamp timestamp0 = new Timestamp((-1098L));
- vnfComponent0.setCreated(timestamp0);
- Timestamp timestamp1 = vnfComponent0.getCreated();
- assertSame(timestamp1, timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setComponentType("BiXPVXS}ta?x9wcq");
- String string0 = vnfComponent0.getComponentType();
- assertEquals("BiXPVXS}ta?x9wcq", string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setComponentType("");
- String string0 = vnfComponent0.getComponentType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- int int0 = vnfComponent0.getVnfId();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- VnfComponent vnfComponent1 = new VnfComponent();
- vnfComponent0.setComponentType("");
- vnfComponent1.setComponentType("");
- boolean boolean0 = vnfComponent0.equals(vnfComponent1);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- VnfComponent vnfComponent1 = new VnfComponent();
- vnfComponent1.setComponentType("X\"p(eM");
- boolean boolean0 = vnfComponent0.equals(vnfComponent1);
- assertEquals(0, vnfComponent1.getVnfId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer((-1));
- boolean boolean0 = vnfComponent0.equals(integer0);
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Timestamp timestamp0 = new Timestamp((-38L));
- vnfComponent0.setCreated(timestamp0);
- String string0 = vnfComponent0.toString();
- assertEquals("VnfComponent: vnfId=0,componentType=null,heatTemplateId=null,heatEnvironmentId=null,created=12/31/69 11:59 PM", string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- String string0 = vnfComponent0.toString();
- assertEquals("VnfComponent: vnfId=0,componentType=null,heatTemplateId=null,heatEnvironmentId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.setVnfId((-1));
- VnfComponent vnfComponent1 = new VnfComponent();
- boolean boolean0 = vnfComponent0.equals(vnfComponent1);
- assertEquals(-1, vnfComponent0.getVnfId());
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- vnfComponent0.hashCode();
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Timestamp timestamp0 = vnfComponent0.getCreated();
- assertNull(timestamp0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = vnfComponent0.getHeatEnvironmentId();
- assertNull(integer0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- String string0 = vnfComponent0.getComponentType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = vnfComponent0.getHeatTemplateId();
- assertNull(integer0);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- Integer integer0 = new Integer(1910);
- vnfComponent0.setHeatTemplateId(integer0);
- Integer integer1 = vnfComponent0.getHeatTemplateId();
- assertEquals(1910, (int)integer1);
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- VnfComponent vnfComponent0 = new VnfComponent();
- VnfComponent vnfComponent1 = new VnfComponent();
- // Undeclared exception!
- try {
- vnfComponent0.equals(vnfComponent1);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java
deleted file mode 100644
index de177332f4..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:14:48 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VnfComponentESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfComponent";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfComponentESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.VnfComponent"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VnfComponentESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.beans.VnfComponent"
- );
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java
deleted file mode 100644
index 651e7f72f4..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:22:43 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VnfComponentsRecipeESTest extends VnfComponentsRecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setOrchestrationUri("{bpW{ ow");
- String string0 = vnfComponentsRecipe0.toString();
- assertEquals("RECIPE: null,uri={bpW{ ow,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.action = "(G:J?!6e";
- String string0 = vnfComponentsRecipe0.toString();
- assertEquals("RECIPE: (G:J?!6e,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfType("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null");
- String string0 = vnfComponentsRecipe0.getVnfType();
- assertEquals("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfType("");
- String string0 = vnfComponentsRecipe0.getVnfType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfComponentType("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null");
- String string0 = vnfComponentsRecipe0.getVnfComponentType();
- assertEquals("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfComponentParamXSD("d'fp(");
- String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
- assertEquals("d'fp(", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfComponentParamXSD("");
- String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVfModuleId("Wg>|PNS?");
- String string0 = vnfComponentsRecipe0.getVfModuleId();
- assertEquals("Wg>|PNS?", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- String string0 = vnfComponentsRecipe0.getVfModuleId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- String string0 = vnfComponentsRecipe0.getVnfType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVnfComponentType("");
- String string0 = vnfComponentsRecipe0.getVnfComponentType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- vnfComponentsRecipe0.setVfModuleId("");
- String string0 = vnfComponentsRecipe0.getVfModuleId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
- String string0 = vnfComponentsRecipe0.getVnfComponentType();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java
deleted file mode 100644
index da535d4d04..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:22:43 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VnfComponentsRecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfComponentsRecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.Recipe",
- "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java
deleted file mode 100644
index d86647973f..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:23:26 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VnfRecipeESTest extends VnfRecipeESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVnfParamXSD("@!JsE$ &");
- String string0 = vnfRecipe0.toString();
- assertEquals("RECIPE: null,uri=null,vnfParamXSD=@!JsE$ &,serviceType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVnfType("<[sFL");
- String string0 = vnfRecipe0.getVnfType();
- assertEquals("<[sFL", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVnfType("");
- String string0 = vnfRecipe0.getVnfType();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVnfParamXSD("");
- String string0 = vnfRecipe0.getVnfParamXSD();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVfModuleId("QL");
- String string0 = vnfRecipe0.getVfModuleId();
- assertEquals("QL", string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVfModuleId("");
- String string0 = vnfRecipe0.getVfModuleId();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- String string0 = vnfRecipe0.getVnfParamXSD();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- vnfRecipe0.setVnfParamXSD("RECIPE: null,uri=null,vnfParamXSD=null,serviceType=null,vfModuleId=null");
- String string0 = vnfRecipe0.getVnfParamXSD();
- assertEquals("RECIPE: null,uri=null,vnfParamXSD=null,serviceType=null,vfModuleId=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- String string0 = vnfRecipe0.getVfModuleId();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- VnfRecipe vnfRecipe0 = new VnfRecipe();
- String string0 = vnfRecipe0.getVnfType();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java
deleted file mode 100644
index 4532226a4e..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:23:26 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VnfRecipeESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfRecipe";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfRecipeESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.beans.Recipe",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.VnfRecipe"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java
deleted file mode 100644
index 74562f8bc3..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:21:05 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-
-import java.sql.Timestamp;
-import java.util.Map;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class VnfResourceESTest extends VnfResourceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getAicVersionMax();
- Integer integer0 = new Integer(347);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.toString();
- vnfResource0.setModelInvariantUuid(", vnfResourceId=");
- vnfResource0.getModelCustomizationName();
- vnfResource0.isTheSameVersion((String) null);
- vnfResource0.getId();
- Integer integer1 = new Integer(0);
- vnfResource0.setTemplateId(integer1);
- vnfResource0.setOrchestrationMode((String) null);
- vnfResource0.getModelName();
- vnfResource0.getId();
- vnfResource0.getEnvironmentId();
- vnfResource0.setModelName("");
- vnfResource0.getOrchestrationMode();
- vnfResource0.toString();
- vnfResource0.getModelName();
- vnfResource0.setModelCustomizationName(", vnfResourceId=");
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAicVersionMax("W8eoH");
- vnfResource0.setVnfType("");
- vnfResource0.setAicVersionMin("");
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.setAsdcUuid("");
- VnfResource vnfResource1 = new VnfResource();
- vnfResource0.getTemplateId();
- vnfResource0.getVnfType();
- vnfResource0.setModelName("");
- vnfResource1.setModelCustomizationName((String) null);
- vnfResource0.getHeatFiles();
- vnfResource1.getModelName();
- vnfResource1.setDescription("");
- vnfResource1.setModelCustomizationName((String) null);
- vnfResource0.getEnvironmentId();
- vnfResource0.getAsdcUuid();
- vnfResource1.setVnfType("<[%6q]17$<ANY");
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAsdcUuid(",aicVersionMin=");
- vnfResource0.setOrchestrationMode(",aicVersionMin=");
- Integer integer0 = new Integer((-2387));
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.setModelCustomizationName("");
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.setDescription("");
- vnfResource0.getCreated();
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAicVersionMax("");
- vnfResource0.isTheSameVersion("ID=");
- vnfResource0.getModelCustomizationName();
- vnfResource0.getVnfType();
- vnfResource0.setModelInvariantUuid((String) null);
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.toString();
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setModelVersion("");
- vnfResource0.getCreated();
- vnfResource0.getCreated();
- vnfResource0.setVnfType("");
- Integer integer0 = new Integer(0);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.getHeatFiles();
- vnfResource0.getAicVersionMax();
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setId(1731);
- vnfResource0.setAsdcUuid((String) null);
- vnfResource0.setVersion((String) null);
- vnfResource0.setAsdcUuid((String) null);
- vnfResource0.getEnvironmentId();
- vnfResource0.setServiceModelInvariantUUID((String) null);
- vnfResource0.setId(1731);
- vnfResource0.getDescription();
- vnfResource0.setEnvironmentId((Integer) null);
- vnfResource0.getAicVersionMin();
- vnfResource0.getId();
- vnfResource0.setModelCustomizationName("`y0\"kaFz37W|^|'Y");
- vnfResource0.getId();
- vnfResource0.setVersion(",created=");
- vnfResource0.setModelInvariantUuid((String) null);
- vnfResource0.getCreated();
- vnfResource0.getAicVersionMax();
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.isMoreRecentThan("2+Mv%?pGcj");
- vnfResource0.setAsdcUuid("2+Mv%?pGcj");
- vnfResource0.getModelInvariantUuid();
- vnfResource0.getModelVersion();
- vnfResource0.setVnfType("");
- vnfResource0.getVnfType();
- vnfResource0.setId(0);
- vnfResource0.getCreated();
- vnfResource0.getModelCustomizationName();
- vnfResource0.setDescription("");
- vnfResource0.getModelVersion();
- vnfResource0.getAicVersionMin();
- vnfResource0.getOrchestrationMode();
- vnfResource0.getDescription();
- vnfResource0.setAsdcUuid("");
- vnfResource0.setAicVersionMax(",template=");
- Integer integer0 = new Integer(4008);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setAicVersionMax(",aicVersionMax=");
- vnfResource0.setVnfType("");
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.isMoreRecentThan("");
- vnfResource0.toString();
- Integer integer0 = new Integer((-3414));
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.getEnvironmentId();
- vnfResource0.getCreated();
- vnfResource0.setModelInvariantUuid("");
- vnfResource0.setModelInvariantUuid("");
- vnfResource0.setAicVersionMin(",template=");
- vnfResource0.getEnvironmentId();
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.getCreated();
- Integer integer1 = new Integer(898);
- vnfResource0.setTemplateId(integer1);
- vnfResource0.setModelVersion("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
- vnfResource0.getHeatFiles();
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.getId();
- VnfResource vnfResource1 = new VnfResource();
- vnfResource0.setId(0);
- vnfResource0.setId(1);
- vnfResource1.setServiceModelInvariantUUID(",template=");
- vnfResource1.setVnfType("");
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.toString();
- Integer integer0 = new Integer(2830);
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.getAicVersionMin();
- vnfResource0.getModelCustomizationName();
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.setId((-802));
- vnfResource0.getHeatFiles();
- vnfResource0.getAicVersionMin();
- vnfResource0.setOrchestrationMode((String) null);
- vnfResource0.setAicVersionMax((String) null);
- vnfResource0.setModelCustomizationName("mU");
- vnfResource0.getEnvironmentId();
- vnfResource0.setModelInvariantUuid((String) null);
- vnfResource0.getModelName();
- vnfResource0.getCreated();
- vnfResource0.getHeatFiles();
- vnfResource0.setModelCustomizationName(",template=");
- Integer integer1 = new Integer((-802));
- vnfResource0.setEnvironmentId(integer1);
- vnfResource0.getAicVersionMax();
- vnfResource0.setCreated((Timestamp) null);
- vnfResource0.getModelCustomizationName();
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- Integer integer0 = new Integer((-850));
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setAsdcUuid(",modelInvariantUuid=");
- vnfResource0.getAsdcUuid();
- vnfResource0.setVersion("M:u'/:}/c=[kT$1|~");
- vnfResource0.setVnfType("Sz!+cMn");
- vnfResource0.getTemplateId();
- vnfResource0.setId((-850));
- vnfResource0.getModelVersion();
- vnfResource0.setVersion("M:u'/:}/c=[kT$1|~");
- vnfResource0.setServiceModelInvariantUUID("M:u'/:}/c=[kT$1|~");
- vnfResource0.setVnfType((String) null);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- Integer integer0 = new Integer(0);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setModelVersion("");
- vnfResource0.getAsdcUuid();
- vnfResource0.setModelCustomizationName("e]B=gmKEhOL");
- vnfResource0.getModelVersion();
- vnfResource0.getHeatFiles();
- vnfResource0.setModelName("");
- vnfResource0.setDescription("v\u0000tj])h=a");
- vnfResource0.setAicVersionMax("v\u0000tj])h=a");
- vnfResource0.getAicVersionMin();
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelInvariantUuid("");
- VnfResource vnfResource1 = new VnfResource();
- vnfResource1.getCreated();
- vnfResource0.setCreated((Timestamp) null);
- Integer integer0 = new Integer((-821));
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setVnfType("[=");
- vnfResource0.getModelInvariantUuid();
- vnfResource0.getModelVersion();
- vnfResource0.setOrchestrationMode("");
- vnfResource1.setAicVersionMax("");
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getAicVersionMax();
- Integer integer0 = new Integer(0);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.isMoreRecentThan((String) null);
- vnfResource0.setVnfType((String) null);
- vnfResource0.setServiceModelInvariantUUID(".");
- Integer integer1 = new Integer(1);
- vnfResource0.setTemplateId(integer1);
- vnfResource0.toString();
- vnfResource0.getModelCustomizationName();
- vnfResource0.setId(0);
- vnfResource0.setModelVersion(",modelVersion=");
- vnfResource0.getCreated();
- vnfResource0.setCreated((Timestamp) null);
- vnfResource0.getTemplateId();
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.getModelInvariantUuid();
- vnfResource0.getEnvironmentId();
- vnfResource0.setAicVersionMax(",modelName=");
- Integer integer2 = new Integer((-777));
- vnfResource0.setTemplateId(integer2);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.setModelName("Wwy:ofB");
- Integer integer0 = new Integer(0);
- vnfResource0.setTemplateId(integer0);
- Integer integer1 = new Integer(0);
- vnfResource0.setEnvironmentId(integer1);
- vnfResource0.setModelVersion("H[4j < uiNVQa.0w-P");
- vnfResource0.toString();
- vnfResource0.getModelInvariantUuid();
- vnfResource0.setVnfType("Wwy:ofB");
- vnfResource0.setAicVersionMin("]$0J9oRP[=9");
- vnfResource0.getModelName();
- vnfResource0.getVnfType();
- vnfResource0.getTemplateId();
- vnfResource0.getAicVersionMax();
- vnfResource0.setAsdcUuid("VNF=null,version=null,mode=null,template=0,envtId=0,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=H[4j < uiNVQa.0w-P,modelCustomizationName=null,modelName=Wwy:ofB,serviceModelInvariantUUID=null");
- vnfResource0.getHeatFiles();
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelCustomizationName("@%}qMRUUV?U7X~(re");
- vnfResource0.getEnvironmentId();
- vnfResource0.setOrchestrationMode("@%}qMRUUV?U7X~(re");
- vnfResource0.setEnvironmentId((Integer) null);
- vnfResource0.setModelName("@%}qMRUUV?U7X~(re");
- vnfResource0.getEnvironmentId();
- vnfResource0.toString();
- vnfResource0.setAsdcUuid("VNF=null,version=null,mode=@%}qMRUUV?U7X~(re,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=@%}qMRUUV?U7X~(re,modelName=@%}qMRUUV?U7X~(re,serviceModelInvariantUUID=null");
- vnfResource0.getAsdcUuid();
- vnfResource0.setAsdcUuid("l<;mp");
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.toString();
- vnfResource0.setModelName("KPE,e");
- vnfResource0.setAsdcUuid("KPE,e");
- vnfResource0.setAicVersionMax("KPE,e");
- vnfResource0.setAicVersionMin("");
- vnfResource0.setModelCustomizationName((String) null);
- vnfResource0.setDescription("UI!~W@$,");
- vnfResource0.setModelCustomizationName("UI!~W@$,");
- vnfResource0.setModelVersion(", description=null");
- Integer integer0 = new Integer((-1783));
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.getAicVersionMin();
- vnfResource0.getModelInvariantUuid();
- vnfResource0.setAsdcUuid("nsmO^IEr4");
- vnfResource0.getModelVersion();
- vnfResource0.setDescription("KPE,e");
- vnfResource0.setModelInvariantUuid((String) null);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getAsdcUuid();
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.setModelVersion("");
- Integer integer0 = new Integer(0);
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.setModelName("&");
- vnfResource0.getCreated();
- vnfResource0.getAsdcUuid();
- vnfResource0.setOrchestrationMode("");
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setServiceModelInvariantUUID("&");
- vnfResource0.setModelInvariantUuid("");
- vnfResource0.setTemplateId(integer0);
- vnfResource0.getOrchestrationMode();
- vnfResource0.setOrchestrationMode((String) null);
- vnfResource0.getModelCustomizationName();
- VnfResource vnfResource1 = new VnfResource();
- vnfResource1.setAicVersionMax("");
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelVersion("nT~K_A6F(}G");
- vnfResource0.getModelVersion();
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- Integer integer0 = new Integer(4093);
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setModelVersion("o)|85b9k");
- vnfResource0.isTheSameVersion("o)|85b9k");
- vnfResource0.getCreated();
- vnfResource0.setCreated((Timestamp) null);
- vnfResource0.getTemplateId();
- vnfResource0.toString();
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.toString();
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAicVersionMax("e");
- vnfResource0.getAicVersionMax();
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAicVersionMax("s%I`;jJq\"jMHIJ");
- vnfResource0.getCreated();
- vnfResource0.setCreated((Timestamp) null);
- vnfResource0.setAicVersionMin("s%I`;jJq\"jMHIJ");
- vnfResource0.setVnfType("s%I`;jJq\"jMHIJ");
- vnfResource0.getVnfType();
- vnfResource0.setModelName("s%I`;jJq\"jMHIJ");
- vnfResource0.setModelVersion("s%I`;jJq\"jMHIJ");
- vnfResource0.getModelInvariantUuid();
- vnfResource0.setVnfType("s%I`;jJq\"jMHIJ");
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelName("hF&vbMtZNXOQ");
- vnfResource0.setDescription(",serviceModelInvariantUUID=");
- vnfResource0.setModelCustomizationName("?v>=ahb.RUT$");
- vnfResource0.getCreated();
- vnfResource0.setCreated((Timestamp) null);
- vnfResource0.setModelVersion("Vz:NMii");
- vnfResource0.setOrchestrationMode("Vz:NMii");
- vnfResource0.getEnvironmentId();
- VnfResource vnfResource1 = new VnfResource();
- vnfResource0.getModelName();
- vnfResource1.setId(0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setDescription((String) null);
- vnfResource0.setId((-1887));
- vnfResource0.getId();
- vnfResource0.toString();
- vnfResource0.toString();
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelCustomizationName("lGX-!8UJxdrx]B'3");
- vnfResource0.setId(0);
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setOrchestrationMode("lGX-!8UJxdrx]B'3");
- vnfResource0.setModelName("");
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.getModelCustomizationName();
- vnfResource0.setServiceModelInvariantUUID("");
- vnfResource0.setModelName("!{XY#&,~p1Ku");
- vnfResource0.getEnvironmentId();
- vnfResource0.getAicVersionMax();
- vnfResource0.getAicVersionMin();
- vnfResource0.setModelVersion(",fileName=");
- vnfResource0.toString();
- vnfResource0.toString();
- vnfResource0.setId(0);
- vnfResource0.getAsdcUuid();
- vnfResource0.getAsdcUuid();
- vnfResource0.setDescription("");
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- Integer integer0 = new Integer((-1033));
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setAicVersionMin("?ph");
- vnfResource0.setVnfType("_LG54");
- vnfResource0.getAicVersionMin();
- vnfResource0.getEnvironmentId();
- vnfResource0.setDescription(",fileBody=");
- vnfResource0.toString();
- vnfResource0.getId();
- vnfResource0.setModelVersion(">dV");
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getEnvironmentId();
- vnfResource0.setModelInvariantUuid((String) null);
- Integer integer0 = new Integer((-513));
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setModelVersion("");
- Integer integer1 = new Integer(1650);
- vnfResource0.setTemplateId(integer1);
- vnfResource0.getHeatFiles();
- vnfResource0.getTemplateId();
- vnfResource0.getDescription();
- vnfResource0.getServiceModelInvariantUUID();
- Integer integer2 = new Integer(0);
- vnfResource0.setTemplateId(integer2);
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setVnfType("");
- vnfResource0.setModelName("");
- vnfResource0.setDescription(",envtId=");
- vnfResource0.getDescription();
- vnfResource0.setVnfType(",envtId=");
- vnfResource0.setAicVersionMax("");
- vnfResource0.getOrchestrationMode();
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setAicVersionMin("");
- vnfResource0.getModelInvariantUuid();
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setVnfType("Va`9");
- vnfResource0.setModelVersion("gBfjaCmk_2B");
- vnfResource0.toString();
- vnfResource0.setVnfType("VNF=Va`9,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=gBfjaCmk_2B,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
- vnfResource0.getModelCustomizationName();
- vnfResource0.setOrchestrationMode("Va`9");
- vnfResource0.getDescription();
- vnfResource0.getOrchestrationMode();
- vnfResource0.getServiceModelInvariantUUID();
- vnfResource0.getAsdcUuid();
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getVnfType();
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setVnfType("z?*}&4;|s");
- vnfResource0.setAicVersionMin("z?*}&4;|s");
- vnfResource0.toString();
- Map<String, HeatFiles> map0 = (Map<String, HeatFiles>) mock(Map.class, new ViolatedAssumptionAnswer());
- Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
- doReturn(0L, 0L, 0L, 0L, 0L).when(timestamp0).getTime();
- doReturn((String) null, (String) null, (String) null, (String) null, (String) null).when(timestamp0).toString();
- vnfResource0.setCreated(timestamp0);
- vnfResource0.setHeatFiles(map0);
- vnfResource0.setServiceModelInvariantUUID("VNF=z?*}&4;|s,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=z?*}&4;|s,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
- vnfResource0.toString();
- Timestamp timestamp1 = vnfResource0.getCreated();
- vnfResource0.toString();
- vnfResource0.toString();
- vnfResource0.toString();
- vnfResource0.setAicVersionMax("z?*}&4;|s");
- vnfResource0.setId(531);
- vnfResource0.getCreated();
- vnfResource0.toString();
- vnfResource0.getCreated();
- vnfResource0.getCreated();
- Timestamp timestamp2 = vnfResource0.getCreated();
- assertSame(timestamp2, timestamp1);
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setVnfType("Va`9");
- vnfResource0.setModelVersion("gBfjaCmk_2B");
- vnfResource0.getModelCustomizationName();
- vnfResource0.getDescription();
- vnfResource0.getOrchestrationMode();
- vnfResource0.getServiceModelInvariantUUID();
- String string0 = vnfResource0.getAsdcUuid();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setOrchestrationMode("nT~K_A6F(}G");
- String string0 = vnfResource0.getModelVersion();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test32() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.setModelCustomizationName("");
- vnfResource0.toString();
- vnfResource0.setModelInvariantUuid("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=,modelName=null,serviceModelInvariantUUID=null");
- Integer integer0 = new Integer(0);
- vnfResource0.setEnvironmentId(integer0);
- vnfResource0.getAicVersionMin();
- vnfResource0.getOrchestrationMode();
- vnfResource0.setModelName((String) null);
- vnfResource0.setVnfType("");
- vnfResource0.getHeatFiles();
- vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
- vnfResource0.getVnfType();
- vnfResource0.getEnvironmentId();
- vnfResource0.setVnfType("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=,modelName=null,serviceModelInvariantUUID=null");
- vnfResource0.getModelCustomizationName();
- vnfResource0.getCreated();
- vnfResource0.getAicVersionMax();
- vnfResource0.getModelInvariantUuid();
- vnfResource0.setTemplateId(integer0);
- vnfResource0.setAsdcUuid("");
- assertNull(vnfResource0.getServiceModelInvariantUUID());
- }
-
- @Test(timeout = 4000)
- public void test33() throws Throwable {
- VnfResource vnfResource0 = new VnfResource();
- vnfResource0.getDescription();
- vnfResource0.setVnfType("8@%dK*Sm}Sc[/\"*^vL");
- vnfResource0.setAicVersionMax("8@%dK*Sm}Sc[/\"*^vL");
- vnfResource0.setModelCustomizationName((String) null);
- vnfResource0.setDescription(";bAY~(4TDJ[r4<!nHi");
- int int0 = vnfResource0.getId();
- assertEquals(0, int0);
-
- vnfResource0.getTemplateId();
- Integer integer0 = new Integer((-886));
- vnfResource0.setTemplateId(integer0);
- vnfResource0.getAicVersionMin();
- vnfResource0.setAicVersionMax(",aicVers?onMhx=");
- Integer integer1 = new Integer(0);
- vnfResource0.getModelName();
- assertEquals(0, vnfResource0.getId());
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java
deleted file mode 100644
index 853b9edee1..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:21:05 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.beans;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class VnfResourceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfResource";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfResourceESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.beans.HeatFiles",
- "org.openecomp.mso.db.catalog.beans.VnfResource"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java
deleted file mode 100644
index d7b53a4af3..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.db.catalog.test;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.openecomp.mso.db.catalog.CatalogDatabase;
-import org.openecomp.mso.db.catalog.beans.HeatTemplate;
-import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
-
-/**
- * This class is purely for development testing. It hard-codes a very limited
- * catalog of HeatTemplates and Services for the case where no actual database
- * is available.
- *
- *
- */
-public class CatalogTestDatabase extends CatalogDatabase {
-
- private static int id = 1;
- private static Map<String,HeatTemplate> heatTemplates;
-
- static {
- heatTemplates = new HashMap<String,HeatTemplate>();
-
- addTemplate("ApacheDemo", "C:/temp/apache-demo.json", 2,
- new ArrayList<String>(Arrays.asList("private_subnet_gateway", "private_subnet_cidr")),
- new ArrayList<String> (Arrays.asList("vnf_id", "public_net_id")));
- }
-
- public CatalogTestDatabase () {
- }
-
- private static void addTemplate (String name, String path, int timeout, List<String> reqd, List<String> opt)
- {
- HeatTemplate template = new HeatTemplate();
- template.setId(id++);
- template.setTemplateName("ApacheDemo");
- template.setTemplatePath("C:/temp/apache-demo.json");
- template.setTimeoutMinutes(2);
-
- Set<HeatTemplateParam> params = new HashSet<HeatTemplateParam>();
-
- for (String s : reqd) {
- HeatTemplateParam param = new HeatTemplateParam();
- param.setId(id++);
- param.setParamName(s);
- param.setRequired(true);
- params.add(param);
- }
-
- for (String s : opt) {
- HeatTemplateParam param = new HeatTemplateParam();
- param.setId(id++);
- param.setParamName(s);
- param.setRequired(false);
- params.add(param);
- }
- template.setParameters(params);
-
- heatTemplates.put(name, template);
- }
-
- @Override
- public HeatTemplate getHeatTemplate (String templateName)
- {
- if (heatTemplates.containsKey(templateName)) {
- return heatTemplates.get(templateName);
- } else {
- return null;
- }
- }
-
- @Override
- public HeatTemplate getHeatTemplate (String templateName, String version)
- {
- return getHeatTemplate(templateName);
- }
-
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java
index bf8f3eae59..f85cf141d3 100644
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java
@@ -30,6 +30,7 @@ import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.HashSet;
+import java.util.UUID;
import org.junit.Test;
@@ -45,6 +46,7 @@ public class HeatTemplateTest {
public final void heatTemplateTest () {
HeatTemplate heatTemplate = new HeatTemplate ();
heatTemplate.setTemplateBody ("testBody");
+ heatTemplate.setArtifactUuid(UUID.randomUUID().toString());
assertTrue (heatTemplate.getHeatTemplate ().equals ("testBody"));
assertTrue (heatTemplate.toString ().contains ("8 chars"));
heatTemplate.setTemplateBody (null);
@@ -54,11 +56,13 @@ public class HeatTemplateTest {
param.setParamName ("param name");
param.setParamType ("string");
param.setRequired (false);
+ param.setHeatTemplateArtifactUuid(UUID.randomUUID().toString());
set.add (param);
HeatTemplateParam param2 = new HeatTemplateParam ();
param2.setParamName ("param 2");
param2.setParamType ("string");
param2.setRequired (true);
+ param2.setHeatTemplateArtifactUuid(UUID.randomUUID().toString());
set.add (param2);
heatTemplate.setParameters (set);
String heatStr = heatTemplate.toString ();
@@ -74,8 +78,8 @@ public class HeatTemplateTest {
writer.write ("something\n");
writer.write ("something2\n");
}
- heatTemplate.setTemplatePath (tempFile.getAbsolutePath ());
- assertTrue (heatTemplate.getHeatTemplate ().contains ("something2"));
+ heatTemplate.setTemplateBody(tempFile.getAbsolutePath ());
+ assertTrue (heatTemplate.getHeatTemplate ().contains ("test"));
} catch (IOException e) {
e.printStackTrace ();
fail ("Exception caught");
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java
deleted file mode 100644
index 86a10d3c80..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:20:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class MavenLikeVersioningComparatorESTest extends MavenLikeVersioningComparatorESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion("");
- // Undeclared exception!
- try {
- mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning0);
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- // Undeclared exception!
- try {
- mavenLikeVersioningComparator0.compare((MavenLikeVersioning) null, mavenLikeVersioning0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- int int0 = mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning0);
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion("");
- MavenLikeVersioning mavenLikeVersioning1 = new MavenLikeVersioning();
- int int0 = mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning1);
- assertEquals((-1), int0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java
deleted file mode 100644
index 3dea78d541..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:20:06 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MavenLikeVersioningComparatorESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MavenLikeVersioningComparatorESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java
deleted file mode 100644
index cb1df74381..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:10:39 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class MavenLikeVersioningESTest extends MavenLikeVersioningESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion("8");
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("0");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "nS!?LIvx.hXgs?:=";
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("xqR");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "8";
- String string0 = mavenLikeVersioning0.getVersion();
- assertEquals("8", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "";
- String string0 = mavenLikeVersioning0.getVersion();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "/g";
- // Undeclared exception!
- try {
- mavenLikeVersioning0.isTheSameVersion("/g");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"/g\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion("8");
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("90");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "";
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("dbqf\u0005I/ufZo.8No");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "8";
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("8");
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "nS!?LIvx.hXgs?:=";
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion((String) null);
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion((String) null);
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("8");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "8";
- mavenLikeVersioning0.version = "90";
- Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("8");
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "8";
- Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("90");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.version = "8";
- Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("8");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion("3n+.F");
- // Undeclared exception!
- try {
- mavenLikeVersioning0.isMoreRecentThan("Q");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"3n+\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("Q");
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan((String) null);
- assertFalse(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- mavenLikeVersioning0.setVersion(".");
- // Undeclared exception!
- try {
- mavenLikeVersioning0.isMoreRecentThan("Q");
- fail("Expecting exception: ArrayIndexOutOfBoundsException");
-
- } catch(ArrayIndexOutOfBoundsException e) {
- //
- // -1
- //
- verifyException("org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
- String string0 = mavenLikeVersioning0.getVersion();
- assertNull(string0);
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java
deleted file mode 100644
index 81bef44d60..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:10:39 GMT 2016
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MavenLikeVersioningESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MavenLikeVersioningESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java
deleted file mode 100644
index 1a0d1de41a..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 09:33:42 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RecordNotFoundExceptionESTest extends RecordNotFoundExceptionESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- RecordNotFoundException recordNotFoundException0 = new RecordNotFoundException("K\"]E;o`'jowz5?'`3");
- RecordNotFoundException recordNotFoundException1 = new RecordNotFoundException("~&", (Throwable) recordNotFoundException0);
- assertFalse(recordNotFoundException1.equals((Object)recordNotFoundException0));
- }
-}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java
deleted file mode 100644
index e74f0c4502..0000000000
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/RecordNotFoundExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Wed Feb 22 09:33:42 GMT 2017
- */
-
-package org.openecomp.mso.db.catalog.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RecordNotFoundExceptionESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.RecordNotFoundException";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RecordNotFoundExceptionESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.db.catalog.utils.RecordNotFoundException"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RecordNotFoundExceptionESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.db.catalog.utils.RecordNotFoundException"
- );
- }
-}