Closed jantman closed 3 years ago
Merging #59 (073983a) into master (52847cd) will increase coverage by
2.67%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 57.98% 60.65% +2.67%
==========================================
Files 8 9 +1
Lines 1397 1492 +95
Branches 264 294 +30
==========================================
+ Hits 810 905 +95
Misses 586 586
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
manheim_c7n_tools/notifyonly.py | 100.00% <100.00%> (ø) |
|
manheim_c7n_tools/policygen.py | 99.76% <100.00%> (+<0.01%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 52847cd...073983a. Read the comment docs.
Description
This PR implements
notify_only
support for policies, which can also be used indefaults.yml
to put an entire account into notify-only mode. This is controlled by anotify_only
boolean top-level policy key, which policygen then handles and strips out when generating the final custodian YAML files.The current functionality of notify-only is as follows:
comment
/comments
/description
fields will be prefixed with the stringNOTIFY ONLY:
tags
list, anotify-only
tag will be appended to it.-notify-only
appended to their tag names, to automate the above-described transition. Specifically:mark
ortag
actions in the actions list will have the string-notify-only
appended to theirtag
orkey
values (if present) or appended to every item in theirtags
list (if present). If none of the above are present, thetag
item will be set to custodian'sDEFAULT_TAG
value, with-notify-only
appended.mark-for-op
actions will have the string-notify-only
appended to theirtag
value. If they do not already have atag
value, it will be set to custodian'sDEFAULT_TAG
value, with-notify-only
appended.remove-tag
/unmark
/untag
actions wukk have the string-notify-only
appended to all items in theirtags
list.notify
actions will have theirviolation_desc
, if present, prefixed withNOTIFY ONLY:
. Theiraction_desc
, if present, will be prefixed within the future (currently notify-only)
.Testing Done