Commit 1a6b9fcd authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Jérome Perrin

software/ors-amarisoft: Fix enb.cfg build in standalone mode (mme_addr)

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
parent 76092aa2
...@@ -77,6 +77,7 @@ def do(cfg, slapparameter_dict): ...@@ -77,6 +77,7 @@ def do(cfg, slapparameter_dict):
"configuration.com_ws_port": 9001, "configuration.com_ws_port": 9001,
"configuration.com_addr": "127.0.1.2", "configuration.com_addr": "127.0.1.2",
"configuration.amf_addr": "127.0.1.100", "configuration.amf_addr": "127.0.1.100",
"configuration.mme_addr": "127.0.1.100",
"configuration.gtp_addr": "127.0.1.1" "configuration.gtp_addr": "127.0.1.1"
}, },
"directory": { "directory": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment