cephfs_native: Fix client eviction

During deny access, the driver evicts client based on its auth ID
and the share its accessing. It does not make the correct use of
ceph_volume_client library to do this. So fix the evict method call.

Closes-Bug: #1567298

Change-Id: I707d1f2d455106f45c35aa28ca2a30fb0460f9e8
This commit is contained in:
Ramana Raja authored and Tom Barron committed 2016-06-09 13:16:10 -04:00
1 parent 3dfc4dcb2f
commit 05dcc06dde
3 files changed
+9 -2

No files matched your search

+3 -2
View File
@@ -227,8 +227,9 @@ class CephFSNativeDriver(driver.ShareDriver,):
self.volume_client.deauthorize(self._share_path(share),
access['access_to'])
self.volume_client.evict(self._share_path(share),
access['access_to'])
self.volume_client.evict(
access['access_to'],
volume_path=self._share_path(share))
def update_access(self, context, share, access_rules, add_rules,
delete_rules, share_server=None):
@@ -200,6 +200,9 @@ class CephFSNativeDriverTestCase(test.TestCase):
self._driver._volume_client.deauthorize.assert_called_once_with(
self._driver._share_path(self._share),
"alice")
self._driver._volume_client.evict.assert_called_once_with(
"alice",
volume_path=self._driver._share_path(self._share))
def test_update_access_add_rm(self):
alice = {
@@ -0,0 +1,3 @@
---
fixes:
- In cephfs_native driver, fixed client eviction call during access denial.