Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot module fix for add SDC changes flag #73

Merged
merged 3 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions plugins/modules/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ def perform_module_operation(self):
cap_unit,
desired_retention,
retention_unit)
if changed:
snapshot_details = self.get_snapshot(snapshot_name)

if is_modified:
changed = self.modify_val(size, cap_unit, desired_retention,
Expand Down Expand Up @@ -1068,7 +1070,7 @@ def sdc_state_mapped(self, sdc, snapshot_details):
changed_mode = False
changed_limits = False

_changed, access_mode_list, limits_list = \
map_changed, access_mode_list, limits_list = \
self.map_snapshot_to_sdc(snapshot_details, sdc)

if len(access_mode_list) > 0:
Expand All @@ -1084,7 +1086,7 @@ def sdc_state_mapped(self, sdc, snapshot_details):
"iops_limit": temp['iops_limit']
}
changed_limits = self.modify_limits(payload)
return changed_mode or changed_limits
return changed_mode or changed_limits or map_changed

def modify_val(self, size, cap_unit, desired_retention, retention_unit,
snapshot_details, snap_access_mode, flag1, flag2, flag3):
Expand Down
Loading