summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db/src/main/resources')
-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
22 files changed, 588 insertions, 360 deletions
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>