feat: CPLYTM-455 populate cac control status to implementation #432
+201
−107
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.
Description
Populate the cac control status to OSCAL component definition implementation status
Type of change
How has this been tested?
Tested locally
How to test it locally:
poetry run trestlebot sync-cac-content --repo-path ~/trestle-repo --branch main --cac-content-root ~/content --cac-profile ~/content/products/ocp4/profiles/high-rev-4.profile --oscal-profile nist_rev5_800_53 --committer-email huiwang@redhat.com --committer-name huiwang --product ocp4 --dry-run --component-definition-type software
Added the unit test case to cover it
I only chose one scenario from group [1] and group [2] of the following mappings.
Why I haven't tested all the mappings:
One, the test data, profile, catalog and cac control file are shared with other cases. E.g., if the include-controls in profile are updated, the catalog and the related previous cases also need to be updated.
Two, that's according to the the test method, Equivalence Partitioning Sampling.
The mappings are as follows:
[1]OscalStatus.IMPLEMENTED: [INHERENTLY_MET, DOCUMENTATION, AUTOMATED, SUPPORTED]
[2]OscalStatus.ALTERNATIVE: [DOES_NOT_MEET, MANUAL, PLANNED]
[3]OscalStatus.PARTIAL: [PARTIAL]
[4]OscalStatus.NOT_APPLICABLE: [NOT_APPLICABLE]
[5]OscalStatus.PLANNED: [PLANNED]
Test Configuration:
Checklist