Closed cletomartin closed 1 year ago
Nice idea. We have some custom decorators that call fetchers/checks repeatedly with different configurations. Having a generic way to achieve this in the documentation would be great 👍
Made #146 as an example. This is getting some members of 2 orgs in GitHub. I have realised that the example would be much great if we could use @parameterized_class
so we could even generate a report per organisation, which would be great.
I believe it is possible to provide support for it but we would need to accept wildcards like demo.CheckClass*
in controls.json
because parameterized
modify the name of the class at runtime.
Overview
There are many examples where a user needs to pull data from a service in which they have multiple accounts. For example, the list nodes across multiple accounts of a service provider. This is the typical use case and it would be great that one could write one single fetcher as a template method and there will be multiple executions of this fetcher but with different parameters.
Requirements
Approach
I think we can use
parameterized
library for this. For exampleThis generates an output like this:
Still to decide if there is an improvement for this or this is good enough. I have been thinking on a
@store_param_raw_evidence
decorator but it really gets complicated at that point.Test Plan
TBD