Merge "NetApp cDOT driver should honor reserved percentage" into stable/mitaka
This commit is contained in:
commit
9d7f19f81b
|
@ -224,8 +224,6 @@ class NetAppCmodeFileStorageLibrary(object):
|
|||
'driver_version': '1.0',
|
||||
'netapp_storage_family': 'ontap_cluster',
|
||||
'storage_protocol': 'NFS_CIFS',
|
||||
'total_capacity_gb': 0.0,
|
||||
'free_capacity_gb': 0.0,
|
||||
'consistency_group_support': 'host',
|
||||
'pools': self._get_pools(),
|
||||
}
|
||||
|
@ -258,6 +256,8 @@ class NetAppCmodeFileStorageLibrary(object):
|
|||
|
||||
for aggr_name in sorted(aggr_space.keys()):
|
||||
|
||||
reserved_percentage = self.configuration.reserved_share_percentage
|
||||
|
||||
total_capacity_gb = na_utils.round_down(float(
|
||||
aggr_space[aggr_name].get('total', 0)) / units.Gi, '0.01')
|
||||
free_capacity_gb = na_utils.round_down(float(
|
||||
|
@ -274,7 +274,7 @@ class NetAppCmodeFileStorageLibrary(object):
|
|||
'free_capacity_gb': free_capacity_gb,
|
||||
'allocated_capacity_gb': allocated_capacity_gb,
|
||||
'qos': 'False',
|
||||
'reserved_percentage': 0,
|
||||
'reserved_percentage': reserved_percentage,
|
||||
'dedupe': [True, False],
|
||||
'compression': [True, False],
|
||||
'thin_provisioning': [True, False],
|
||||
|
|
|
@ -340,8 +340,6 @@ class NetAppFileStorageLibraryTestCase(test.TestCase):
|
|||
'driver_version': '1.0',
|
||||
'netapp_storage_family': 'ontap_cluster',
|
||||
'storage_protocol': 'NFS_CIFS',
|
||||
'total_capacity_gb': 0.0,
|
||||
'free_capacity_gb': 0.0,
|
||||
'consistency_group_support': 'host',
|
||||
'pools': fake.POOLS,
|
||||
}
|
||||
|
@ -363,8 +361,6 @@ class NetAppFileStorageLibraryTestCase(test.TestCase):
|
|||
'driver_version': '1.0',
|
||||
'netapp_storage_family': 'ontap_cluster',
|
||||
'storage_protocol': 'NFS_CIFS',
|
||||
'total_capacity_gb': 0.0,
|
||||
'free_capacity_gb': 0.0,
|
||||
'consistency_group_support': 'host',
|
||||
'replication_type': 'dr',
|
||||
'replication_domain': 'fake_domain',
|
||||
|
|
|
@ -506,7 +506,7 @@ POOLS = [
|
|||
'free_capacity_gb': 1.1,
|
||||
'allocated_capacity_gb': 2.2,
|
||||
'qos': 'False',
|
||||
'reserved_percentage': 0,
|
||||
'reserved_percentage': 5,
|
||||
'dedupe': [True, False],
|
||||
'compression': [True, False],
|
||||
'thin_provisioning': [True, False],
|
||||
|
@ -518,7 +518,7 @@ POOLS = [
|
|||
'free_capacity_gb': 2.0,
|
||||
'allocated_capacity_gb': 4.0,
|
||||
'qos': 'False',
|
||||
'reserved_percentage': 0,
|
||||
'reserved_percentage': 5,
|
||||
'dedupe': [True, False],
|
||||
'compression': [True, False],
|
||||
'thin_provisioning': [True, False],
|
||||
|
@ -533,7 +533,7 @@ POOLS_VSERVER_CREDS = [
|
|||
'free_capacity_gb': 1.1,
|
||||
'allocated_capacity_gb': 0.0,
|
||||
'qos': 'False',
|
||||
'reserved_percentage': 0,
|
||||
'reserved_percentage': 5,
|
||||
'dedupe': [True, False],
|
||||
'compression': [True, False],
|
||||
'thin_provisioning': [True, False],
|
||||
|
@ -545,7 +545,7 @@ POOLS_VSERVER_CREDS = [
|
|||
'free_capacity_gb': 2.0,
|
||||
'allocated_capacity_gb': 0.0,
|
||||
'qos': 'False',
|
||||
'reserved_percentage': 0,
|
||||
'reserved_percentage': 5,
|
||||
'dedupe': [True, False],
|
||||
'compression': [True, False],
|
||||
'thin_provisioning': [True, False],
|
||||
|
@ -568,6 +568,7 @@ SSC_DISK_TYPES = {
|
|||
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.netapp_login = CLIENT_KWARGS['username']
|
||||
config.netapp_password = CLIENT_KWARGS['password']
|
||||
config.netapp_server_hostname = CLIENT_KWARGS['hostname']
|
||||
|
|
Loading…
Reference in New Issue