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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17466 ) Change subject: doc/manuals: Write section explaining parametrized scenarios ...................................................................... doc/manuals: Write section explaining parametrized scenarios Change-Id: I04b7fa46c2a282095bbb8f6d69ade87ff86f910c --- M doc/manuals/chapters/config.adoc 1 file changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/66/17466/1 diff --git a/doc/manuals/chapters/config.adoc b/doc/manuals/chapters/config.adoc index bb0cec2..a8bb958 100644 --- a/doc/manuals/chapters/config.adoc +++ b/doc/manuals/chapters/config.adoc @@ -387,6 +387,49 @@ my_suite:sysmo+tch_f+amr ---- +*_Parametrized scenario conf files_*: + +Furthermore, scenario '.conf' files can be parametrized. The concept is similar to that +of systemd's Template Unit Files. That is, an scenario file can be written so +that some values inside it can be passed at the time of referencing the +scenario name. The idea behind its existence is to re-use the same +scenario file for a set of attributes which are changed and that can have a lot +of different values. For instance, if a scenario is aimed at setting or +filtering some specific attribute holding an integer value, without parametrized +scenarios then a separate file would be needed for each value the user wanted to use. + +A parametrized scenario file, similar to systemd Template Unit Files, +contain the character '@' in their file name, ie follow the syntax below: +---- +scenario-name at param1,param2,param3,[...],paramN.conf +---- + +Then, its content can be written this way: +---- +$ cat $scenario_dir/my-parametrized-scenario at .conf +resources: + enb: + - type: srsenb + rf_dev_type: ${param1} +modifiers: + enb: + - num_prb: ${param2} +---- + +Finally, it can be referenced during {app-name} execution this wya, for instance when running a suite named '4g': +---- +- 4g:my-parametrized-scenario at UHD,6 +---- +This way {app-name} when parsing the scenarios and combining them with the suite will:: +. Find out it is parametrized (name contains '@'). +. Split the name + ('my-parametrized-scenario') from the parameter list (param1='UHD', param2='6') +. Attempt to match a '.conf' file fully matching name and parameters (hence + specific content can be set for specific values while still using parameters + for general values), and otherwise match only by name. +. Generate the final + scenario content from the template available in the matched '.conf' file. + [[resources_conf]] ==== 'resources.conf' -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17466 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I04b7fa46c2a282095bbb8f6d69ade87ff86f910c Gerrit-Change-Number: 17466 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200311/5144491b/attachment.htm>