Merge "Fix installation dependency and authentication issue for fuel plugin"
[yardstick.git] / api / database / models.py
1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from sqlalchemy import Column
10 from sqlalchemy import Integer
11 from sqlalchemy import String
12
13 from api.database import Base
14
15
16 class Tasks(Base):
17     __tablename__ = 'tasks'
18     id = Column(Integer, primary_key=True)
19     task_id = Column(String(30))
20     status = Column(Integer)
21     error = Column(String(120))
22     details = Column(String(120))
23
24     def __repr__(self):
25         return '<Task %r>' % Tasks.task_id