[Avocado-devel] Parameter System Overhaul

Lukáš Doktor ldoktor at redhat.com
Fri Aug 25 06:57:29 UTC 2017


Dne 24.8.2017 v 19:42 Cleber Rosa napsal(a):
> 
> 
> On 08/21/2017 08:18 AM, Lukáš Doktor wrote:
>> ...
>>>> So let me change my question:
>>>>
>>>> I've been assuming params.get() is the only params-related API we
>>>> *want* (or plan) to expose to test writers. Is that correct?
>>>>
>>>
>>> That's correct.
>>>
>>> And that's why I kept bringing back the discussion about params.iteritems().
>>>
>>
>> Actually we were asked for that function as:
>>
>> 1. some users were not happy about the clash detection and they iterate params to find the correct parameter.
>> 2. we need it in `dry-run` to list all params.
>>
> 
> But that can happen outside of the API available to test writers.  Based
> on all we have discussed so far, it's the test runner task to provide
> raw, already merged and processed, parameters to the test.  That means
> it can log both things.
> 

Well (2) can probably be solved that way, even though it'd be quite hacky as the runner would do something differently when running dry-run tests and not-dry-run tests, which looks like level violation to me. Anyway the (1) can't be really solved without the support for listing params of a certain tag.

Anyway I don't see a big problem in having this interface even for slow/remote providers. We can declare they use "lazy" evaluation and listing of params would return only params that were already queried for. Anyway first we need providers, then we can talk whether it makes sense to adjust the listing behavior...

Lukáš

> - Cleber.
> 
>> Lukáš
>>
>>>> Thanks.
>>>>    - Ademar
>>>>
>>>
>>
>>
> 


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


More information about the Avocado-devel mailing list