glusterfs_native: prefix GlusterFS snap names with "manila-"
Due to change I40873208c7431e42885bee4db06d6229a202bad6, we are free to change snapshot naming on the GlusterFS side, as long as the Manila snap id occurs in it. This is part of an effort to provide better indication to the GlusterFS admin about the origin of Manila created entities. Partially implements bp manila-prefix-for-gluster-entities Change-Id: Ie15e89cd49ab8450921ab08c78eb382096b57266
This commit is contained in:
parent
39b92fd9eb
commit
6fe26c5c15
|
@ -613,7 +613,7 @@ class GlusterfsNativeShareDriver(driver.ExecuteMixin, driver.ShareDriver):
|
|||
operrstr = self.gluster_nosnap_vols_dict[vol]
|
||||
else:
|
||||
gluster_mgr = self.gluster_used_vols_dict[vol]
|
||||
args = ('--xml', 'snapshot', 'create', snapshot['id'],
|
||||
args = ('--xml', 'snapshot', 'create', 'manila-' + snapshot['id'],
|
||||
gluster_mgr.volume)
|
||||
try:
|
||||
out, err = gluster_mgr.gluster_call(*args)
|
||||
|
|
|
@ -779,7 +779,7 @@ class GlusterfsNativeShareDriverTestCase(test.TestCase):
|
|||
'share': self.share1
|
||||
}
|
||||
|
||||
args = ('--xml', 'snapshot', 'create', 'fake_snap_id',
|
||||
args = ('--xml', 'snapshot', 'create', 'manila-fake_snap_id',
|
||||
gmgr1.volume)
|
||||
self.mock_object(gmgr1, 'gluster_call',
|
||||
mock.Mock(side_effect=GlusterXMLOut(ret=0, errno=0)))
|
||||
|
@ -801,7 +801,7 @@ class GlusterfsNativeShareDriverTestCase(test.TestCase):
|
|||
'share': self.share1
|
||||
}
|
||||
|
||||
args = ('--xml', 'snapshot', 'create', 'fake_snap_id',
|
||||
args = ('--xml', 'snapshot', 'create', 'manila-fake_snap_id',
|
||||
gmgr1.volume)
|
||||
self.mock_object(gmgr1, 'gluster_call',
|
||||
mock.Mock(side_effect=GlusterXMLOut(ret=-1, errno=2)))
|
||||
|
@ -829,7 +829,7 @@ class GlusterfsNativeShareDriverTestCase(test.TestCase):
|
|||
'share': self.share1
|
||||
}
|
||||
|
||||
args = ('--xml', 'snapshot', 'create', 'fake_snap_id',
|
||||
args = ('--xml', 'snapshot', 'create', 'manila-fake_snap_id',
|
||||
gmgr1.volume)
|
||||
self.mock_object(gmgr1, 'gluster_call',
|
||||
mock.Mock(side_effect=GlusterXMLOut(ret=-1, errno=0)))
|
||||
|
|
Loading…
Reference in New Issue