diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-08-04 11:16:29 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-08-04 11:21:29 +0800 |
commit | f5e35d09ff5dda2899f52c00c06da7e7e72a2c64 (patch) | |
tree | 9b8fea0c9b21c315f35cf28b9e36de0d3ae267df /resources | |
parent | e6bbd47fea516548bcfa3213da7aa060138fde33 (diff) |
Add vfc-db component seed codes
Change-Id: If1634e4124a71ef0544caef9aee1a08da060a803
Issue-ID: VFC-954
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'resources')
-rwxr-xr-x | resources/catalog/bin/initDB.sh | 49 | ||||
-rw-r--r-- | resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createdb.sql | 31 | ||||
-rw-r--r-- | resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql | 44 | ||||
-rwxr-xr-x | resources/nslcm/bin/initDB.sh | 50 | ||||
-rw-r--r-- | resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createdb.sql | 31 | ||||
-rw-r--r-- | resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql | 281 |
6 files changed, 486 insertions, 0 deletions
diff --git a/resources/catalog/bin/initDB.sh b/resources/catalog/bin/initDB.sh new file mode 100755 index 0000000..a63ee68 --- /dev/null +++ b/resources/catalog/bin/initDB.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# +# Copyright 2018 ZTE Corporation. +# +# 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. +# + +DIRNAME=`dirname $0` +HOME=`cd $DIRNAME/; pwd` +user=$1 +password=$2 +port=$3 +host=$4 +echo "start create nfvocatalog db" +sql_path=$HOME/../ +mysql -u$user -p$password -P$port -h$host <$sql_path/dbscripts/mysql/vfc-nfvo-catalog-createdb.sql +sql_result=$? +if [ $sql_result != 0 ] ; then + echo "failed to create nfvocatalog database" + exit 1 +fi +fileFlag=*createobj.sql +location=$sql_path/dbscripts/mysql +fileName="" +for i in `ls $location` +do + if [[ $i == ${fileFlag} ]];then + fileName=${i}; + echo "start create table:${fileName}" + mysql -u$user -p$password -P$port -h$host <$sql_path/dbscripts/mysql/$fileName + sql_result=$? + if [ $sql_result != 0 ] ; then + echo "failed to init nfvocatalog table:${fileName}" + exit 1 + fi + fi +done +echo "init nfvocatalog database success!" +exit 0 diff --git a/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createdb.sql b/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createdb.sql new file mode 100644 index 0000000..a1fd3e2 --- /dev/null +++ b/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createdb.sql @@ -0,0 +1,31 @@ +-- +-- Copyright 2018 ZTE Corporation. +-- +-- 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. +-- + +/******************drop old database and user***************************/ +use mysql; +drop database IF EXISTS nfvocatalog; +delete from user where User='nfvocatalog'; +FLUSH PRIVILEGES; + +/******************create new database and user***************************/ +create database nfvocatalog CHARACTER SET utf8; + +GRANT ALL PRIVILEGES ON nfvocatalog.* TO 'nfvocatalog'@'%' IDENTIFIED BY 'nfvocatalog' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'nfvocatalog'@'%' IDENTIFIED BY 'nfvocatalog' WITH GRANT OPTION; + +GRANT ALL PRIVILEGES ON nfvocatalog.* TO 'nfvocatalog'@'localhost' IDENTIFIED BY 'nfvocatalog' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'nfvocatalog'@'localhost' IDENTIFIED BY 'nfvocatalog' WITH GRANT OPTION; +FLUSH PRIVILEGES; diff --git a/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql b/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql new file mode 100644 index 0000000..e33251f --- /dev/null +++ b/resources/catalog/dbscripts/mysql/vfc-nfvo-catalog-createobj.sql @@ -0,0 +1,44 @@ +-- +-- Copyright 2018 ZTE Corporation. +-- +-- 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. +-- + +use nfvocatalog; + +DROP TABLE IF EXISTS CATALOG_JOB; +DROP TABLE IF EXISTS CATALOG_JOB_STATUS; +DROP TABLE IF EXISTS CATALOG_NSPACKAGE; +DROP TABLE IF EXISTS CATALOG_SOFTWAREIMAGEMODEL; +DROP TABLE IF EXISTS CATALOG_VNFPACKAGE; + +-- +-- Create model JobModel +-- +CREATE TABLE `CATALOG_JOB` (`JOBID` varchar(255) NOT NULL PRIMARY KEY, `JOBTYPE` varchar(255) NOT NULL, `JOBACTION` varchar(255) NOT NULL, `RESID` varchar(255) NOT NULL, `STATUS` integer NULL, `STARTTIME` varchar(255) NULL, `ENDTIME` varchar(255) NULL, `PROGRESS` integer NULL, `USER` varchar(255) NULL, `PARENTJOBID` varchar(255) NULL, `RESNAME` varchar(255) NULL); +-- +-- Create model JobStatusModel +-- +CREATE TABLE `CATALOG_JOB_STATUS` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `INDEXID` integer NOT NULL, `JOBID` varchar(255) NOT NULL, `STATUS` varchar(255) NOT NULL, `PROGRESS` integer NULL, `DESCP` longtext NOT NULL, `ERRCODE` varchar(255) NULL, `ADDTIME` varchar(255) NULL); +-- +-- Create model NSPackageModel +-- +CREATE TABLE `CATALOG_NSPACKAGE` (`NSPACKAGEID` varchar(50) NOT NULL PRIMARY KEY, `NSPACKAGEURI` varchar(300) NULL, `CHECKSUM` varchar(50) NULL, `SDCCSARID` varchar(50) NULL, `OPERATIONALSTATE` varchar(20) NULL, `USAGESTATE` varchar(20) NULL, `DELETIONPENDING` varchar(20) NULL, `NSDID` varchar(50) NULL, `NSDNAME` varchar(50) NULL, `NSDDESIGNER` varchar(50) NULL, `NSDDESCRIPTION` varchar(100) NULL, `NSDVERSION` varchar(20) NULL, `USERDEFINEDDATA` longtext NULL, `LOCALFILEPATH` varchar(300) NULL, `NSDMODEL` longtext NULL); +-- +-- Create model SoftwareImageModel +-- +CREATE TABLE `CATALOG_SOFTWAREIMAGEMODEL` (`IMAGEID` varchar(50) NOT NULL PRIMARY KEY, `CONTAINERFORMAT` varchar(20) NOT NULL, `DISKFORMAT` varchar(20) NOT NULL, `MINDISK` varchar(20) NOT NULL, `MINRAM` varchar(20) NOT NULL, `USAERMETADATA` varchar(1024) NOT NULL, `VNFPACKAGEID` varchar(50) NOT NULL, `FILEPATH` varchar(300) NOT NULL, `STATUS` varchar(10) NOT NULL, `VIMID` varchar(50) NOT NULL); +-- +-- Create model VnfPackageModel +-- +CREATE TABLE `CATALOG_VNFPACKAGE` (`VNFPACKAGEID` varchar(50) NOT NULL PRIMARY KEY, `VNFPACKAGEURI` varchar(300) NULL, `SDCCSARURI` varchar(300) NULL, `CHECKSUM` varchar(50) NULL, `OPERATIONALSTATE` varchar(20) NULL, `USAGESTATE` varchar(20) NULL, `DELETIONPENDING` varchar(20) NULL, `VNFDID` varchar(50) NULL, `VENDOR` varchar(50) NULL, `VNFDPRODUCTNAME` varchar(50) NULL, `VNFDVERSION` varchar(20) NULL, `VNFSOFTWAREVERSION` varchar(20) NULL, `USERDEFINEDDATA` longtext NULL, `LOCALFILEPATH` varchar(300) NULL, `VNFDMODEL` longtext NULL); diff --git a/resources/nslcm/bin/initDB.sh b/resources/nslcm/bin/initDB.sh new file mode 100755 index 0000000..8087819 --- /dev/null +++ b/resources/nslcm/bin/initDB.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Copyright 2018 ZTE Corporation. +# +# 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. +# + +DIRNAME=`dirname $0` +HOME=`cd $DIRNAME/; pwd` +user=$1 +password=$2 +port=$3 +host=$4 +echo "start create vfcnfvolcm db" +sql_path=$HOME/../ +mysql -u$user -p$password -P$port -h$host <$sql_path/dbscripts/mysql/vfc-nfvo-lcm-createdb.sql +sql_result=$? +if [ $sql_result != 0 ] ; then + echo "failed to create vfcnfvolcm database" + exit 1 +fi +fileFlag=*createobj.sql +location=$sql_path/dbscripts/mysql +fileName="" +for i in `ls $location` +do + if [[ $i == ${fileFlag} ]];then + fileName=${i}; + echo "start create table:${fileName}" + mysql -u$user -p$password -P$port -h$host <$sql_path/dbscripts/mysql/$fileName + sql_result=$? + if [ $sql_result != 0 ] ; then + echo "failed to init vfcnfvolcm table:${fileName}" + exit 1 + fi + fi +done +echo "init vfcnfvolcm database success!" +exit 0 + diff --git a/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createdb.sql b/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createdb.sql new file mode 100644 index 0000000..94e630b --- /dev/null +++ b/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createdb.sql @@ -0,0 +1,31 @@ +-- +-- Copyright 2018 ZTE Corporation. +-- +-- 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. +-- + +/******************drop old database and user***************************/ +use mysql; +drop database IF EXISTS vfcnfvolcm; +delete from user where User='vfcnfvolcm'; +FLUSH PRIVILEGES; + +/******************create new database and user***************************/ +create database vfcnfvolcm CHARACTER SET utf8; + +GRANT ALL PRIVILEGES ON vfcnfvolcm.* TO 'vfcnfvolcm'@'%' IDENTIFIED BY 'vfcnfvolcm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vfcnfvolcm'@'%' IDENTIFIED BY 'vfcnfvolcm' WITH GRANT OPTION; + +GRANT ALL PRIVILEGES ON vfcnfvolcm.* TO 'vfcnfvolcm'@'localhost' IDENTIFIED BY 'vfcnfvolcm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vfcnfvolcm'@'localhost' IDENTIFIED BY 'vfcnfvolcm' WITH GRANT OPTION; +FLUSH PRIVILEGES;
\ No newline at end of file diff --git a/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql b/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql new file mode 100644 index 0000000..f884e73 --- /dev/null +++ b/resources/nslcm/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql @@ -0,0 +1,281 @@ +-- +-- Copyright 2018 ZTE Corporation. +-- +-- 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. +-- + +use vfcnfvolcm; + +DROP TABLE IF EXISTS NFVO_CPINST; +CREATE TABLE NFVO_CPINST ( + `CPINSTANCEID` varchar(255) NOT NULL PRIMARY KEY, + `CPDID` varchar(255) NOT NULL, + `CPINSTANCENAME` varchar(255) NOT NULL, + `OWNERTYPE` integer NOT NULL, + `OWNERID` varchar(255) NOT NULL, + `RELATEDTYPE` integer NOT NULL, + `RELATEDVL` varchar(255) NULL, + `RELATEDCP` varchar(255) NULL, + `RELATEDPORT` varchar(255) NULL, + `STATUS` varchar(255) NOT NULL +); + +DROP TABLE IF EXISTS NFVO_FPINST; +CREATE TABLE NFVO_FPINST ( + `FPID` varchar(255) NOT NULL, + `FPINSTID` varchar(255) NOT NULL PRIMARY KEY, + `FPNAME` varchar(255) NOT NULL, + `NSINSTID` varchar(255) NOT NULL, + `VNFFGINSTID` varchar(255) NOT NULL, + `SYMMETRIC` integer NULL, + `POLICYINFO` longtext NOT NULL, + `FORWORDERPATHS` varchar(255) NULL, + `STATUS` varchar(255) NOT NULL, + `SDNCONTROLLERID` varchar(255) NOT NULL, + `SFCID` varchar(255) NOT NULL, + `FLOWCLASSIFIERS` varchar(255) NOT NULL, + `PORTPAIRGROUPS` longtext NOT NULL +); + +DROP TABLE IF EXISTS NFVO_JOB; +CREATE TABLE NFVO_JOB ( + `JOBID` varchar(255) NOT NULL PRIMARY KEY, + `JOBTYPE` varchar (255) NOT NULL, + `JOBACTION` varchar(255) NOT NULL, + `RESID` varchar(255) NOT NULL, + `STATUS` integer NULL, + `STARTTIME` varchar(255) NULL, + `ENDTIME` varchar(255) NULL, + `PROGRESS` integer NULL, + `USER` varchar(255) NULL, + `PARENTJOBID` varchar(255) NULL, + `RESNAME` varchar(255) NULL +); + +DROP TABLE IF EXISTS NFVO_JOB_STATUS; +CREATE TABLE NFVO_JOB_STATUS ( + `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, + `INDEXID` integer NOT NULL, + `JOBID` varchar(255) NOT NULL, + `STATUS` varchar(255) NOT NULL, + `PROGRESS` integer NULL, + `DESCP` longtext NOT NULL, + `ERRCODE` varchar(255) NULL, + `ADDTIME` varchar(255) NULL +); + +DROP TABLE IF EXISTS NFVO_NFINST; +CREATE TABLE NFVO_NFINST ( + `NFINSTID` varchar(200) NOT NULL PRIMARY KEY, + `M_NFINSTID` varchar(200) NULL, + `NFNAME` varchar(100) NULL, + `TEMPLATEID` varchar(200) NULL, + `VNFID` varchar(200) NULL, + `PACKAGEID` varchar(200) NULL, + `VNFMINSTID` varchar(200) NULL, + `NSINSTID` varchar(200) NULL, + `STATUS` varchar(20) NULL, + `FLAVOURID` varchar(200) NULL, + `VNFLEVEL` varchar(200) NULL, + `LOCATION` varchar(200) NULL, + `MAXVM` integer NULL, + `MAXCPU` integer NULL, + `MAXRAM` integer NULL, + `MAXHD` integer NULL, + `MAXSHD` integer NULL, + `MAXNET` integer NULL, + `VERSION` varchar(255) NULL, + `VENDOR` varchar(255) NULL, + `VNFDMODEL` longtext NULL, + `INPUTPARAMS` longtext NULL, + `SCALEPARAMS` longtext NULL, + `CREATETIME` varchar(200) NULL, + `LASTUPTIME` varchar(200) NULL, + `EXTENSION` longtext NULL +); + +DROP TABLE IF EXISTS NFVO_NFPACKAGE; +CREATE TABLE NFVO_NFPACKAGE ( + `UUID` varchar(255) NOT NULL PRIMARY KEY, + `NFPACKAGEID` varchar(200) NOT NULL, + `VNFDID` varchar(255) NOT NULL, + `VENDOR` varchar(255) NOT NULL, + `VNFDVERSION` varchar(255) NOT NULL, + `VNFVERSION` varchar(255) NOT NULL, + `VNFDMODEL` longtext NULL, + `VNFDPATH` varchar(300) NULL +); + +DROP TABLE IF EXISTS NFVO_NSPACKAGE; +CREATE TABLE NFVO_NSPACKAGE ( + `ID` varchar(200) NOT NULL PRIMARY KEY, + `NSDID` varchar(200) NOT NULL, + `NAME` varchar(200) NOT NULL, + `VENDOR` varchar(200) NULL, + `DESCRIPTION` varchar(200) NULL, + `VERSION` varchar(200) NULL, + `NSDMODEL` longtext NULL, + `NSDPATH` varchar(300) NULL +); + +DROP TABLE IF EXISTS NFVO_NSINST; +CREATE TABLE NFVO_NSINST ( + `ID` varchar(200) NOT NULL PRIMARY KEY, + `NAME` varchar(200) NOT NULL, + `NSPACKAGEID` varchar(200) NULL, + `NSDID` varchar(200) NOT NULL, + `DESCRIPTION` varchar(255) NULL, + `SDNCONTROLLERID` varchar(200) NULL, + `FLAVOURID` varchar(200) NULL, + `NSLEVEL` varchar(200) NULL, + `STATUS` varchar(200) NULL, + `NSDMODEL` longtext NULL, + `INPUTPARAMS` longtext NULL, + `SCALEPARAMS` longtext NULL, + `CREATETIME` varchar(200) NULL, + `LASTUPTIME` varchar(200) NULL, + `GLOBALCUSTOMERID` varchar(50) NULL, + `SERVICETYPE` varchar(50) NULL +); + +DROP TABLE IF EXISTS NFVO_PORTINST; +CREATE TABLE NFVO_PORTINST ( + `PORTID` varchar(255) NOT NULL PRIMARY KEY, + `NETWORKID` varchar(255) NOT NULL, + `SUBNETWORKID` varchar(255) NOT NULL, + `VIMID` varchar(255) NOT NULL, + `RESOURCEID` varchar(255) NOT NULL, + `NAME` varchar(255) NOT NULL, + `INSTID` varchar(255) NOT NULL, + `CPINSTANCEID` varchar(255) NOT NULL, + `BANDWIDTH` varchar(255) NOT NULL, + `OPERATIONALSTATE` varchar(255) NOT NULL, + `IPADDRESS` varchar(255) NOT NULL, + `MACADDRESS` varchar(255) NOT NULL, + `FLOATIPADDRESS` varchar(255) NOT NULL, + `SERVICEIPADDRESS` varchar(255) NOT NULL, + `TYPEVIRTUALNIC` varchar(255) NOT NULL, + `SFCENCAPSULATION` varchar(255) NOT NULL, + `DIRECTION` varchar (255) NOT NULL, + `TENANT` varchar(255) NOT NULL +); + +DROP TABLE IF EXISTS NFVO_VLINST; +CREATE TABLE NFVO_VLINST ( + `VLINSTANCEID` varchar(255) NOT NULL PRIMARY KEY, + `VLDID` varchar(255) NOT NULL, + `VLINSTANCENAME` varchar(255) NULL, + `OWNERTYPE` integer NOT NULL, + `OWNERID` varchar(255) NOT NULL, + `RELATEDNETWORKID` varchar(255) NULL, + `RELATEDSUBNETWORKID` varchar(255) NULL, + `VLTYPE` integer NOT NULL, + `VIMID` varchar(255) NOT NULL, + `TENANT` varchar(255) NOT NULL, + `STATUS` varchar(255) NOT NULL +); + +DROP TABLE IF EXISTS NFVO_VMINST; +CREATE TABLE NFVO_VMINST ( + `VMID` varchar(255) NOT NULL PRIMARY KEY, + `VIMID` varchar (255) NOT NULL, + `RESOURCEID` varchar(255) NOT NULL, + `INSTTYPE` integer NULL, + `INSTID` varchar(255) NULL, + `VMNAME` varchar(255) NOT NULL, + `OPERATIONALSTATE` integer NOT NULL, + `ZONEID` varchar(255) NULL, + `TENANT` varchar(255) NULL, + `HOSTID` varchar(255) NOT NULL, + `DETAILINFO` varchar(255) NULL +); + +DROP TABLE IF EXISTS NFVO_VNFCINST; +CREATE TABLE NFVO_VNFCINST ( + `VNFCINSTANCEID` varchar(255) NOT NULL PRIMARY KEY, + `VDUID` varchar(255) NOT NULL, + `NFINSTID` varchar(255) NOT NULL, + `VMID` varchar(255) NOT NULL, + `STATUS` varchar(255) NOT NULL +); + +DROP TABLE IF EXISTS NFVO_VNFFGINST; +CREATE TABLE NFVO_VNFFGINST ( + `VNFFGDID` varchar(255) NOT NULL, + `VNFFGINSTID` varchar(255) NOT NULL PRIMARY KEY, + `NSINSTID` varchar(255) NOT NULL, + `DESC` varchar(255) NULL, + `VENDOR` varchar(255) NULL, + `VERSION` varchar(255) NULL, + `ENDPOINTNUMBER` integer NOT NULL, + `VLLIST` varchar(1024) NOT NULL, + `CPLIST` varchar(1024) NOT NULL, + `VNFLIST` varchar(1024) NOT NULL, + `FPLIST` varchar(1024) NOT NULL, + `STATUS` varchar(255) NOT NULL +); + +DROP TABLE IF EXISTS NFVO_NFPACKAGEFILE; +CREATE TABLE NFVO_NFPACKAGEFILE ( + `ID` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, + `NFPACKAGEID` varchar(50) NOT NULL, + `FILENAME` varchar(100) NOT NULL, + `FILETYPE` varchar(2) NOT NULL, + `IMAGEID` varchar(50) NOT NULL, + `VIMID` varchar(50) NOT NULL, + `VIMUSER` varchar(50) NOT NULL, + `TENANT` varchar(50) NOT NULL, + `PURPOSE` varchar(1000) NOT NULL, + `STATUS` varchar(10) NOT NULL +); + +SET FOREIGN_KEY_CHECKS = 0; +DROP TABLE IF EXISTS t_lcm_servicebaseinfo; +SET FOREIGN_KEY_CHECKS = 1; +CREATE TABLE t_lcm_servicebaseinfo ( + serviceId VARCHAR(255) NOT NULL, + serviceName VARCHAR(255) NOT NULL, + serviceType VARCHAR(20) NOT NULL, + description VARCHAR(255) NULL, + activeStatus VARCHAR(20) NOT NULL, + status VARCHAR(20) NOT NULL, + creator VARCHAR(50) NOT NULL, + createTime BIGINT NOT NULL, + CONSTRAINT t_lcm_servicebaseinfo PRIMARY KEY(serviceId) +); +DROP TABLE IF EXISTS t_lcm_defPackage_mapping; +CREATE TABLE t_lcm_defPackage_mapping ( + serviceId VARCHAR(255) NOT NULL, + serviceDefId VARCHAR(255) NOT NULL, + templateId VARCHAR(255) NOT NULL, + templateName VARCHAR(255) NOT NULL, + CONSTRAINT t_lcm_defPackage_mapping PRIMARY KEY(serviceId), + CONSTRAINT t_lcm_defPackage_mapping FOREIGN KEY (serviceId) REFERENCES t_lcm_servicebaseinfo (serviceId) +); +DROP TABLE IF EXISTS t_lcm_inputParam_mapping; +CREATE TABLE t_lcm_inputParam_mapping ( + serviceId VARCHAR(255) NOT NULL, + inputKey VARCHAR(255) NOT NULL, + inputValue mediumtext NULL, + CONSTRAINT t_lcm_inputParam_mapping PRIMARY KEY(serviceId,inputKey), + CONSTRAINT t_lcm_inputParam_mapping FOREIGN KEY (serviceId) REFERENCES t_lcm_servicebaseinfo (serviceId) +); + +DROP TABLE IF EXISTS NFVO_WF_PLAN; +CREATE TABLE NFVO_WF_PLAN ( + `DEPLOYEDID` varchar(255) NOT NULL PRIMARY KEY, + `PROCESSID` varchar(255) NOT NULL, + `STATUS` varchar(255) NOT NULL, + `MESSAGE` varchar(1024) NULL, + `PLANNAME` varchar(255) NOT NULL +); |