feat(purefa_pgsnap): Add restore=all to restore all volumes from pgroup snapshot#994
Draft
sdodsley wants to merge 2 commits into
Draft
feat(purefa_pgsnap): Add restore=all to restore all volumes from pgroup snapshot#994sdodsley wants to merge 2 commits into
sdodsley wants to merge 2 commits into
Conversation
…up snapshot - Add new restore_pgsnapshot_all() function that uses post_protection_groups() to restore all member volumes at once instead of iterating individually - When restore=all and target is a new (non-existent) protection group, overwrite=False is allowed (creates new PG with copies) - When restore=all and target exists, overwrite=True is required - Target parameter can specify a different protection group name - If target not specified, defaults to the source protection group name - add_to_pgs and with_default_protection are not supported with restore=all Closes #993
e417838 to
630d2c2
Compare
630d2c2 to
26a1cd9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new feature to the
purefa_pgsnapmodule that allows restoring all member volumes from a protection group snapshot at once usingrestore: all.Closes #993
Changes
New Feature:
restore=allWhen
restoreis set toall, the module usespost_protection_groups()to restore all member volumes at once instead of iterating through each volume individually. This is more efficient and maintains consistency.Behavior
restore=all+targetis new PGoverwrite=Falseallowed - creates new PG with copies of all volumesrestore=all+targetnot specifiedoverwrite=Truerequiredrestore=all+targetis existing PGoverwrite=TruerequiredRestrictions
add_to_pgsis not supported withrestore=allwith_default_protection=Falseis not supported withrestore=allExamples
Testing
New Tests Added
test_restore_all_to_new_pgroup- Restore all volumes to a new protection grouptest_restore_all_overwrite_existing- Restore all volumes overwriting existing protection grouptest_restore_all_existing_without_overwrite_fails- Fails when target exists and overwrite=Falsetest_restore_all_with_latest_suffix- Handles 'latest' suffix resolutiontest_restore_all_check_mode- Check mode doesn't make API callstest_restore_all_older_api_version- Works with older API versionstest_main_restore_all_calls_restore_pgsnapshot_all- main() calls correct functiontest_main_restore_all_fails_with_add_to_pgs- Validation fails with add_to_pgstest_main_restore_all_fails_with_default_protection_false- Validation fails with with_default_protection=Falsetest_main_restore_all_target_not_defaulted_to_all- Target not incorrectly set to 'all'Pull Request opened by Augment Code with guidance from the PR author