X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=o2dms%2Fviews%2Fdms_dto.py;h=e52bc3e867cf39395a613b2c251f5ac27d33edac;hb=71f8155b3b60befb21aabaffe0b0cf4d940eda61;hp=d3531372e7a98681997c7320a4b44147e13bc105;hpb=5e02e76308e1677fb106572b885a366eb6c0fbec;p=pti%2Fo2.git diff --git a/o2dms/views/dms_dto.py b/o2dms/views/dms_dto.py index d353137..e52bc3e 100644 --- a/o2dms/views/dms_dto.py +++ b/o2dms/views/dms_dto.py @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask_restx import Namespace, fields +from flask_restx import fields +from o2dms.views import api_dms_lcm_v1 class DmsDTO: - - api = Namespace("O2DMS", - description='DMS related operations.') - - dms_get = api.model( - "Get DMS information", + dms_get = api_dms_lcm_v1.model( + "DmsGetDto", { 'deploymentManagerId': fields.String( required=True, @@ -36,12 +33,8 @@ class DmsDTO: class DmsLcmNfDeploymentDescriptorDTO: - - api = Namespace("O2DMS_LCM_NfDeploymentDescriptor", - description='DMS LCM NfDeploymentDescritpor operations.') - - dmslcm_NfDeploymentDescriptor_get = api.model( - "Get NfDeploymentDescriptor information", + NfDeploymentDescriptor_get = api_dms_lcm_v1.model( + "NfDeploymentDescriptorGetDto", { 'id': fields.String( required=True, @@ -52,3 +45,92 @@ class DmsLcmNfDeploymentDescriptorDTO: 'outputParams': fields.String } ) + + NfDeploymentDescriptor_create = api_dms_lcm_v1.model( + "NfDeploymentDescriptorCreateDto", + { + 'name': fields.String, + 'description': fields.String, + 'inputParams': fields.String, + 'outputParams': fields.String + } + ) + + NfDeploymentDescriptor_create_post_resp = api_dms_lcm_v1.model( + "NfDeploymentDescriptorCreateRespDto", + { + 'id': fields.String( + required=True, description='NfDeploymentDescriptor ID'), + } + ) + + NfDeploymentDescriptor_update = api_dms_lcm_v1.model( + "NfDeploymentDescriptorUpdateDto", + { + 'name': fields.String, + 'description': fields.String, + 'inputParams': fields.String, + 'outputParams': fields.String + } + ) + + +class DmsLcmNfDeploymentDTO: + NfDeployment_get = api_dms_lcm_v1.model( + "NfDeploymentGetDto", + { + 'id': fields.String( + required=True, + description='NfDeployment ID'), + 'name': fields.String, + 'description': fields.String, + 'descriptorId': fields.String, + 'parentDeploymentId': fields.String, + 'status': fields.Integer + } + ) + + NfDeployment_create = api_dms_lcm_v1.model( + "NfDeploymentCreateDto", + { + 'name': fields.String, + 'description': fields.String, + 'descriptorId': fields.String, + 'parentDeploymentId': fields.String + } + ) + + NfDeployment_create_post_resp = api_dms_lcm_v1.model( + "NfDeploymentCreateRespDto", + { + 'id': fields.String( + required=True, description='NfDeployment ID'), + } + ) + + NfDeployment_update = api_dms_lcm_v1.model( + "NfDeploymentUpdateDto", + { + 'name': fields.String, + 'description': fields.String, + 'descriptorId': fields.String, + 'parentDeploymentId': fields.String + } + ) + + +class DmsLcmNfOCloudVResourceDTO: + NfOCloudVResource_get = api_dms_lcm_v1.model( + "NfOCloudVResourceGetDto", + { + 'id': fields.String( + required=True, + description='NfOCloudVResource ID'), + 'name': fields.String, + 'description': fields.String, + 'descriptorId': fields.String, + 'vresourceType': fields.String, + 'status': fields.Integer, + 'metadata': fields.String + } + )