diff options
Diffstat (limited to 'mso-catalog-db/src/main/resources')
14 files changed, 929 insertions, 0 deletions
diff --git a/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml b/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml new file mode 100644 index 0000000000..992e5d467a --- /dev/null +++ b/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml @@ -0,0 +1,58 @@ +<?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 Aug 6, 2015 1:11:38 PM by Hibernate Tools 3.4.0.CR1 --> +<hibernate-mapping> + <class name="org.openecomp.mso.db.catalog.beans.HeatEnvironment" table="HEAT_ENVIRONMENT"> + <meta attribute="class-description"> + This class describes a HEAT Environment + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </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> + </properties> + <property name="description" column="DESCRIPTION" type="string" length="1200"/> + <property name="environment" type="text"> + <column name="ENVIRONMENT" 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="asdcUuid" type="string"> + <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="false"/> + </property> + <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/> + + </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 new file mode 100644 index 0000000000..90ae8ab2ea --- /dev/null +++ b/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml @@ -0,0 +1,38 @@ +<?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="HeatNestedTemplate" table="HEAT_NESTED_TEMPLATE"> + <meta attribute="class-description"> + This class describes a nested HEAT template relationship + </meta> + + <composite-id> + <key-property name="parentTemplateId" column="PARENT_TEMPLATE_ID" type="int" /> + <key-property name="childTemplateId" column="CHILD_TEMPLATE_ID" type="int" /> + </composite-id> + + <property name="providerResourceFile" column="PROVIDER_RESOURCE_FILE" type="string" length="100"/> + + </class> + +</hibernate-mapping> diff --git a/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml b/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml new file mode 100644 index 0000000000..9bc6fb1414 --- /dev/null +++ b/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml @@ -0,0 +1,93 @@ +<?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="HeatTemplate" table="HEAT_TEMPLATE"> + <meta attribute="class-description"> + This class describes a HEAT template + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + + <properties name="uk_template" unique="true"> + <property name="templateName" type="string" > + <column name="TEMPLATE_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> + </properties> + + <property name="templatePath" column="TEMPLATE_PATH" type="string" length="100"/> + <property name="templateBody" type="text"> + <column name="TEMPLATE_BODY" not-null="true"/> + </property> + <property name="timeoutMinutes" column="TIMEOUT_MINUTES" type="int"/> + <property name="asdcUuid" type="string" > + <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="true"/> + </property> + <property name="description" column="DESCRIPTION" type="string" length="1200"/> + <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/> + <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"/> + <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> + + <class name="HeatTemplateParam" table="HEAT_TEMPLATE_PARAMS"> + <meta attribute="class-description"> + This class describes an input parameter to a heat template + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + + <properties name="uk_heat_params" unique="true"> + <property name="heatTemplateId" type="int"> + <column name="HEAT_TEMPLATE_ID" not-null="true"/> + </property> + <property name="paramName" type="string" > + <column name="PARAM_NAME" length="100" not-null="true"/> + </property> + </properties> + <property name="required" type="boolean"> + <column name="IS_REQUIRED" not-null="true"/> + </property> + <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 new file mode 100644 index 0000000000..bdd16d37e6 --- /dev/null +++ b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml @@ -0,0 +1,61 @@ +<?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="NetworkRecipe" table="NETWORK_RECIPE"> + <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> + <property name="action" type="string" > + <column name="ACTION" not-null="true" length="20"/> + </property> + <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="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/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml new file mode 100644 index 0000000000..b3b657aa9f --- /dev/null +++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml @@ -0,0 +1,55 @@ +<?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="NetworkResource" table="NETWORK_RESOURCE"> + <meta attribute="class-description"> + 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="created" type="timestamp" generated="insert" update="false" insert="false" > + <column name="CREATION_TIMESTAMP" not-null="true"/> + </property> + <property name="aicVersionMin" type="string" > + <column name="AIC_VERSION_MIN" not-null="false" default="2.5" length="20" /> + </property> + <property name="aicVersionMax" type="string"> + <column name="AIC_VERSION_MAX" not-null="false" default="2.5" length="20"/> + </property> + <property name="neutronNetworkType" column="NEUTRON_NETWORK_TYPE" type="string" length="20"/> + </class> + +</hibernate-mapping> diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml new file mode 100644 index 0000000000..4e43413f47 --- /dev/null +++ b/mso-catalog-db/src/main/resources/Service.hbm.xml @@ -0,0 +1,84 @@ +<?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="Service" table="SERVICE"> + <meta attribute="class-description"> + This class describes a Service that may be orchestrated + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + + <property name="serviceName" column="SERVICE_NAME" type="string" length="40"/> + <property name="version" column="VERSION_STR" type="string" length="20"/> + <property name="description" column="DESCRIPTION" type="string" length="1200"/> + <property name="serviceNameVersionId" column="SERVICE_NAME_VERSION_ID" type="string" length="50"/> + + <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="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"/> + <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"/> + </property> + <property name="action" type="string" > + <column name="ACTION" not-null="true" length="40"/> + </property> + </properties> + <property name="version" column="VERSION_STR" type="string" length="20"/> + <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> + </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 new file mode 100644 index 0000000000..1ccc48daf6 --- /dev/null +++ b/mso-catalog-db/src/main/resources/VfModule.hbm.xml @@ -0,0 +1,81 @@ +<?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 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> + + <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="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="asdcUuid" type="java.lang.String" > + <column name="ASDC_UUID" not-null="false" length="255"/> + </property> + <property name="volEnvironmentId" type="java.lang.Integer" > + <column name="VOL_ENVIRONMENT_ID" not-null="false"/> + </property> + <property name="templateId" type="java.lang.Integer" > + <column name="TEMPLATE_ID" not-null="false"/> + </property> + <property name="isBase" type="int"> + <column name="IS_BASE" not-null="true"/> + </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"/> + </property> + <property name="volTemplateId" type="java.lang.Integer" > + <column name="VOL_TEMPLATE_ID" not-null="false"/> + </property> + <property name="vnfResourceId" type="java.lang.Integer" > + <column name="VNF_RESOURCE_ID" not-null="true"/> + </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="255"/> + </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 new file mode 100644 index 0000000000..9af02d866a --- /dev/null +++ b/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml @@ -0,0 +1,36 @@ +<?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="VfModuleToHeatFiles" table="VF_MODULE_TO_HEAT_FILES"> + <meta attribute="class-description"> + This class describes a VF Module to HEAT Files Entry + </meta> + + <composite-id> + <key-property name="vfModuleId" column="VF_MODULE_ID" type="int" /> + <key-property name="heatFilesId" column="HEAT_FILES_ID" type="int" /> + </composite-id> + + </class> + +</hibernate-mapping> diff --git a/mso-catalog-db/src/main/resources/VnfComponent.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponent.hbm.xml new file mode 100644 index 0000000000..3cda770e63 --- /dev/null +++ b/mso-catalog-db/src/main/resources/VnfComponent.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="VnfComponent" table="VNF_COMPONENTS"> + <meta attribute="class-description"> + VnfComponent describes a table of components for a VNF_RESOURCE + </meta> + + <composite-id> + <key-property name="vnfId" column="VNF_ID" type="int" /> + <key-property name="componentType" column="COMPONENT_TYPE" type="string" length="20"/> + </composite-id> + + <property name="heatTemplateId" column="HEAT_TEMPLATE_ID" type="int" /> + <property name="heatEnvironmentId" column="HEAT_ENVIRONMENT_ID" type="int" /> + <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/VnfComponentsRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml new file mode 100644 index 0000000000..e0ef0d2bc2 --- /dev/null +++ b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml @@ -0,0 +1,53 @@ +<?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="VnfComponentsRecipe" table="VNF_COMPONENTS_RECIPE"> + <meta attribute="class-description"> + This class describes a VNF Components Recipe + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + <properties name="uk_vnf_component_recipe" unique="true"> + <property name="vnfType" column="VNF_TYPE" type="string" length="200"/> + <property name="vfModuleId" column="VF_MODULE_ID" 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="action" type="string"> + <column name="ACTION" not-null="true" length="20"/> + </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"/> + <property name="orchestrationUri" type="string"> + <column name="ORCHESTRATION_URI" not-null="true" length="256"/> + </property> + <property name="vnfComponentParamXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/> + <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> + <property name="created" column="CREATION_TIMESTAMP" type="timestamp" generated="insert" update="false" insert="false" /> + </class> +</hibernate-mapping> diff --git a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml new file mode 100644 index 0000000000..ea2b39e861 --- /dev/null +++ b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml @@ -0,0 +1,66 @@ +<?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="VnfRecipe" table="VNF_RECIPE"> + <meta attribute="class-description"> + This class describes a VNF Recipe + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + + <properties name="uk_vnf_recipe" unique="true"> + + <property name="vfModuleId" type="string"> + <column name="VF_MODULE_ID" not-null="false" length="100" /> + </property> + <property name="action" type="string"> + <column name="ACTION" not-null="true" length="20" /> + </property> + <property name="version" type="string"> + <column name="VERSION_STR" not-null="true" length="20" /> + </property> + + </properties> + + <property name="vnfType" type="string"> + <column name="VNF_TYPE" not-null="false" length="200" /> + </property> + + <property name="serviceType" type="string"> + <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="vnfParamXSD" column="VNF_PARAM_XSD" type="string" length="2048"/> + <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> + <property name="created" column="CREATION_TIMESTAMP" type="timestamp" generated="insert" update="false" insert="false" /> + </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 new file mode 100644 index 0000000000..4c9e3b59e3 --- /dev/null +++ b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml @@ -0,0 +1,134 @@ +<?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="VnfResource" table="VNF_RESOURCE"> + <meta attribute="class-description"> + 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> + </properties> + <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="modelCustomizationName" type="string" > + <column name="MODEL_CUSTOMIZATION_NAME" not-null="false" length="200"/> + </property> + <property name="modelName" type="string" > + <column name="MODEL_NAME" not-null="false" length="200"/> + </property> + <property name="serviceModelInvariantUUID" type="string" > + <column name="SERVICE_MODEL_INVARIANT_UUID" not-null="false" length="200"/> + </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> + + <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> + </properties> + + <property name="vnfResourceId" type="int"> + <column name="VNF_RESOURCE_ID" not-null="false"/> + </property> + <property name="description" type="string" > + <column name="DESCRIPTION" not-null="false" length="1200"/> + </property> + <property name="fileBody" type="text"> + <column name="FILE_BODY" not-null="true"/> + </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="asdcLabel" type="string" > + <column name="ASDC_LABEL" not-null="false" length="200"/> + </property> + + + </class> + +</hibernate-mapping> diff --git a/mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml b/mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml new file mode 100644 index 0000000000..7f28a36346 --- /dev/null +++ b/mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml @@ -0,0 +1,75 @@ +<?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-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> + +<hibernate-configuration> + <session-factory> + <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> + <property name="hibernate.show_sql">false</property> + <property name="hibernate.format_sql">true</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="HeatEnvironment.hbm.xml"/> + <mapping resource="HeatNestedTemplate.hbm.xml"/> + <mapping resource="VnfComponent.hbm.xml"/> + <mapping resource="VnfComponentsRecipe.hbm.xml"/> + <mapping resource="VfModule.hbm.xml"/> + <mapping resource="VfModuleToHeatFiles.hbm.xml"/> + <!-- <property name="connection.url">${CATALOG_CONNECTION_URL}</property> + <property name="connection.username">${CATALOG_USERNAME}</property> + <property name="connection.password">${CATALOG_PASSWORD}</property> + <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> + <property name="hibernate.default_schema">mso_catalog</property> + <property name="connection.driver_class">org.mariadb.jdbc.Driver</property> + <property name="hibernate.current_session_context_class">thread</property> + <property name="hibernate.show_sql">false</property> + <property name="hibernate.format_sql">true</property> + + + <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> + <property name="hibernate.c3p0.min_size">${CATALOG_MIN_POOL_SIZE}</property> + <property name="hibernate.c3p0.max_size">${CATALOG_MAX_POOL_SIZE}</property> + <property name="hibernate.c3p0.timeout">${CATALOG_TIMEOUT}</property> + <property name="hibernate.c3p0.max_statements">50</property> + <property name="hibernate.c3p0.idle_test_period">1000</property> + <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> + + + <mapping resource="VnfResource.hbm.xml"/> + <mapping resource="VnfRecipe.hbm.xml"/> + <mapping resource="HeatTemplate.hbm.xml"/> + <mapping resource="CloudSite.hbm.xml"/> + <mapping resource="Service.hbm.xml"/> + <mapping resource="NetworkResource.hbm.xml"/> + <mapping resource="NetworkRecipe.hbm.xml"/> + <mapping resource="HeatEnvironment.hbm.xml"/> + <mapping resource="HeatNestedTemplate.hbm.xml"/> + <mapping resource="VnfComponent.hbm.xml"/> + <mapping resource="VnfComponentsRecipe.hbm.xml"/> --> + </session-factory> +</hibernate-configuration> diff --git a/mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.xml b/mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.xml new file mode 100644 index 0000000000..306dfc6d0b --- /dev/null +++ b/mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.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-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> + +<hibernate-configuration> + <session-factory> + <!-- <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property> --> + <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> + <property name="hibernate.show_sql">false</property> + <property name="hibernate.format_sql">true</property> + <property name="connection.datasource">java:jboss/datasources/mso-catalog</property> + <property name="hibernate.c3p0.min_size">5</property> + <property name="hibernate.c3p0.max_size">50</property> + <property name="hibernate.c3p0.timeout">1800</property> + <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="HeatEnvironment.hbm.xml"/> + <mapping resource="HeatNestedTemplate.hbm.xml"/> + <mapping resource="VnfComponent.hbm.xml"/> + <mapping resource="VnfComponentsRecipe.hbm.xml"/> + <mapping resource="VfModule.hbm.xml"/> + <mapping resource="VfModuleToHeatFiles.hbm.xml"/> + </session-factory> +</hibernate-configuration> |