Commit 994048e6 authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Fix slapos-render-config

a6eaad9a (software/ors-amarisoft: add network_name parameter) updated
enb.jinja2.cfg and gnb.jinja2.cfg to require slap_configuration['configuration.com_addr']
and other parameters to be present, but did not updated
slapos-render-confg, which got broken as the result:

    (py3.venv) kirr@deca:~/src/wendelin/slapos/slapos/software/ors-amarisoft$ python slapos-render-config.py
    ...
    Traceback (most recent call last):
      File "/home/kirr/src/wendelin/slapos/slapos/software/ors-amarisoft/slapos-render-config.py", line 232, in <module>
        f.write(r._render().decode())
                ^^^^^^^^^^^
      File "/home/kirr/src/wendelin/slapos/slapos/software/ors-amarisoft/slapos-render-config.py", line 206, in _render
        return template_object.render(**self.context).encode(self.encoding)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/kirr/src/wendelin/venv/py3.venv/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/home/kirr/src/wendelin/venv/py3.venv/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "config/gnb.jinja2.cfg", line 62, in top-level template code
        com_addr: "{{ slap_configuration['configuration.com_addr'] }}:{{ slap_configuration['configuration.com_ws_port'] }}",
      ^^^^^^^^^^^^^^^^^^^^^^^^^
    jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'configuration.com_addr'

-> Fix it.

/cc @xavier_thompson, @Daetalus
/reviewed-by @jhuge, @lu.xu, @tomo
/reviewed-on !1462
parent 3381f9c5
......@@ -32,7 +32,11 @@ json_params = """{
"configuration.default_nr_ssb_pos_bitmap": "10000000",
"configuration.default_n_antenna_dl": 2,
"configuration.default_n_antenna_ul": 2,
"configuration.default_nr_inactivity_timer": 10000
"configuration.default_nr_inactivity_timer": 10000,
"configuration.com_ws_port": 9001,
"configuration.com_addr": "127.0.1.2",
"configuration.amf_addr": "127.0.1.100",
"configuration.gtp_addr": "127.0.1.1"
},
"directory": {
"log": "log",
......
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