aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db/src/main')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java42
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java16
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java23
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java10
-rw-r--r--mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml6
-rw-r--r--mso-catalog-db/src/main/resources/HeatFiles.hbm.xml2
-rw-r--r--mso-catalog-db/src/main/resources/NetworkResource.hbm.xml4
-rw-r--r--mso-catalog-db/src/main/resources/Service.hbm.xml3
-rw-r--r--mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml1
9 files changed, 57 insertions, 50 deletions
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 6b27c50609..e1d590531f 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
@@ -4205,28 +4205,6 @@ 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 ());
- try {
-
- saveHeatTemplate(childTemplate, childTemplate.getParameters());
- if (getNestedHeatTemplate(parentTemplateId,childTemplate.getId()) == null) {
- HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
- nestedTemplate.setParentTemplateId (parentTemplateId);
- nestedTemplate.setChildTemplateId (childTemplate.getId ());
- nestedTemplate.setProviderResourceFile (yamlFile);
- session.save (nestedTemplate);
- }
- } 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 ();
@@ -4357,26 +4335,6 @@ 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());
- try {
- saveHeatFiles (childFile);
- VfModuleToHeatFiles vfModuleToHeatFile = new VfModuleToHeatFiles ();
- vfModuleToHeatFile.setVfModuleId(parentVfModuleId);
- vfModuleToHeatFile.setHeatFilesId(childFile.getId());
-
- session.save (vfModuleToHeatFile);
-
- } 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 "
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 6fdf236a27..2dcc2e8e6e 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
@@ -42,6 +42,8 @@ public class AllottedResourceCustomization extends MavenLikeVersioning implement
private Integer minInstances;
private Integer maxInstances;
private AllottedResource ar = null;
+ private String providingServiceModelUuid;
+ private String providingServiceModelName;
public AllottedResourceCustomization() {
super();
@@ -128,9 +130,21 @@ public class AllottedResourceCustomization extends MavenLikeVersioning implement
public void setMaxInstances(Integer maxInstances) {
this.maxInstances = maxInstances;
}
+ public String getProvidingServiceModelUuid() {
+ return this.providingServiceModelUuid;
+ }
+ public void setProvidingServiceModelUuid(String providingServiceModelUuid) {
+ this.providingServiceModelUuid = providingServiceModelUuid;
+ }
+ public String getProvidingServiceModelName() {
+ return this.providingServiceModelName;
+ }
+ public void setProvidingServiceModelName(String providingServiceModelName) {
+ this.providingServiceModelName = providingServiceModelName;
+ }
@Override
- public String toString() {
+ public String toString () {
return "modelCustomizationUuid=" + this.modelCustomizationUuid +
",modelInstanceName=" + this.modelInstanceName +
",modelInstanceName=" + this.modelInstanceName +
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 f518678b44..37cad254ba 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
@@ -42,6 +42,8 @@ public class Service extends MavenLikeVersioning implements Serializable {
private String category;
private String serviceType;
private String serviceRole;
+ private String environmentContext;
+ private String workloadContext;
private Map<String,ServiceRecipe> recipes;
private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
@@ -146,14 +148,29 @@ public class Service extends MavenLikeVersioning implements Serializable {
public void setServiceRole(String serviceRole) {
this.serviceRole = serviceRole;
}
+ public String getEnvironmentContext() {
+ return this.environmentContext;
+ }
+ public void setEnvironmentContext(String environmentContext) {
+ this.environmentContext = environmentContext;
+ }
+
+ public String getWorkloadContext() {
+ return this.workloadContext;
+ }
+ public void setWorkloadContext(String workloadContext) {
+ this.workloadContext = workloadContext;
+ }
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("SERVICE: name=").append(modelName).append(",modelVersion=").append(modelVersion)
- .append(",description=").append(description).append(",modelInvariantUUID=").append(modelInvariantUUID)
- .append(",toscaCsarArtifactUUID=").append(toscaCsarArtifactUUID).append(",serviceType=").append(serviceType)
- .append(",serviceRole=").append(serviceRole);
+ .append(",description=").append(description).append(",modelInvariantUUID=").append(modelInvariantUUID)
+
+ .append(",toscaCsarArtifactUUID=").append(toscaCsarArtifactUUID).append(",serviceType=").append(serviceType)
+ .append(",serviceRole=").append(serviceRole).append(",envtContext=").append(this.environmentContext)
+ .append(",workloadContext=").append(this.workloadContext);
for (String recipeAction : recipes.keySet()) {
ServiceRecipe recipe = recipes.get(recipeAction);
sb.append("\n").append(recipe.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 cb5bf64b8c..64c031397f 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
@@ -44,6 +44,7 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser
private String nfType;
private String nfRole;
private String nfNamingCode;
+ private String multiStageDesign;
private List<VfModuleCustomization> vfModuleCustomizations;
private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
@@ -144,6 +145,12 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser
public void setNfNamingCode(String nfNamingCode) {
this.nfNamingCode = nfNamingCode;
}
+ public String getMultiStageDesign() {
+ return this.multiStageDesign;
+ }
+ public void setMultiStageDesign(String multiStageDesign) {
+ this.multiStageDesign = multiStageDesign;
+ }
public List<VfModuleCustomization> getVfModuleCustomizations() {
return this.vfModuleCustomizations;
}
@@ -189,7 +196,8 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser
", nfFunction=" + this.nfFunction +
", nfType=" + this.nfType +
", nfRole=" + this.nfRole +
- ", nfNamingCode=" + this.nfNamingCode;
+ ", nfNamingCode=" + this.nfNamingCode +
+ ", multiStageDesign=" + this.multiStageDesign;
}
}
diff --git a/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
index 0cf50166ea..2154928a84 100644
--- a/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
+++ b/mso-catalog-db/src/main/resources/AllottedResourceCustomization.hbm.xml
@@ -61,5 +61,11 @@
<property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
<column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>
</property>
+ <property name="providingServiceModelUuid" type="java.lang.String" length="200">
+ <column name="PROVIDING_SERVICE_MODEL_UUID" />
+ </property>
+ <property name="providingServiceModelName" type="java.lang.String" length="200">
+ <column name="PROVIDING_SERVICE_MODEL_NAME" />
+ </property>
</class>
</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
index 5a2c4aa537..4674239a99 100644
--- a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
+++ b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
@@ -36,7 +36,7 @@
<property name="version" type="java.lang.String" length="20" not-null="true">
<column name="VERSION" />
</property>
- <property name="fileBody" type="text" not-null="true">
+ <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" not-null="true">
diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
index 41e049ad8d..5d8a2a1edb 100644
--- a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
@@ -29,7 +29,7 @@
<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="200"/>
+ <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"/>
@@ -52,4 +52,4 @@
</class>
-</hibernate-mapping>
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml
index 70f5731b7d..07f7795725 100644
--- a/mso-catalog-db/src/main/resources/Service.hbm.xml
+++ b/mso-catalog-db/src/main/resources/Service.hbm.xml
@@ -42,6 +42,9 @@
<property name="category" column="SERVICE_CATEGORY" type="string" length="20"/>
<property name="serviceType" column="SERVICE_TYPE" type="string" length="20"/>
<property name="serviceRole" column="SERVICE_ROLE" type="string" length="20"/>
+ <property name="environmentContext" column="ENVIRONMENT_CONTEXT" type="string" length="200"/>
+ <property name="workloadContext" column="WORKLOAD_CONTEXT" type="string" length="200"/>
+
<map name="recipes" inverse="true" cascade="all">
<key column="SERVICE_MODEL_UUID"/>
diff --git a/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml b/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml
index f0af7cb97c..78ed9c5ff6 100644
--- a/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfResourceCustomization.hbm.xml
@@ -36,6 +36,7 @@
<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="multiStageDesign" column="MULTI_STAGE_DESIGN" 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" not-null="true">