• Kirill Smelkov's avatar
    software/ors-amarisoft: Fix enb.cfg build in standalone mode (mme_addr) · 421ad29b
    Kirill Smelkov authored
    After cell_list problem was fixed in the previous patch, now building enb.cfg
    in standalone mode fails on mme_addr:
    
        slapuser35@vifibcloud-rapidspace-hosting-018:~/srv/project/slapos/software/ors-amarisoft$ ./pythonwitheggs slapos-render-config.py
        Traceback (most recent call last):
          File "/srv/slapgrid/slappart35/srv/project/slapos/software/ors-amarisoft/./pythonwitheggs", line 47, in <module>
            exec(compile(__file__f.read(), __file__, "exec"))
          File "slapos-render-config.py", line 92, in <module>
            do('enb', {"tdd_ul_dl_config": "[Configuration 6] 5ms 5UL 3DL (maximum uplink)"})
          File "slapos-render-config.py", line 90, in do
            j2render(cfg, json_params % locals())
          File "slapos-render-config.py", line 38, in j2render
            f.write(r._render().decode())
          File "/srv/slapgrid/slappart35/srv/runner/software/0b402c7d1e7c38a4324c836766690bb6/eggs/slapos.recipe.template-5.1-py3.9.egg/slapos/recipe/template/jinja2_template.py", line 215, in _render
            return template_object.render(**self.context).encode(self.encoding)
          File "/srv/slapgrid/slappart35/srv/runner/software/0b402c7d1e7c38a4324c836766690bb6/eggs/Jinja2-2.11.3-py3.9.egg/jinja2/environment.py", line 1090, in render
            self.environment.handle_exception()
          File "/srv/slapgrid/slappart35/srv/runner/software/0b402c7d1e7c38a4324c836766690bb6/eggs/Jinja2-2.11.3-py3.9.egg/jinja2/environment.py", line 832, in handle_exception
            reraise(*rewrite_traceback_stack(source=source))
          File "/srv/slapgrid/slappart35/srv/runner/software/0b402c7d1e7c38a4324c836766690bb6/eggs/Jinja2-2.11.3-py3.9.egg/jinja2/_compat.py", line 28, in reraise
            raise value.with_traceback(tb)
          File "config/enb.jinja2.cfg", line 139, in top-level template code
            mme_addr: "{{ slap_configuration['configuration.mme_addr'] }}",
        jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'configuration.mme_addr'
    
    -> Fix it by providing both mme_addr in addition to amf_addr.
    
    Now both enb.cfg and gnb.cfg render in standalone mode well.
    
    /cc @jhuge, @lu.xu, @xavier_thompson, @Daetalus
    421ad29b
slapos-render-config.py 3.31 KB