[Avocado-devel] RFC: Configuration by convention

Beraldo Leal bleal at redhat.com
Wed Dec 4 17:18:34 UTC 2019


On Wed, Dec 04, 2019 at 12:06:17PM -0500, Cleber Rosa wrote:
> On Wed, Dec 04, 2019 at 03:52:40PM +0200, Plamen Dimitrov wrote:
> > On 12/3/19 9:15 PM, Cleber Rosa wrote:
> 
> 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.

Or:

-----
[core]
....
[core.sysinfo]
collect_enabled = True
-----

Not sure yet, just giving more options.

Thinking on the future API, everything related to core could be in the
same "namespace" but in a different section:

settings = {'core': {'foo': 'bar',
                     'sysinfo': {'collect_enabled': True}
		    }
           }

--
Beraldo





More information about the Avocado-devel mailing list