Enhancements to run in offline mode#9
Closed
devanshjainms wants to merge 10 commits intodevelopment-june-branchfrom
Closed
Enhancements to run in offline mode#9devanshjainms wants to merge 10 commits intodevelopment-june-branchfrom
devanshjainms wants to merge 10 commits intodevelopment-june-branchfrom
Conversation
… command line options
…le and ensure consistent os_family assignment
… logging; add utils.sh for shared functions. Update ha-config-offline.yml to change CIB file path to system_output.
… HA functional tests
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.
This pull request introduces significant updates to the SAP automation scripts, focusing on improving portability, enhancing offline mode functionality, and centralizing utility functions. Key changes include the addition of offline mode support, refactoring shared utilities into a new
utils.shfile, and improving error handling and logging.Enhancements to Offline Mode:
Added support for offline mode in
scripts/sap_automation_qa.sh, allowing tests to run using previously collected Cluster Information Base (CIB) data. This includes validation for the presence of required CIB files and adjustments to playbook selection based on offline mode. [1] [2] [3]Updated the
run_ansible_playbook()function to skip SSH authentication setup when offline mode is enabled, simplifying the command execution flow.Refactoring and Centralization of Utility Functions:
Extracted commonly used functions such as
log,command_exists, andcheck_file_existsinto a newscripts/utils.shfile for better modularity and reuse across scripts.Updated
scripts/setup.shandscripts/sap_automation_qa.shto sourceutils.shand use its centralized functions, removing redundant implementations of logging and command checks. [1] [2]Improvements to Portability and Error Handling:
Enhanced portability in
scripts/sap_automation_qa.shby using more robust methods for determining script and project directories, and providing fallback mechanisms for systems without certain commands likereadlink -f.Improved error handling in various functions, including better validation for file existence and more descriptive error messages. [1] [2]
Updates to XML Parsing in Python Module:
parse_xml_outputmethod insrc/module_utils/sap_automation_qa.pyto ensure it always returns anET.Element, enhancing type consistency and reliability.Miscellaneous Improvements:
scripts/setup.sh.These changes collectively improve the maintainability, usability, and robustness of the SAP automation scripts.