osmo-gsm-tester[master]: config: Fix combination of lists

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Sat Sep 9 18:31:58 UTC 2017


Patch Set 2:

> I agree with both the conclusions.
 > 
Ok. I'll implement scenarios to be applied to all resources of a given type then, as described in case A.

 > One thing that jumps at me: at the time we are combining scenarios,
 > are the 'times' entries still in there? Because this 'times' is
 > just a convenience gimmick. To work correctly, I think we need to
 > expand the 'times' things first, before combining with more
 > scenarios. There is code in some place that takes each dict having
 > a 'times: N' in there and simply replicates it to have N identical
 > dicts next to each other. If not there already, we may have to move
 > this expansion to right after parsing each scenario yaml.

Yes, right now when combine(resource.conf,scenario.conf) is called, the "times" attribute is still there and resources with times>1 haven't been duplicated yet.

As we decided to pick case A, then it really doesn't matter if we "duplicate" the resources before or after calling combine(), because the algorithm will work exactly the same way, because it applies/add the attributes to all resource object dcitionaries of that type.

I agree thought that it's clearer to duplicate them before applying, it was more difficult to find out what was going out having to wrap my head around the "times" attribute on top of it.

I will first implement it leaving duplication undone (leaving the "times" there), and once I have something working have a look whether I do it or leave it as it is. In any case i think it should go into a different patch.

-- 
To view, visit https://gerrit.osmocom.org/3722
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7a38f10eb9de338a77bf1fa3afceb9df1532015
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: No



More information about the gerrit-log mailing list