Commit 02736102 authored by Joanne Hugé's avatar Joanne Hugé

WIP: clean up code

parent c81c3611
......@@ -24,7 +24,7 @@ md5sum = f5c76c3443b75569eb18503dce38e783
[slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2
md5sum = 4302b037b337fe15951b6debfd3924d9
md5sum = a5a6d90c14b439eeff784c69f8b207af
[ru_amarisoft-stats.jinja2.py]
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py
......@@ -112,11 +112,11 @@ md5sum = 3b901e8733e6afff8940c6c318da4493
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 85557737c34e24fc8f3bb28b06d044f5
md5sum = f13db187ae877489de84b92ad9fbfb75
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
md5sum = 72019d15e2cc5d87a01874d4b35b22a7
md5sum = 25268a3f96bf4d916468775d3b1ecf07
[drb_nr.jinja2.cfg]
filename = config/drb_nr.jinja2.cfg
......@@ -128,7 +128,7 @@ md5sum = 6ffb3702e19194bc9d2b533e0f9899f0
[sib23.jinja2.asn]
filename = config/sib23.jinja2.asn
md5sum = d42f8958542e2229bebb4c5f286af92d
md5sum = 461f969691740aaf58cfdf125acc5e6b
[sib4.jinja2.asn]
filename = config/sib4.jinja2.asn
......
{%- if _standalone is defined %}
{%- do cell.setdefault('top_config', False) %}
{%- endif %}
{%- set B = xbuildout.encode -%}
// DRB configuration for LTE cell {{ B(cell_ref) }} @ {{ B(ru_ref) }}.
// DRB configuration vary in beteen FDD and TDD modes.
......
......@@ -554,7 +554,7 @@
inactivity_timer: {{ cell.inactivity_timer }},
// Handover
{{- handover_config(cell_ref) }}
{{- handover_config(cell_ref, cell.top_config) }}
// Carrier Aggregation: NR + NR
scell_list: [
......
{%- if _standalone is defined %}
{%- do cell.setdefault('top_config', False) %}
{%- endif %}
{%- set B = xbuildout.encode -%}
/* SIB2/SIB3 for {{ cell.cell_type | upper }} cell {{ B(cell_ref) }} @ {{ B(ru_ref) }}. */
{
......
......@@ -369,7 +369,7 @@
{%- do _ru_set_defaults(_) %}
{%- do iru_dict.update({ref: iru}) %}
{%- do _ru_set_top_config(ref, iru, icell_dict) %}
{%- else %}
{%- elif not ('cell_type' in _ and _.get('cell_kind') == icell_kind) %}
{%- do qother.append(ishared) %}
{%- endif %}
{%- endfor %}
......@@ -472,15 +472,15 @@
{%- endmacro %}
{%- macro _ru_set_top_config(ru_ref, ru, icell_dict) %}
{%- set earfcn = {'_': 0} %}
{%- for _, icell in icell_dict|dictsort %}
{%- if icell['_'].ru.ru_ref == ru_ref %}
{%- do earfcn.update({'_': icell['_'].dl_earfcn}) %}
{%- if icell['_'].get('top_config', False) %}
{%- for k, v in top_config[icell['_'].dl_earfcn]['ru/lopcomm'].items() %}
{%- do ru['_'].update({k: v}) %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- for k, v in top_config[earfcn['_']]['ru/lopcomm'].items() %}
{%- do ru['_'].update({k: v}) %}
{%- endfor %}
{%- endmacro %}
{#- jcell_ru_ref returns RU reference linked from a cell.
......
......@@ -496,7 +496,6 @@ def _do_enb_with(iru_icell_func):
"etc": "etc",
"var": "var"
},
"top_config": "False",
"slapparameter_dict": {
"enb_id": "0x1A2D0",
"gnb_id": "0x12345",
......@@ -519,7 +518,6 @@ def _do_enb_with(iru_icell_func):
icell_dict = {}
ipeer_dict = {}
ipeercell_dict = {}
top_config = False
for ishared in ienb.shared_instance_list:
ref = ref_of_shared(ishared)
_ = json.loads(ishared['_'])
......@@ -553,7 +551,6 @@ def _do_enb_with(iru_icell_func):
'cell': cell,
'ru_ref': ru_ref,
'ru': ru,
'top_config': top_config,
})
j2render('drb_%s.jinja2.cfg' % cell['cell_type'],
'%s/%s-drb.cfg' % (out, B(cell_ref)),
......@@ -563,23 +560,6 @@ def _do_enb_with(iru_icell_func):
'%s/%s-sib23.asn' % (out, B(cell_ref)),
jctx)
if top_config:
j2render('sib4.jinja2.asn',
'%s/%s-sib4.asn' % (out, B(cell_ref)),
jctx)
j2render('sib5.jinja2.asn',
'%s/%s-sib5.asn' % (out, B(cell_ref)),
jctx)
j2render('sib6.jinja2.asn',
'%s/%s-sib6.asn' % (out, B(cell_ref)),
jctx)
j2render('sib7.jinja2.asn',
'%s/%s-sib7.asn' % (out, B(cell_ref)),
jctx)
# ---- UE ----
......
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