d3531372e7a98681997c7320a4b44147e13bc105
[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 Namespace, fields
16
17
18 class DmsDTO:
19
20     api = Namespace("O2DMS",
21                     description='DMS related operations.')
22
23     dms_get = api.model(
24         "Get DMS information",
25         {
26             'deploymentManagerId': fields.String(
27                 required=True,
28                 description='Deployment manager ID'),
29             'name': fields.String,
30             'description': fields.String,
31             'supportedLocations': fields.String,
32             'capabilities': fields.String,
33             'capacity': fields.String,
34         }
35     )
36
37
38 class DmsLcmNfDeploymentDescriptorDTO:
39
40     api = Namespace("O2DMS_LCM_NfDeploymentDescriptor",
41                     description='DMS LCM NfDeploymentDescritpor operations.')
42
43     dmslcm_NfDeploymentDescriptor_get = api.model(
44         "Get NfDeploymentDescriptor information",
45         {
46             'id': fields.String(
47                 required=True,
48                 description='NfDeploymentDescriptor ID'),
49             'name': fields.String,
50             'description': fields.String,
51             'inputParams': fields.String,
52             'outputParams': fields.String
53         }
54     )