Commit 76ced981 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f2b44b58
......@@ -110,8 +110,7 @@
iru_dict keeps RU shared instances + RU whose definition is embedded into a cell: reference -> iRU
in the kept instances _ is automatically json-decoded
use load_iru_and_icell(kind) to initialize this cell and RU registries.
icell_kind=enb - load cells definition to serve them
icell_kind=enb - load cells definition to serve them from enb
icell_kind=ue - load cells definition to connect to them
XXX defaults ?
......@@ -213,12 +212,11 @@
{%- endmacro %}
{#- ipeer_cell_dict keeps peer cell shared instances: reference -> ipeer_cell
{#- load_ipeercell initializes peer-cell registry.
use load_ipeer to initialize this peer registry.
ipeercell_dict keeps peer cell shared instances: reference -> ipeercell
#}
{%- set ipeer_cell_dict = {} %}
{%- macro load_ipeer_cell() %}
{%- macro load_ipeercell(ipeercell_dict) %}
// XXX TODO
{%- endmacro %}
......
// XXX -> amari ?{
{
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "log/enb.log",
......
......@@ -2,15 +2,26 @@
{#- XXX icell vs cell / iru vs ru everyhere + document it #}
{#- XXX TDD check #}
{%- import 'amari_lte.jinja2' as lte with context %}
{%- from 'amari_slap.jinja2' import J, jref_of_shared, jcell_ru_ref, cfg with context %}
{%- import 'amari_lte.jinja2' as lte with context %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- set J = slaplte.J %}
{%- set jref_of_shared = slaplte.jref_of_shared %}
{%- set jcell_ru_ref = slaplte.jcell_ru_ref %}
{%- set cfg = slaplte.cfg %}
{#- for standalone testing via slapos-render-config.py
NOTE: keep in sync with instance-enb.jinja2.cfg and ru/libinstance.jinja2.cfg #}
{%- if _standalone is defined %}
{%- set iru_dict = {} %}
{%- set icell_dict = {} %}
{%- set ipeercell_dict = {} %}
{%- do slaplte.load_iru_and_icell(iru_dict, icell_dict, icell_kind='enb') %}
{%- do slaplte.load_ipeercell(ipeercell_dict) %}
{%- do slaplte.check_loaded_everything() %}
{%- endif %}
{#- XXX kill: instance does this #}
{#- {%- do lte.load_iru_and_icell(kind='enb') %} #}
{#- {%- do lte.load_ipeer_cell() %} #}
{#- {%- do lte.check_loaded_everything() %} #}
{#- start of the config -#}
{
......@@ -84,11 +95,11 @@
// LTE cells
cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'lte' %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'lte' %}
{%- set ru_ref = J(jcell_ru_ref(icell, icell_dict)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
// {{ cell_ref }}
{
......@@ -345,11 +356,11 @@
{#
nr_cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'nr' %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'nr' %}
{%- set ru_ref = J(jcell_ru_ref(icell, icell_dict)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
// {{ cell_ref }}
{
......
......@@ -61,7 +61,8 @@ offline = true
{%- set icell_kind='enb' %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- import 'ru_libinstance.jinja2.cfg' as rulib with context %}
{%- do slaplte.load_ipeer_cell() %}
{%- set ipeercell_dict = {} %}
{%- do slaplte.load_ipeercell() %}
{%- do slaplte.check_loaded_everything() %}
......
{#- XXX need to be already loaded {%- import 'amari_slap.jinja2' as lte with context %} #}
{#- icell_kind should be set from outside XXX #}
{%- set icell_dict = {} %}
{%- set iru_dict = {} %}
{%- set icell_dict = {} %}
{%- do slaplte.load_iru_and_icell(iru_dict, icell_dict, icell_kind) %}
......@@ -12,6 +12,8 @@ import json, copy, sys, pprint
# j2render renders config/<config>.jinja2.cfg into config/<config>.cfg with provided json parameters.
def j2render(config, jcfg):
ctx = json.loads(jcfg)
assert '_standalone' not in ctx
ctx['_standalone'] = True
textctx = ''
for k, v in ctx.items():
textctx += 'json %s %s\n' % (k, json.dumps(v))
......
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