SPDK: Report info in top-level volume_stats
Report basic driver info in the top-level volume_stats instead of only in volume_stats['pools']. This aligns SPDK with how most other drivers report this information. Related-Bug: #1896764 Change-Id: I1c8b2152c723f512f1013f31661be68b99579c29
This commit is contained in:
parent
19a128c31b
commit
df575898a9
|
@ -527,6 +527,10 @@ class SpdkDriverTestCase(test.TestCase):
|
|||
self.assertEqual(1, len(self.driver._stats['pools']))
|
||||
self.assertEqual("lvs_test",
|
||||
self.driver._stats['pools'][0]['pool_name'])
|
||||
self.assertEqual('SPDK', self.driver._stats['volume_backend_name'])
|
||||
self.assertEqual('Open Source', self.driver._stats['vendor_name'])
|
||||
self.assertEqual('NVMe-oF', self.driver._stats['storage_protocol'])
|
||||
self.assertIsNotNone(self.driver._stats['driver_version'])
|
||||
|
||||
def test__get_spdk_volume_name(self):
|
||||
with mock.patch.object(self.driver, "_rpc_call",
|
||||
|
|
|
@ -89,7 +89,10 @@ class SPDKDriver(driver.VolumeDriver):
|
|||
"""Retrieve stats info from volume group."""
|
||||
|
||||
LOG.debug('SPDK Updating volume stats')
|
||||
status = {}
|
||||
status = {'volume_backend_name': 'SPDK',
|
||||
'vendor_name': 'Open Source',
|
||||
'driver_version': self.VERSION,
|
||||
'storage_protocol': 'NVMe-oF'}
|
||||
pools_status = []
|
||||
self.lvs = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue