Merge "Dell EMC PS: Report total volumes on the backend"

This commit is contained in:
Jenkins 2017-09-12 07:10:24 +00:00 committed by Gerrit Code Review
commit 1dd37a66ac
3 changed files with 13 additions and 2 deletions

View File

@ -58,7 +58,8 @@ class PSSeriesISCSIDriverTestCase(test.TestCase):
self.driver_stats_output = ['TotalCapacity: 111GB',
'FreeSpace: 11GB',
'VolumeReserve: 80GB']
'VolumeReserve: 80GB',
'TotalVolumes: 100']
self.cmd = 'this is dummy command'
self._context = context.get_admin_context()
self.driver = ps.PSSeriesISCSIDriver(
@ -410,6 +411,7 @@ class PSSeriesISCSIDriverTestCase(test.TestCase):
thin_enabled = self.configuration.san_thin_provision
self.assertEqual(float('111.0'), stats['total_capacity_gb'])
self.assertEqual(float('11.0'), stats['free_capacity_gb'])
self.assertEqual(100, stats['total_volumes'])
if thin_enabled:
self.assertEqual(80.0, stats['provisioned_capacity_gb'])

View File

@ -136,10 +136,11 @@ class PSSeriesISCSIDriver(san.SanISCSIDriver):
eqlx_chap_login, and eqlx_chap_password.
1.4.1 - Rebranded driver to Dell EMC.
1.4.2 - Enable report discard support.
1.4.3 - Report total_volumes in volume stats
"""
VERSION = "1.4.2"
VERSION = "1.4.3"
# ThirdPartySytems wiki page
CI_WIKI_NAME = "Dell_Storage_CI"
@ -302,6 +303,7 @@ class PSSeriesISCSIDriver(san.SanISCSIDriver):
data['total_capacity_gb'] = 0
data['free_capacity_gb'] = 0
data['multiattach'] = False
data['total_volumes'] = 0
provisioned_capacity = 0
@ -316,6 +318,9 @@ class PSSeriesISCSIDriver(san.SanISCSIDriver):
if line.startswith('VolumeReserve:'):
out_tup = line.rstrip().partition(' ')
provisioned_capacity = self._get_space_in_gb(out_tup[-1])
if line.startswith('TotalVolumes:'):
out_tup = line.rstrip().partition(' ')
data['total_volumes'] = int(out_tup[-1])
global_capacity = data['total_capacity_gb']
global_free = data['free_capacity_gb']

View File

@ -0,0 +1,4 @@
---
features:
- Dell EMC PS volume driver reports the total number
of volumes on the backend in volume stats.