Commit 921175fa authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 99688182
......@@ -153,11 +153,11 @@
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: {{ slapparameter_dict.get('x2_peers', {}) | dictsort
| map(attribute='1.x2_addr')
x2_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'lte')
| map(attribute='1._.x2_addr')
| list | tojson }},
xn_peers: {{ slapparameter_dict.get('xn_peers', {}) | dictsort
| map(attribute='1.xn_addr')
xn_peers: {{ ipeer_dict|dictsort | selectattr('1._.peer_type', '==', 'nr')
| map(attribute='1._.xn_addr')
| list | tojson }},
{% if slapparameter_dict.get('mme_list', '') or slapparameter_dict.get('amf_list', '') %}
......
......@@ -74,7 +74,7 @@
// Inter-ENB HO
{
rat: "eutra",
cell_id: 0x12345, // -> PEER1
cell_id: 0x12345, // -> PEERCELL1
n_id_cell: 35,
dl_earfcn: 700,
tac: 123,
......@@ -83,7 +83,7 @@
},
{
rat: "nr",
nr_cell_id: 0x77712, // -> PEER2
nr_cell_id: 0x77712, // -> PEERCELL2
gnb_id_bits: 22,
n_id_cell: 75,
dl_nr_arfcn: 520000,
......@@ -280,7 +280,7 @@
// Inter-ENB HO
{
rat: "eutra",
cell_id: 0x12345, // -> PEER1
cell_id: 0x12345, // -> PEERCELL1
n_id_cell: 35,
dl_earfcn: 700,
tac: 123,
......@@ -289,7 +289,7 @@
},
{
rat: "nr",
nr_cell_id: 0x77712, // -> PEER2
nr_cell_id: 0x77712, // -> PEERCELL2
gnb_id_bits: 22,
n_id_cell: 75,
dl_nr_arfcn: 520000,
......
......@@ -317,6 +317,28 @@
{%- endmacro %}
{#- load_ipeer initializes peer registry.
ipeer_dict keeps peer shared instances: reference -> ipeer
#}
{%- macro load_ipeer(ipeer_dict) %}
{%- set qother = [] %}
{%- for ishared in qshared_instance_list %}
{%- set ref = J(jref_of_shared(ishared)) %}
{%- set _ = ishared['_'] %}
{%- if 'peer_type' in _ %}
{%- set ipeer = ishared %}
{%- do assert(_.peer_type in ('lte', 'nr')) %}
{%- do ipeer_dict.update({ref: ipeer}) %}
{%- else %}
{%- do qother.append(ishared) %}
{%- endif %}
{%- endfor %}
{%- do qshared_instance_list.clear() %}
{%- do qshared_instance_list.extend(qother) %}
{%- endmacro %}
{#- load_ipeercell initializes peer-cell registry.
ipeercell_dict keeps peer cell shared instances: reference -> ipeercell
......
......@@ -349,9 +349,28 @@ def do_enb():
#iRU1_SDR1_fLTE2(ienb)
#iRU2_LOPCOMM_fLTE2(ienb)
# add 4 peer nodes
if 1:
ienb.ishared('PEER11', {
'peer_type': 'lte',
'x2_addr': '44.1.1.1',
})
ienb.ishared('PEER12', {
'peer_type': 'lte',
'x2_addr': '44.1.1.2',
})
ienb.ishared('PEER21', {
'peer_type': 'nr',
'xn_addr': '55.1.1.1',
})
ienb.ishared('PEER22', {
'peer_type': 'nr',
'xn_addr': '55.1.1.2',
})
# add 2 peer cells
if 1:
ienb.ishared('PEER1', {
ienb.ishared('PEERCELL1', {
'cell_type': 'lte',
'cell_kind': 'enb_peer',
'e_cell_id': '0x12345',
......@@ -360,7 +379,7 @@ def do_enb():
'bandwidth': '10 MHz',
'tac': 123,
})
ienb.ishared('PEER2', {
ienb.ishared('PEERCELL2', {
'cell_type': 'nr',
'cell_kind': 'enb_peer',
'nr_cell_id': '0x77712',
......@@ -389,10 +408,7 @@ def do_enb():
"etc": "etc",
"var": "var"
},
"slapparameter_dict": {
"x2_peers": {"1": {"x2_addr": "44.1.1.1"}, "2": {"x2_addr": "44.1.1.2"}},
"xn_peers": {"1": {"xn_addr": "55.1.1.1"}, "2": {"xn_addr": "55.1.1.2"}}
}
"slapparameter_dict": {}
}""" % locals()
j2render('enb.jinja2.cfg', 'enb.cfg', json_params)
......@@ -400,6 +416,7 @@ def do_enb():
# drb.cfg + sib.asn for all cells
iru_dict = {}
icell_dict = {}
ipeer_dict = {}
ipeercell_dict = {}
for ishared in ienb.shared_instance_list:
ref = ref_of_shared(ishared)
......@@ -410,6 +427,8 @@ def do_enb():
elif 'cell_type' in _ and _.get('cell_kind') in {'enb', 'enb_peer'}:
idict = {'enb': icell_dict, 'enb_peer': ipeercell_dict} [_['cell_kind']]
idict[ref] = ishared
elif 'peer_type' in _:
ipeer_dict[ref] = ishared
else:
raise AssertionError('enb: unknown shared instance %r' % (ishared,))
......
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