[Avocado-devel] RFC: Configuration by convention

Plamen Dimitrov pdimitrov at pevogam.com
Wed Dec 4 21:42:52 UTC 2019


Hi Cleber,

On 12/4/19 7:31 PM, Cleber Rosa wrote:
> On Wed, Dec 04, 2019 at 07:19:30PM +0200, Plamen Dimitrov wrote:
>> 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
>>
> Yep, the common "core" prefix, with dots separating additional levels
> seems like good idea.  The only limitation for plugins would be that
> one could never be called "core", which should be fine! :D

Exactly! +2 because ambitious plugins can still call themselves "mantle"
and worry about colliding just among themselves.

Let's see if we can gather more opinions about the overall RFC then with people
that know and use other types of settings on their own part.

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/0d3930d4/attachment.sig>


More information about the Avocado-devel mailing list