[Avocado-devel] RFC: Configuration by convention

Plamen Dimitrov pdimitrov at pevogam.com
Wed Dec 4 17:19:30 UTC 2019


Hi Cleber,

On 12/4/19 7:06 PM, Cleber Rosa wrote:
>> I would suggest simply using the a single "core" keyword here. It is explicit
>> and we always know that everything that is not "core" relates to some plugin
>> with its unique suffix (e.g. "vt" above).
>>
> That may work, but may also lead to configuration entries that are rather
> long because of the lack of specificity of the section name.  So, instead
> of:
> 
>   [sysinfo.collect]
>   enabled = True
> 
> We would have
> 
>   [core]
>   sysinfo_collect_enabled = True
> 
> I'm not arguing against it, but just making it clear.  In fact, it may
> even make things simpler wrt to the upcoming discussion on the Job
> API.
> 

This seems ok but may lead to a lot of redundant prefixes for the parameter names
like "sysinfo_option1", ... "sysinfo_optionN" while the section name is generally
meant to generalize over the specific parameters. How about

[core.sysinfo]
collect_enabled = True

instead? We could have multiple "core.x" subsections in the same fashion as above.
Does that seem feasible or there could be I problem with it I didn't foresee?

Best,
Plamen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20191204/b6df4bb0/attachment.sig>


More information about the Avocado-devel mailing list