Fix HNAS driver thin_provisioning support

Manila HNAS driver is currently not reporting thin_provisioning
support. Fixed by adding it to the _update_share_stats method.

Change-Id: Icf08426a2219dc8144752eddd3faf2c1bd3a65d7
Closes-bug: #1555030
(cherry-picked from commit adb6fa1eac)
This commit is contained in:
tpsilva 2016-03-09 08:12:44 -03:00
parent e17ce1cd2c
commit f5dcf35f62
2 changed files with 3 additions and 1 deletions

View File

@ -360,6 +360,7 @@ class HDSHNASDriver(driver.ShareDriver):
'free_capacity_gb': free_space,
'reserved_percentage': reserved,
'QoS_support': False,
'thin_provisioning': True,
}
LOG.info(_LI("HNAS Capabilities: %(data)s."),
@ -427,4 +428,4 @@ class HDSHNASDriver(driver.ShareDriver):
if hnas_id is None:
hnas_id = share_id
return hnas_id
return hnas_id

View File

@ -405,5 +405,6 @@ class HDSHNASTestCase(test.TestCase):
self.assertEqual(30, self._driver._stats['free_capacity_gb'])
self.assertEqual(0, self._driver._stats['reserved_percentage'])
self.assertEqual(True, self._driver._stats['snapshot_support'])
self.assertTrue(self._driver._stats['thin_provisioning'])
ssh.HNASSSHBackend.get_stats.assert_called_once_with()
self.assertTrue(self.mock_log.info.called)