Some of the functions of pyracf have a lot of functional overlap that can lead to issues, and there was very little input validation. Admin.Add functions could "alter" resource profiles that already existed and Admin.Alter functions could "add" new ones. This can lead to typos making changes to existing profiles or creating new ones that were unintentional.
:pager: Implementation Details
New error objects were created:
AddOperationError for when an add detects the profile already exists.
AlterOperationError for when alter detects the profile does not yet exist.
InvalidSegmentNameError for when an invalid/unknown segment name is specified on an extract request
InvalidSegmentTraitError for when an invalid/unknown segment-trait combination is specified on an add/alter request
Additionally, I took this opportunity to pluralize Setropts Getters/Setters that were already capable of taking multiple classes as arguments and adjusting the type hints accordingly, as well as some other small name changes and bug fixes prior to beta release.
:clipboard: Is there a test case?
Testing suite was also updated. Testing of debug logging and secrets redaction were moved to ALTER functions rather than ADD as ADD lacks the consistent structure to test successes and failures with the new input validation and error cases. Each new error case is also tested. Additional testing was added to confirm pluralized Setropts functions work as now documented and referenced.
:bulb: Issue Reference
Issue: #12
:computer: What does this address?
Some of the functions of pyracf have a lot of functional overlap that can lead to issues, and there was very little input validation. Admin.Add functions could "alter" resource profiles that already existed and Admin.Alter functions could "add" new ones. This can lead to typos making changes to existing profiles or creating new ones that were unintentional.
:pager: Implementation Details
New error objects were created:
Additionally, I took this opportunity to pluralize Setropts Getters/Setters that were already capable of taking multiple classes as arguments and adjusting the type hints accordingly, as well as some other small name changes and bug fixes prior to beta release.
:clipboard: Is there a test case?
Testing suite was also updated. Testing of debug logging and secrets redaction were moved to ALTER functions rather than ADD as ADD lacks the consistent structure to test successes and failures with the new input validation and error cases. Each new error case is also tested. Additional testing was added to confirm pluralized Setropts functions work as now documented and referenced.