X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2dms%2Fviews%2Fdms_dto.py;fp=o2dms%2Fviews%2Fdms_dto.py;h=4acc9a35d5b58a3cc1ef6671a00ba7623f36be70;hb=c3ab2dcb442a0e66b7a621c59c6c7a679c26cee9;hp=d3531372e7a98681997c7320a4b44147e13bc105;hpb=66318dfadc702f79ee8bc2a7c2289803b1b01033;p=pti%2Fo2.git diff --git a/o2dms/views/dms_dto.py b/o2dms/views/dms_dto.py index d353137..4acc9a3 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", + dmslcm_NfDeploymentDescriptor_get = api_dms_lcm_v1.model( + "NfDeploymentDescriptorGetDto", { 'id': fields.String( required=True, @@ -52,3 +45,31 @@ 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( + "NfDeploymentDescriptorCreateDto", + { + 'name': fields.String, + 'description': fields.String, + 'inputParams': fields.String, + 'outputParams': fields.String + } + )