Merge "Remove compass4nfv weekly danube job"
[releng.git] / utils / test / testapi / opnfv_testapi / models / project_models.py
1 ##############################################################################
2 # Copyright (c) 2015 Orange
3 # guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com
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 opnfv_testapi.models import base_models
10 from opnfv_testapi.tornado_swagger import swagger
11
12
13 @swagger.model()
14 class ProjectCreateRequest(base_models.ModelBase):
15     def __init__(self, name, description=''):
16         self.name = name
17         self.description = description
18
19
20 @swagger.model()
21 class ProjectUpdateRequest(base_models.ModelBase):
22     def __init__(self, name='', description=''):
23         self.name = name
24         self.description = description
25
26
27 @swagger.model()
28 class Project(base_models.ModelBase):
29     def __init__(self,
30                  name=None, _id=None, description=None, create_date=None):
31         self._id = _id
32         self.name = name
33         self.description = description
34         self.creation_date = create_date
35
36
37 @swagger.model()
38 class Projects(base_models.ModelBase):
39     """
40         @property projects:
41         @ptype projects: C{list} of L{Project}
42     """
43     def __init__(self):
44         self.projects = list()
45
46     @staticmethod
47     def attr_parser():
48         return {'projects': Project}