CephFS driver: change CG variables to SG variables
in the native cephfs driver to align with the overall deprecation in manila of Consistency Groups in favor of Share Groups. Also update a docstring reference to Consistency groups in the base driver class. TrivialFix Change-Id: I69d7d390ae4d4cc7419e4e20c81f44349c533dc8
This commit is contained in:
parent
ed4a7109e9
commit
35a0059462
|
@ -865,7 +865,7 @@ class ShareDriver(object):
|
|||
:param share_servers: list with share-server models
|
||||
:param share: share model
|
||||
:param snapshot: snapshot model
|
||||
:param share_group: ConsistencyGroup model with shares
|
||||
:param share_group: ShareGroup model with shares
|
||||
:returns: share-server or None
|
||||
"""
|
||||
# If creating in a share group, use its share server
|
||||
|
|
|
@ -341,11 +341,11 @@ class CephFSNativeDriver(driver.ShareDriver,):
|
|||
self._share_path(snapshot['share']),
|
||||
'_'.join([snapshot['snapshot_id'], snapshot['id']]))
|
||||
|
||||
def create_share_group(self, context, cg_dict, share_server=None):
|
||||
self.volume_client.create_group(cg_dict['id'])
|
||||
def create_share_group(self, context, sg_dict, share_server=None):
|
||||
self.volume_client.create_group(sg_dict['id'])
|
||||
|
||||
def delete_share_group(self, context, cg_dict, share_server=None):
|
||||
self.volume_client.destroy_group(cg_dict['id'])
|
||||
def delete_share_group(self, context, sg_dict, share_server=None):
|
||||
self.volume_client.destroy_group(sg_dict['id'])
|
||||
|
||||
def delete_share_group_snapshot(self, context, snap_dict,
|
||||
share_server=None):
|
||||
|
|
|
@ -394,21 +394,21 @@ class CephFSNativeDriverTestCase(test.TestCase):
|
|||
|
||||
def test_create_share_snapshot(self):
|
||||
self._driver.create_share_group_snapshot(self._context, {
|
||||
'share_group_id': 'cgid',
|
||||
'share_group_id': 'sgid',
|
||||
'id': 'snapid'
|
||||
})
|
||||
|
||||
(self._driver._volume_client.create_snapshot_group.
|
||||
assert_called_once_with("cgid", "snapid"))
|
||||
assert_called_once_with("sgid", "snapid"))
|
||||
|
||||
def test_delete_share_group_snapshot(self):
|
||||
self._driver.delete_share_group_snapshot(self._context, {
|
||||
'share_group_id': 'cgid',
|
||||
'share_group_id': 'sgid',
|
||||
'id': 'snapid'
|
||||
})
|
||||
|
||||
(self._driver._volume_client.destroy_snapshot_group.
|
||||
assert_called_once_with("cgid", "snapid"))
|
||||
assert_called_once_with("sgid", "snapid"))
|
||||
|
||||
def test_delete_driver(self):
|
||||
# Create share to prompt volume_client construction
|
||||
|
|
Loading…
Reference in New Issue