[Netapp] Fix soft_delete_snapshot get children case

In soft delete snapshot, after rename, we retrieve snapshot children,
but instead of renamed snapshot we were looking for earlier named
snapshot. Fixed this.

Closes-bug: #2025641
Change-Id: I0577153fe8b2abf1aa521b61754788f2666a3e0f
This commit is contained in:
Kiran Pawar 2024-06-05 09:59:11 +00:00
parent 0999857c47
commit 62ad3537c3
2 changed files with 2 additions and 2 deletions

View File

@ -3524,7 +3524,7 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
# Snapshots are locked by clone(s), so split the clone(s) # Snapshots are locked by clone(s), so split the clone(s)
snapshot_children = self.get_clone_children_for_snapshot( snapshot_children = self.get_clone_children_for_snapshot(
volume_name, snapshot_name) volume_name, DELETED_PREFIX + snapshot_name)
for snapshot_child in snapshot_children: for snapshot_child in snapshot_children:
self.volume_clone_split_start(snapshot_child['name']) self.volume_clone_split_start(snapshot_child['name'])

View File

@ -5130,7 +5130,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
fake.SHARE_NAME, fake.SNAPSHOT_NAME, fake.SHARE_NAME, fake.SNAPSHOT_NAME,
'deleted_manila_' + fake.SNAPSHOT_NAME) 'deleted_manila_' + fake.SNAPSHOT_NAME)
mock_get_clone_children_for_snapshot.assert_called_once_with( mock_get_clone_children_for_snapshot.assert_called_once_with(
fake.SHARE_NAME, fake.SNAPSHOT_NAME) fake.SHARE_NAME, 'deleted_manila_' + fake.SNAPSHOT_NAME)
mock_volume_clone_split_start.assert_has_calls([ mock_volume_clone_split_start.assert_has_calls([
mock.call(fake.CDOT_CLONE_CHILD_1), mock.call(fake.CDOT_CLONE_CHILD_1),
mock.call(fake.CDOT_CLONE_CHILD_2), mock.call(fake.CDOT_CLONE_CHILD_2),