Commit fec06011 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2995a8d1
...@@ -147,17 +147,6 @@ ...@@ -147,17 +147,6 @@
], ],
{%- endif %} {%- endif %}
{#- X2/Xn peers
TODO: add info about peers as shared instances - one instance per peer *ENB*.
then query SlapOS Master about cells configured on that peer ENB and
depending on whether LTE and/or NR cells are there add X2 and/or Xn peers #}
x2_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'lte')
| map(attribute='1._.x2_addr')
| list | tojson }},
xn_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'nr')
| map(attribute='1._.xn_addr')
| list | tojson }},
{#- listen-address for GTP-U - either explicitly given, or autodetect #} {#- listen-address for GTP-U - either explicitly given, or autodetect #}
{%- if slapparameter_dict.get('gtp_addr') %} {%- if slapparameter_dict.get('gtp_addr') %}
gtp_addr: "{{ slapparameter_dict.gtp_addr }}", gtp_addr: "{{ slapparameter_dict.gtp_addr }}",
...@@ -179,7 +168,7 @@ ...@@ -179,7 +168,7 @@
{%- do vip.append(_) %} {%- do vip.append(_) %}
{%- endfor %} {%- endfor %}
{%- if len(vip) > 0 and all(vip |map(attribute='islo')) %} {%- if len(vip) > 0 and all(vip |map(attribute='islo')) %}
gtp_addr: "{{ vip[0] }}", gtp_addr: "{{ vip[0].ip }}",
{%- else %} {%- else %}
{#- core is external - use external ipv4/ipv6 #} {#- core is external - use external ipv4/ipv6 #}
{%- if slapparameter_dict.use_ipv4 %} {%- if slapparameter_dict.use_ipv4 %}
...@@ -190,6 +179,17 @@ ...@@ -190,6 +179,17 @@
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{#- X2/Xn peers
TODO: add info about peers as shared instances - one instance per peer *ENB*.
then query SlapOS Master about cells configured on that peer ENB and
depending on whether LTE and/or NR cells are there add X2 and/or Xn peers #}
x2_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'lte')
| map(attribute='1._.x2_addr')
| list | tojson }},
xn_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'nr')
| map(attribute='1._.xn_addr')
| list | tojson }},
{%- if do_lte %} {%- if do_lte %}
enb_id: {{ slapparameter_dict.enb_id }}, enb_id: {{ slapparameter_dict.enb_id }},
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
en_dc_support: true, en_dc_support: true,
{%- endif %} {%- endif %}
{%- if do_lte %} {% if do_lte %}
// LTE cells // LTE cells
cell_list: [ cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %} {%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
}, },
{%- endif %} {%- endif %}
{%- if do_nr %} {% if do_nr %}
// NR cells // NR cells
nr_cell_list: [ nr_cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %} {%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
......
...@@ -34,17 +34,15 @@ ...@@ -34,17 +34,15 @@
amf_addr: "127.0.1.100", amf_addr: "127.0.1.100",
}, },
], ],
gtp_addr: "127.0.1.100",
x2_peers: ["44.1.1.1", "44.1.1.2"], x2_peers: ["44.1.1.1", "44.1.1.2"],
xn_peers: ["55.1.1.1", "55.1.1.2"], xn_peers: ["55.1.1.1", "55.1.1.2"],
gtp_addr: "127.0.1.1",
enb_id: 0x10012, enb_id: 0x10012,
gnb_id: 0x54321, gnb_id: 0x54321,
gnb_id_bits: 28, gnb_id_bits: 28,
en_dc_support: true, en_dc_support: true,
// LTE cells // LTE cells
cell_list: [ cell_list: [
...@@ -244,6 +242,7 @@ ...@@ -244,6 +242,7 @@
ho_from_meas: true, ho_from_meas: true,
}, },
// NR cells // NR cells
nr_cell_list: [ nr_cell_list: [
......
...@@ -29,6 +29,8 @@ def j2render(src, out, jcfg): ...@@ -29,6 +29,8 @@ def j2render(src, out, jcfg):
textctx += 'import nrarfcn_module nrarfcn\n' textctx += 'import nrarfcn_module nrarfcn\n'
textctx += 'import xearfcn_module xlte.earfcn\n' textctx += 'import xearfcn_module xlte.earfcn\n'
textctx += 'import xnrarfcn_module xlte.nrarfcn\n' textctx += 'import xnrarfcn_module xlte.nrarfcn\n'
textctx += 'import urllib urllib\n'
textctx += 'import netaddr netaddr\n'
buildout = None # stub buildout = None # stub
r = jinja2_template.Recipe(buildout, "recipe", { r = jinja2_template.Recipe(buildout, "recipe", {
'extensions': 'jinja2.ext.do jinja2.ext.loopcontrols', 'extensions': 'jinja2.ext.do jinja2.ext.loopcontrols',
...@@ -422,8 +424,13 @@ def do_enb(): ...@@ -422,8 +424,13 @@ def do_enb():
"slapparameter_dict": { "slapparameter_dict": {
"enb_id": "0x10012", "enb_id": "0x10012",
"gnb_id": "0x54321", "gnb_id": "0x54321",
"com_ws_port": 9001,
"com_addr": "127.0.1.2",
"mme_list": {"1": {"mme_addr": "127.0.1.100"}},
"amf_list": {"1": {"amf_addr": "127.0.1.100"}},
"plmn_list": {"1": {"plmn": "31415"}}, "plmn_list": {"1": {"plmn": "31415"}},
"plmn_list_5g": {"1": {"plmn": "51413", "tac": 123}} "plmn_list_5g": {"1": {"plmn": "51413", "tac": 123}},
"nssai": {"1": {"sst": 1}}
} }
}""" % locals() }""" % locals()
......
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