Fix ocloudvirtualresource api typo
[pti/o2.git] / o2dms / views / dms_dto.py
1 # Copyright (C) 2021 Wind River Systems, Inc.
2 #
3 #  Licensed under the Apache License, Version 2.0 (the "License");
4 #  you may not use this file except in compliance with the License.
5 #  You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14
15 from flask_restx import fields
16 from o2dms.views import api_dms_lcm_v1
17
18
19 class DmsDTO:
20     dms_get = api_dms_lcm_v1.model(
21         "DmsGetDto",
22         {
23             'deploymentManagerId': fields.String(
24                 required=True,
25                 description='Deployment manager ID'),
26             'name': fields.String,
27             'description': fields.String,
28             'supportedLocations': fields.String,
29             'capabilities': fields.String,
30             'capacity': fields.String,
31         }
32     )
33
34
35 class DmsLcmNfDeploymentDescriptorDTO:
36     NfDeploymentDescriptor_get = api_dms_lcm_v1.model(
37         "NfDeploymentDescriptorGetDto",
38         {
39             'id': fields.String(
40                 required=True,
41                 description='NfDeploymentDescriptor ID'),
42             'name': fields.String,
43             'description': fields.String,
44             'inputParams': fields.String,
45             'outputParams': fields.String
46         }
47     )
48
49     NfDeploymentDescriptor_create = api_dms_lcm_v1.model(
50         "NfDeploymentDescriptorCreateDto",
51         {
52             'name': fields.String,
53             'description': fields.String,
54             'inputParams': fields.String,
55             'outputParams': fields.String
56         }
57     )
58
59     NfDeploymentDescriptor_create_post_resp = api_dms_lcm_v1.model(
60         "NfDeploymentDescriptorCreateRespDto",
61         {
62             'id': fields.String(
63                 required=True, description='NfDeploymentDescriptor ID'),
64         }
65     )
66
67     NfDeploymentDescriptor_update = api_dms_lcm_v1.model(
68         "NfDeploymentDescriptorUpdateDto",
69         {
70             'name': fields.String,
71             'description': fields.String,
72             'inputParams': fields.String,
73             'outputParams': fields.String
74         }
75     )
76
77
78 class DmsLcmNfDeploymentDTO:
79     NfDeployment_get = api_dms_lcm_v1.model(
80         "NfDeploymentGetDto",
81         {
82             'id': fields.String(
83                 required=True,
84                 description='NfDeployment ID'),
85             'name': fields.String,
86             'description': fields.String,
87             'descriptorId': fields.String,
88             'parentDeploymentId': fields.String,
89             'status': fields.Integer
90         }
91     )
92
93     NfDeployment_create = api_dms_lcm_v1.model(
94         "NfDeploymentCreateDto",
95         {
96             'name': fields.String,
97             'description': fields.String,
98             'descriptorId': fields.String,
99             'parentDeploymentId': fields.String
100         }
101     )
102
103     NfDeployment_create_post_resp = api_dms_lcm_v1.model(
104         "NfDeploymentCreateRespDto",
105         {
106             'id': fields.String(
107                 required=True, description='NfDeployment ID'),
108         }
109     )
110
111     NfDeployment_update = api_dms_lcm_v1.model(
112         "NfDeploymentUpdateDto",
113         {
114             'name': fields.String,
115             'description': fields.String,
116             'descriptorId': fields.String,
117             'parentDeploymentId': fields.String
118         }
119     )
120
121
122 class DmsLcmNfOCloudVResourceDTO:
123     NfOCloudVResource_get = api_dms_lcm_v1.model(
124         "NfOCloudVResourceGetDto",
125         {
126             'id': fields.String(
127                 required=True,
128                 description='NfOCloudVResource ID'),
129             'name': fields.String,
130             'description': fields.String,
131             'descriptorId': fields.String,
132             'vresourceType': fields.String,
133             'status': fields.Integer,
134             'metadata': fields.String
135         }
136     )