feat: add inline docstrings and refactor large functions for readability#26
Open
feat: add inline docstrings and refactor large functions for readability#26
Conversation
…helpers
- Add docstrings to every function across all 8 Python scripts
- Extract phases from large main() functions into named helpers:
* snapmirror_provision_dest_managed: _preflight_source, _setup_peering,
_ensure_dest_volume, _create_sm_relationship, _convergence_and_report
* snapmirror_provision_src_managed: same phase helpers
* snapmirror_test_failover: _select_target_volume, _preflight_and_get_rel,
_get_latest_sm_snapshot, _create_test_clone, _verify_and_tag_clone
* snapmirror_cleanup_test_failover: _find_relationship, _find_tagged_clone,
_remove_smas_and_restore_online, _unmount_clone, _offline_clone
* cifs_provision: _ensure_cifs_server, _ensure_volume_ntfs, _get_svm_uuid,
_ensure_cifs_share, _set_share_acl, _verify_and_log_acls
* nfs_provision: _ensure_volume, _ensure_export_policy, _ensure_client_rule,
_assign_export_policy
* cluster_setup_basic: _build_cluster_body extracted from create_cluster
- All main() functions now <=40 lines (were up to 232 lines)
|
Test Report missing or unfilled. This PR touches This is a soft gate - your CI checks are unaffected - but reviewers will not approve until the report is filled in. |
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.
Python scripts were growing hard to navigate — functions had no description and the core logic was buried in 100–232 line [main()] blocks
Fixed by: