JIRA: BOTTLENECKS-29
[bottlenecks.git] / vstf / vstf / controller / database / tables.py
old mode 100755 (executable)
new mode 100644 (file)
index a7658f4..55b02e5
@@ -1,9 +1,12 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-07-29
-# see license for license details
-__version__ = ''' '''
+##############################################################################
+# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
 from sqlalchemy import Column, Integer, String, Float, ForeignKey
 from sqlalchemy.ext.declarative import declarative_base
 from vstf.controller.database import constants as const
@@ -127,22 +130,24 @@ class TblTestList(Base):
     TaskID = Column(Integer, ForeignKey('TblTaskList.TaskID'))
     CaseTag = Column(String(const.CASE_TAG_LEN))
     Protocol = Column(String(const.PROTOCOL_LEN))
-    Provider = Column(String(const.PROVIDER_LEN))
     Type = Column(String(const.TYPE_LEN))
+    Switch = Column(String(const.SWITCH_LEN))
+    Provider = Column(String(const.PROVIDER_LEN))
     Tools = Column(String(const.TOOLS_LEN))
 
-    def __init__(self, taskid, casetag, protocol, provider, typ, tools, **kwargs):
+    def __init__(self, taskid, casetag, protocol, typ, switch, provider, tools, **kwargs):
         """Table of test"""
         self.TaskID = taskid
         self.CaseTag = casetag
         self.Protocol = protocol
-        self.Provider = provider
         self.Type = typ
+        self.Switch = switch
+        self.Provider = provider
         self.Tools = tools
 
     def __repr__(self):
-        return "<User(TaskID='%d', CaseTag='%s', Protocol='%s', Provider=%s, Type='%s', Tools='%s')>" % (
-            self.TaskID, self.CaseTag, self.Protocol, self.Provider, self.Type, self.Tools)
+        return "<User(TaskID='%d', CaseTag='%s', Protocol='%s', Type='%s', Switch=%s, Provider=%s, Tools='%s')>" % (
+            self.TaskID, self.CaseTag, self.Protocol, self.Type, self.Switch, self.Provider, self.Tools)
 
 
 class TblThroughput(Base):