X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fviews%2Focloud_dto.py;h=7d1b8f634af021641cfbd66e6a6aca788dfa2093;hb=refs%2Fheads%2Fmaster;hp=3007024c3d0fe3897167463c6a3f6ce75f43f737;hpb=78b9ca23e5bdec562703ed3e54f07e08eac1ec21;p=pti%2Fo2.git diff --git a/o2ims/views/ocloud_dto.py b/o2ims/views/ocloud_dto.py index 3007024..a35be4b 100644 --- a/o2ims/views/ocloud_dto.py +++ b/o2ims/views/ocloud_dto.py @@ -89,11 +89,11 @@ class OcloudDTO: # 'smoRegistrationService': fields.String 'extensions': fields.String( example='', - description='These are unspecified (not standardized) ' +\ - 'properties (keys) which are tailored by the vendor ' +\ + description='These are unspecified (not standardized) ' + + 'properties (keys) which are tailored by the vendor ' + 'to extend the information provided about the O-Cloud.'), }, - mask='{oCloudId,globalCloudId,globalcloudId,name,description,' +\ + mask='{oCloudId,globalCloudId,globalcloudId,name,description,' + 'serviceUri}' ) @@ -264,9 +264,9 @@ class ResourcePoolDTO: # 'resources': fields.String, 'extensions': fields.String( example='', - description='List of metadata key-value pairs ' +\ - 'used to associate meaningful metadata to ' +\ - 'the related resource pool.') + description=('List of metadata key-value pairs ' + 'used to associate meaningful metadata to ' + 'the related resource pool.')) }, mask='{resourcePoolId,oCloudId,globalLocationId,name,description}' ) @@ -359,6 +359,30 @@ class ResourceDTO: class DeploymentManagerDTO: + capabilities = api_ims_inventory_v1.model( + "DeploymentManagerCapabilities", { + 'OS': fields.String( + example='low_latency', + description='Show the OS capablities of ' + + 'the Deployment Manager'), + }) + + capacity = api_ims_inventory_v1.model( + "DeploymentManagerCapacity", { + 'cpu': fields.String( + example='32', + description='Show the cpu capacity of ' + + 'the Deployment Manager'), + 'hugepages-2Mi': fields.String( + example='2048', + description='Show the 2Mi hugepages capacity of ' + + 'the Deployment Manager'), + 'hugepages-1Gi': fields.String( + example='2048', + description='Show the 1Gi hugepages capacity of ' + + 'the Deployment Manager'), + }) + deployment_manager_list = api_ims_inventory_v1.model( "DeploymentManagerListDto", { @@ -380,12 +404,13 @@ class DeploymentManagerDTO: attribute='serviceUri', example='https://128.224.115.51:6443', description='The fully qualified URI to a Deployment ' + - 'Management server for O2dms services.'), + 'Management server for O2dms.'), + # Comment for the future implementation # 'deploymentManagementServiceEndpoint': fields.String( # attribute='serviceUri'), - # 'supportedLocations': fields.String, - # 'capabilities': fields.String, - # 'capacity': fields.String, + 'supportedLocations': fields.String, + 'capabilities': fields.Nested(capabilities, True, True), + 'capacity': fields.Nested(capacity, True, True), 'profileSupportList': fields.List( fields.String, example=['native_k8sapi'], @@ -397,8 +422,8 @@ class DeploymentManagerDTO: 'associate meaningful metadata to the related Deployment ' + 'Manager'), }, - mask='{deploymentManagerId,name,description,oCloudId,serviceUri,' + \ - 'profileSupportList}' + mask='{deploymentManagerId,name,description,oCloudId,serviceUri,' + + 'supportedLocations,capabilities,capacity,profileSupportList}' ) profile = api_ims_inventory_v1.model("DeploymentManagerGetDtoProfile", { @@ -469,16 +494,17 @@ class DeploymentManagerDTO: attribute='serviceUri', example='https://128.224.115.51:6443', description='The fully qualified URI to a Deployment ' + - 'Management server for O2dms services.'), + 'Management server for O2dms.'), # 'deploymentManagementServiceEndpoint': fields.String( # attribute='serviceUri'), - # 'supportedLocations': fields.String, - # 'capabilities': fields.String, - # 'capacity': fields.String, + 'supportedLocations': fields.String, + 'capabilities': fields.Nested(capabilities, True, True), + 'capacity': fields.Nested(capacity, True, True), 'extensions': fields.Nested(extensions, True, True) }, - mask='{deploymentManagerId,name,description,oCloudId,serviceUri,' +\ - 'extensions/profileName,extensions/profileData}' + mask='{deploymentManagerId,name,description,oCloudId,serviceUri,' + + 'supportedLocations,capabilities,capacity,' + + 'extensions{profileName,profileData}}' )