Add missing filter function in HSP driver
HSP driver merged without a filter function. Since the backend does not support shares smaller than 128GB, this filter function is needed so the scheduler does not choose its hosts for shares of these sizes. This patch adds the default filter function to the driver. Change-Id: Ia00fb9540ac45992326e1d07c41a83a1d8a22a1e Closes-bug: #1615616
This commit is contained in:
parent
ef9e231b19
commit
9814b50bad
manila
releasenotes/notes
@ -319,3 +319,6 @@ class HitachiHSPDriver(driver.ShareDriver):
|
||||
"%(shr_id)s is no longer being managed."),
|
||||
{'shr_path': share['export_locations'][0]['path'],
|
||||
'shr_id': share['id']})
|
||||
|
||||
def get_default_filter_function(self):
|
||||
return "share.size >= 128"
|
||||
|
@ -413,3 +413,10 @@ class HitachiHSPTestCase(test.TestCase):
|
||||
rest.HSPRestBackend.get_cluster.assert_called_once_with()
|
||||
mock__update_share_stats.assert_called_once_with(fakes.stats_data)
|
||||
self.assertTrue(self.mock_log.info.called)
|
||||
|
||||
def test_get_default_filter_function(self):
|
||||
expected = "share.size >= 128"
|
||||
|
||||
actual = self._driver.get_default_filter_function()
|
||||
|
||||
self.assertEqual(expected, actual)
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
fixes:
|
||||
- Added missing default filter function on Hitachi HSP driver.
|
Loading…
x
Reference in New Issue
Block a user