Commit b0c37a4a authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Start to generalize existing lopcomm/multicell into multiRU slowly

Lopcomm part of the SR already has some partial support for cell_list: if
multiple cells are defined there enb.cfg will have multiple CPRI radio units
and multiple cells configured. But so far all promises, except cpri-link, were
done only for one RU.

-> Fix that by starting to generalize RUlib code to handle multiple radio
units, invoking model-specific RU driver for each RU, and adjusting ru/lopcomm
instance code to correctly generate and activate different promises for
different radio units.

After the patch multiRU support is still very incomplete, but it is a step forward.

/cc @xavier_thompson, @Daetalus
/reviewed-by @lu.xu
/partly-reviewed-by @jhuge
/reviewed-at nexedi/slapos!1467
parent 4ba9cae1
......@@ -28,19 +28,19 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = ef4b9c9ccbb4627c0d74293802e83d57
md5sum = 09cc6f04c43ef3a00519f585716343d9
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
md5sum = 4be142fcd890e0f1c9573c8e724062fb
md5sum = c20b620111a4dc4bc2bcae57c2007cbe
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum = 7b84e582f149da52013740251a2e7ce4
md5sum = e67ccf369ccd016e38c5be42442edeae
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
md5sum = 5c5248494bcd9d27d50636ee9fab7c87
md5sum = 0450e9fa50844e4d6e51d608625c57f6
[ru_lopcomm_ncclient_common.py]
_update_hash_filename_ = ru/lopcomm/ncclient_common.py
......@@ -64,15 +64,15 @@ md5sum = 63472d5dc9bd46923d3941b5189e2ccd
[ru_lopcomm_software.jinja2.py]
_update_hash_filename_ = ru/lopcomm/software.jinja2.py
md5sum = 2cd8515253b75e2ab13cc77399762851
md5sum = f36eef13210ff519f6a6e56f081f397a
[ru_lopcomm_supervision.jinja2.py]
_update_hash_filename_ = ru/lopcomm/supervision.jinja2.py
md5sum = 243d9fbf640b8dc8bf63d69b07b8afed
md5sum = 11623b42a0b6271ba0abc8b40e7630e5
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 104d63450ec08d67bc6e82a9dacee6ae
md5sum = b93939eb4c924ca41e78cd3db0a2daf0
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
......@@ -100,7 +100,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 9e10632057d64068313267ecee999e97
md5sum = 46e326c84ed096909595d56512da0de7
[sib23.jinja2.asn]
filename = config/sib23.jinja2.asn
......
{%- set cell_list = slapparameter_dict.get('cell_list', {'default': {}}) %}
{%- set cell_count = cell_list|length %}
{%- if slapparameter_dict.get('tdd_ul_dl_config', '[Configuration 2] 5ms 2UL 6DL (default)') == '[Configuration 2] 5ms 2UL 6DL (default)' %}
......@@ -44,7 +43,7 @@
{%- endif %}
args: "dev0=
{%- for i, k in enumerate(cell_list) %}
{%- set cpri_port = cell_list[k].get('cpri_port_number', i) %}
{%- set cpri_port = cell_list[k].cpri_port_number %}
{%- if i != 0 -%}
,
{%- endif -%}
......
......@@ -345,6 +345,7 @@ url = {{ enb_template }}
{% endif %}
output = ${directory:etc}/enb.cfg
extra-context =
json cell_list {{ rulib.cell_list | tojson }}
key sib23_file sib-config:output
[publish-connection-information]
......
{#- Package ru/libinstance provides common instance code for handling Radio Units and cells.
Use buildout() macro to emit instance-level code to
handle configured RU.
handle configured RUs.
NOTE: driver-specific logic is implemented in rudrv.buildout() .
NOTE: driver-specific logic is implemented in rudrv.buildout_ru() .
#}
{#- cell_list keeps cell registry #}
{%- set cell_list = slapparameter_dict.get('cell_list', {'default': {}}) %}
{%- for i, k in enumerate(cell_list) %}
{%- set cell = cell_list[k] %}
{%- do cell.setdefault('cpri_port_number', i) %}
{%- endfor %}
{%- macro buildout() %}
{#- part emits new buildout section and registers it into buildout.parts #}
{%- set parts_list = [] %}
......@@ -31,10 +39,14 @@ config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
lopcomm=rudrv_lopcomm,
sunwave=rudrv_sunwave) %}
{#- invoke RU-specific buildout handler #}
{#- go through all RUs and for each RU invoke
RU-specific buildout handler #}
{%- set ru_type = {'lopcomm': 'lopcomm', 'm2ru': 'sunwave'}.get(ru, 'sdr') %}
{%- set rudrv = rudrv_dict[ru_type] %}
{{ rudrv.buildout() }}
{%- for cell_ref, cell in cell_list|dictsort %}
{%- set ru_ref = cell_ref if cell_ref != 'default' else 'RU' %}
{{ rudrv.buildout_ru(ru_ref, cell) }}
{%- endfor %}
[buildout]
......
......@@ -15,7 +15,7 @@ if __name__ == '__main__':
)
while True:
try:
firmware_check_file= os.path.join('{{etc_path}}','is_firmware_updated')
firmware_check_file= '{{ is_firmware_updated }}'
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
# Fetch software inventory
......
......@@ -14,7 +14,7 @@ if __name__ == '__main__':
supervision_reply_json_log_file="{{ supervision_reply_json_log_file }}"
)
try:
netconf_check_file = os.path.join('{{etc_path}}', 'is_netconf_connected')
netconf_check_file = '{{ is_netconf_connected }}'
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
supervision_subscription_rpc_xml = """
......
{#- Package ru/sdr/libinstance provides instance code for handling SDR Radio Units. #}
{%- macro buildout() %}
{%- macro buildout_ru(ru_ref, cell) %}
{#- nothing SDR-specific #}
{%- endmacro %}
{#- Package ru/sunwave/libinstance provides instance code for handling SunWave Radio Units. #}
{%- macro buildout() %}
{%- macro buildout_ru(ru_ref, cell) %}
{#- nothing SunWave-specific #}
{%- endmacro %}
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