• Kirill Smelkov's avatar
    software/ors-amarisoft: enb.jinja2.cfg: Switch ru to be a namespace to hold Radio Unit parameters · 6404f810
    Kirill Smelkov authored
    In the next patch we will switch usage of C Preprocessor to Jinja2, and in jinja2 doing set from under if, as e.g. in
    
        {%- if ru == 'm2ru' %}
        {%-   set n_antenna_ul = 1  %}
        {%- endif %}
    
    does _not_ have the effect of setting n_antenna_ul=1 outside of the if block.
    
    That, however, can be worked around with usage of namespace objects, so the following works as intended:
    
        {%- set x = namespace() %}
        {%- if ru == 'm2ru' %}
        {%-   set x.n_antenna_ul = 1  %}
        {%- endif %}
    
    with x.n_antenna_ul=1 if ru was m2ru.
    
    So taking into account this, and that in MultiRU ru will be denoting
    RadioUnit-related configuration, let's switch ru to be a namespace object with
    ru.ru_type denoting type of attached radio unit.
    
    This both goes as a preparatory step for MultiRU and also allows to switch from
    CPP to Jinja2 in the next patch.
    
    /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus
    /reviewed-by @jhuge
    /reviewed-on nexedi/slapos!1520
    6404f810
enb.jinja2.cfg 27.1 KB