[NetApp] add max_over_subscription_ratio to pool stats

The max_over_subscription_ratio configuration, which can be set per
share back end, is now visible in scheduler-stats/pools/detail API.

Change-Id: Idc0eb39d91cf572a480443a5f68f9d3bac8a6342
Closes-Bug: #1877063
This commit is contained in:
Maurice Escher 2020-05-06 10:26:00 +02:00
parent 7e6a76067a
commit da1eb8e2c7
No known key found for this signature in database
GPG Key ID: CC56DEC23EE46750
3 changed files with 13 additions and 0 deletions

View File

@ -340,6 +340,7 @@ class NetAppCmodeFileStorageLibrary(object):
for aggr_name in sorted(aggregates):
reserved_percentage = self.configuration.reserved_share_percentage
max_over_ratio = self.configuration.max_over_subscription_ratio
total_capacity_gb = na_utils.round_down(float(
aggr_space[aggr_name].get('total', 0)) / units.Gi)
@ -360,6 +361,7 @@ class NetAppCmodeFileStorageLibrary(object):
'allocated_capacity_gb': allocated_capacity_gb,
'qos': qos_support,
'reserved_percentage': reserved_percentage,
'max_over_subscription_ratio': max_over_ratio,
'dedupe': [True, False],
'compression': [True, False],
'netapp_flexvol_encryption': netapp_flexvol_encryption,

View File

@ -680,6 +680,7 @@ POOLS = [
'free_capacity_gb': 1.1,
'allocated_capacity_gb': 2.2,
'reserved_percentage': 5,
'max_over_subscription_ratio': 2.0,
'dedupe': [True, False],
'compression': [True, False],
'thin_provisioning': [True, False],
@ -702,6 +703,7 @@ POOLS = [
'free_capacity_gb': 2.0,
'allocated_capacity_gb': 4.0,
'reserved_percentage': 5,
'max_over_subscription_ratio': 2.0,
'dedupe': [True, False],
'compression': [True, False],
'thin_provisioning': [True, False],
@ -727,6 +729,7 @@ POOLS_VSERVER_CREDS = [
'free_capacity_gb': 1.1,
'allocated_capacity_gb': 0.0,
'reserved_percentage': 5,
'max_over_subscription_ratio': 2.0,
'dedupe': [True, False],
'compression': [True, False],
'thin_provisioning': [True, False],
@ -746,6 +749,7 @@ POOLS_VSERVER_CREDS = [
'free_capacity_gb': 2.0,
'allocated_capacity_gb': 0.0,
'reserved_percentage': 5,
'max_over_subscription_ratio': 2.0,
'dedupe': [True, False],
'compression': [True, False],
'thin_provisioning': [True, False],
@ -1317,6 +1321,7 @@ def get_config_cmode():
config = na_fakes.create_configuration_cmode()
config.local_conf.set_override('share_backend_name', BACKEND_NAME)
config.reserved_share_percentage = 5
config.max_over_subscription_ratio = 2.0
config.netapp_login = CLIENT_KWARGS['username']
config.netapp_password = CLIENT_KWARGS['password']
config.netapp_server_hostname = CLIENT_KWARGS['hostname']

View File

@ -0,0 +1,6 @@
---
features:
- |
The NetApp cDOT driver now reports the max_over_subscription_ratio
configuration, which can be set per share back end, via
scheduler-stats/pools/detail API.