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 'artifactRepoUrl': fields.String,
49 'artifactName': fields.String
53 NfDeploymentDescriptor_create = api_dms_lcm_v1.model(
54 "NfDeploymentDescriptorCreateDto",
56 'name': fields.String,
57 'description': fields.String,
58 'artifactRepoUrl': fields.String,
59 'artifactName': fields.String,
60 'inputParams': fields.String,
61 'outputParams': fields.String
65 NfDeploymentDescriptor_create_post_resp = api_dms_lcm_v1.model(
66 "NfDeploymentDescriptorCreateRespDto",
69 required=True, description='NfDeploymentDescriptor ID'),
73 NfDeploymentDescriptor_update = api_dms_lcm_v1.model(
74 "NfDeploymentDescriptorUpdateDto",
76 'name': fields.String,
77 'description': fields.String,
78 'artifactRepoUrl': fields.String,
79 'artifactName': fields.String,
80 'inputParams': fields.String,
81 'outputParams': fields.String
86 class DmsLcmNfDeploymentDTO:
87 NfDeployment_get = api_dms_lcm_v1.model(
92 description='NfDeployment ID'),
93 'name': fields.String,
94 'description': fields.String,
95 'descriptorId': fields.String,
96 'parentDeploymentId': fields.String,
97 'status': fields.Integer
101 NfDeployment_create = api_dms_lcm_v1.model(
102 "NfDeploymentCreateDto",
104 'name': fields.String,
105 'description': fields.String,
106 'descriptorId': fields.String,
107 'parentDeploymentId': fields.String
111 NfDeployment_create_post_resp = api_dms_lcm_v1.model(
112 "NfDeploymentCreateRespDto",
115 required=True, description='NfDeployment ID'),
119 NfDeployment_update = api_dms_lcm_v1.model(
120 "NfDeploymentUpdateDto",
122 'name': fields.String,
123 'description': fields.String,
124 'parentDeploymentId': fields.String
129 class DmsLcmNfOCloudVResourceDTO:
130 NfOCloudVResource_get = api_dms_lcm_v1.model(
131 "NfOCloudVResourceGetDto",
135 description='NfOCloudVResource ID'),
136 'name': fields.String,
137 'description': fields.String,
138 'descriptorId': fields.String,
139 'vresourceType': fields.String,
140 'status': fields.Integer,
141 'metadata': fields.String