Commit f2888c7c authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: ru: Factor RU-cpri-lock promise to be generic

This promise applies to any CPRI-based Radio Unit not only to Lopcomm RU.

-> Move its code to generic part, so that the promise is generated for any CPRI-based RU.

/cc @xavier_thompson, @Daetalus
/reviewed-by @jhuge, @lu.xu
/reviewed-on nexedi/slapos!1485
parent 72512286
......@@ -32,7 +32,7 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = 113b59a3bfdee0f75f168493e93831d9
md5sum = 5706b618cb26b3541bd9f5571d61db89
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
......@@ -40,7 +40,7 @@ md5sum = c20b620111a4dc4bc2bcae57c2007cbe
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum = a150743e78f9ecafc40b715f2aa80295
md5sum = 07f31bac7a4cbcc808060802d82fe7cc
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
......
......@@ -145,12 +145,23 @@ hash-files =
{%- endif %}
{#- go through all RUs and for each RU invoke
{#- go through all RUs and for each RU emit generic promises and invoke
RU-specific buildout handler #}
{%- set ru_type = {'lopcomm': 'lopcomm', 'm2ru': 'sunwave'}.get(ru, 'sdr') %}
{%- set rudrv = rudrv_dict[ru_type] %}
{%- for cell_ref, cell in cell_list|dictsort %}
{%- set ru_ref = cell_ref if cell_ref != 'default' else 'RU' %}
# {{ ru_ref }} ({{ ru_type}})
{%- if trx == 'cpri' %}
{{ promise('%s-cpri-lock' % ru_ref) }}
promise = check_cpri_lock
config-sdr_dev = {{ slapparameter_dict.get('sdr_number', 0) }}
config-sfp_port = {{ cell.cpri_port_number }}
config-amarisoft-rf-info-log = ${amarisoft-rf-info-template:log-output}
{%- endif %}
{#- driver-specific part #}
{{ rudrv.buildout_ru(ru_ref, cell) }}
{%- endfor %}
......
......@@ -157,12 +157,6 @@ config-netconf-log = ${ {{- ru_ref}}-stats-template:json-log-output}
promise = check_lopcomm_stats_log
config-stats-log = ${ {{- ru_ref}}-stats-template:log-output}
{{ promise('%s-cpri-lock' % ru_ref) }}
promise = check_cpri_lock
config-sdr_dev = {{ slapparameter_dict.get('sdr_number', 0) }}
config-sfp_port = {{ cell.cpri_port_number }}
config-amarisoft-rf-info-log = ${amarisoft-rf-info-template:log-output}
{#- reset RU periodically #}
......
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