1 # Copyright (C) 2021 Wind River Systems, Inc.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 from flask_restx import fields
16 from o2dms.api.dms_api_ns import api_dms_lcm_v1
17 from o2common.helper import o2logging
18 logger = o2logging.get_logger(__name__)
22 dms_get = api_dms_lcm_v1.model(
25 'deploymentManagerId': fields.String(
27 description='Deployment manager ID'),
28 'name': fields.String,
29 'description': fields.String,
30 'supportedLocations': fields.String,
31 'capabilities': fields.String,
32 'capacity': fields.String,
37 class DmsLcmNfDeploymentDescriptorDTO:
38 NfDeploymentDescriptor_get = api_dms_lcm_v1.model(
39 "NfDeploymentDescriptorGetDto",
43 description='NfDeploymentDescriptor ID'),
44 'name': fields.String,
45 'description': fields.String,
46 'inputParams': fields.String,
47 'outputParams': fields.String,
48 'artifactUrl': fields.String
52 NfDeploymentDescriptor_create = api_dms_lcm_v1.model(
53 "NfDeploymentDescriptorCreateDto",
55 'name': fields.String,
56 'description': fields.String,
57 'artifactUrl': fields.String,
58 'inputParams': fields.String,
59 'outputParams': fields.String
63 NfDeploymentDescriptor_create_post_resp = api_dms_lcm_v1.model(
64 "NfDeploymentDescriptorCreateRespDto",
67 required=True, description='NfDeploymentDescriptor ID'),
71 NfDeploymentDescriptor_update = api_dms_lcm_v1.model(
72 "NfDeploymentDescriptorUpdateDto",
74 'name': fields.String,
75 'description': fields.String,
76 'artifactUrl': fields.String,
77 'inputParams': fields.String,
78 'outputParams': fields.String
83 class DmsLcmNfDeploymentDTO:
84 NfDeployment_get = api_dms_lcm_v1.model(
89 description='NfDeployment ID'),
90 'name': fields.String,
91 'description': fields.String,
92 'descriptorId': fields.String,
93 'parentDeploymentId': fields.String,
94 'status': fields.Integer
98 NfDeployment_create = api_dms_lcm_v1.model(
99 "NfDeploymentCreateDto",
101 'name': fields.String,
102 'description': fields.String,
103 'descriptorId': fields.String,
104 'parentDeploymentId': fields.String
108 NfDeployment_create_post_resp = api_dms_lcm_v1.model(
109 "NfDeploymentCreateRespDto",
112 required=True, description='NfDeployment ID'),
116 NfDeployment_update = api_dms_lcm_v1.model(
117 "NfDeploymentUpdateDto",
119 'name': fields.String,
120 'description': fields.String,
121 'parentDeploymentId': fields.String
126 class DmsLcmNfOCloudVResourceDTO:
127 NfOCloudVResource_get = api_dms_lcm_v1.model(
128 "NfOCloudVResourceGetDto",
132 description='NfOCloudVResource ID'),
133 'name': fields.String,
134 'description': fields.String,
135 'descriptorId': fields.String,
136 'vresourceType': fields.String,
137 'status': fields.Integer,
138 'metadata': fields.String