-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update hvac error handling (Open todo) (#391)
* Clean up old import that did not raise an exception when hvac was not installed * Check HVAC error and try to gracefully shutdown * Removing traceback and editing exception message; using the original exception * adding self.hvac import to make hvac available to other modules * sanity * restore code accidentally removed in merge conflict resolution * space common code properly * write base, failure and success test for importing the error class * Remove try catch block on vault helper test since it should always succeed add test for hashivaultplugin to test exception forward to ansible * move over to the new HVAC error system for KV modules * move over to the new HVAC error system for KV modules * remove unused imports * create a dedicated function to return the exceptions from HVAC (better to mock/monitor) * Implement new HVAC error system in all non-database modules * removed a little too much, reworked the DEFAULT_MOUNT_POINT variable * return get_hvac_exceptions back to get_hvac().exceptions * implement get_hvac().exceptions to all other plugins * removed HVAC_IMPORT_ERROR from the lookup vault write and adjusted the test accordingly * removed HVAC_IMPORT_ERROR from the last few lookup functions * extended the pki test to include authentication exception * Create tests for HashiVaultModule * validate has an exception and is before authenticate so authenticate should not be triggered and could do with an empty mock * Update plugins/module_utils/_hashi_vault_module.py * Update plugins/module_utils/_hashi_vault_module.py --------- Co-authored-by: Brian Scholer <[email protected]> Co-authored-by: mathijswesterhof <[email protected]>
- Loading branch information
1 parent
cdca188
commit ff5d334
Showing
69 changed files
with
340 additions
and
1,039 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.