From 7e18504725e6f38b88981cd9d7aa7653038558e1 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Fri, 18 Aug 2017 17:26:11 +0800 Subject: Add workflow model and db script Change-Id: Ia0a086b3360318c75a609132c76ad6f91cba24d3 Issue-Id: VFC-111 Signed-off-by: fujinhua --- lcm/pub/database/models.py | 9 ++++++++- resources/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lcm/pub/database/models.py b/lcm/pub/database/models.py index ffe8a395..9071c8e7 100644 --- a/lcm/pub/database/models.py +++ b/lcm/pub/database/models.py @@ -302,4 +302,11 @@ class ServiceBaseInfoModel(models.Model): creator = models.CharField(db_column='creator', max_length=50) create_time = models.BigIntegerField(db_column='createTime', max_length=20) - \ No newline at end of file +class WFPlanModel(models.Model): + class Meta: + db_table = 'NFVO_WF_PLAN' + + deployed_id = models.CharField(db_column='DEPLOYEDID', max_length=255, primary_key=True) + process_id = models.CharField(db_column='PROCESSID', max_length=255) + plan_name = models.CharField(db_column='PLANNAME', max_length=255) + diff --git a/resources/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql b/resources/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql index a325bcfd..36c9ffb6 100644 --- a/resources/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql +++ b/resources/dbscripts/mysql/vfc-nfvo-lcm-createobj.sql @@ -268,3 +268,10 @@ CREATE TABLE t_lcm_inputParam_mapping ( 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, + `PLANNAME` varchar(255) NOT NULL +); -- cgit 1.2.3-korg