Commit 4097a1bb authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Start to organize Radio Unit related bits under ru/

Bring more structure to RU-specific code as a preparatory step for multiRU support:

- move RU-specific files under ru/<RU-type>/ . This mostly moves Lopcomm programs and configuration files there.
- move RU-specific instance code there as well. This also mostly moves Lopcomm specific services and promises there.
- bring more structure in naming. As buildout has global namespace use ru_<RU-type>_ prefix to avoid collision in names.

This should be a preparatory patch with practically no semantic change, but
preparing ground for further multiRU landing.

/cc @xavier_thompson, @Daetalus
/reviewed-by @jhuge, @lu.xu
/reviewed-on nexedi/slapos!1466
parent 465fc24d
Pipeline #30960 failed with stage
in 0 seconds
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = f23909a703ac9001afec38cbac19591a
md5sum = 1e3d2626ffd677ab6d3c078a376c1c7c
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
......@@ -26,37 +26,53 @@ md5sum = c4d5e9fcf460d88bc2b4bcfbdfe554f7
_update_hash_filename_ = amarisoft-rf-info.jinja2.py
md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ncclient_common]
_update_hash_filename_ = ncclient_common.py
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = ef4b9c9ccbb4627c0d74293802e83d57
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
md5sum = 4be142fcd890e0f1c9573c8e724062fb
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum = 7b84e582f149da52013740251a2e7ce4
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
md5sum = 5c5248494bcd9d27d50636ee9fab7c87
[ru_lopcomm_ncclient_common.py]
_update_hash_filename_ = ru/lopcomm/ncclient_common.py
md5sum = 6f8d0592cc4b0b695cea5a0c25aafc4e
[lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
[ru_lopcomm_stats.jinja2.py]
_update_hash_filename_ = ru/lopcomm/stats.jinja2.py
md5sum = b861ef43beba4a0a2904e8c2aee04723
[lopcomm-rrh-config.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-config.jinja2.py
[ru_lopcomm_config.jinja2.py]
_update_hash_filename_ = ru/lopcomm/config.jinja2.py
md5sum = f2f550b68c8ab243ce1a4bb73a9abc1c
[lopcomm-rrh-software.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-software.jinja2.py
md5sum = 2cd8515253b75e2ab13cc77399762851
[lopcomm-rrh-supervision.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-supervision.jinja2.py
md5sum = 243d9fbf640b8dc8bf63d69b07b8afed
[lopcomm-rrh-reset-info.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-reset-info.jinja2.py
[ru_lopcomm_reset-info.jinja2.py]
_update_hash_filename_ = ru/lopcomm/reset-info.jinja2.py
md5sum = e03d7fea24566aa8291f0dc4aaf09c67
[lopcomm-rrh-reset.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-reset.jinja2.py
[ru_lopcomm_reset.jinja2.py]
_update_hash_filename_ = ru/lopcomm/reset.jinja2.py
md5sum = 63472d5dc9bd46923d3941b5189e2ccd
[ru_lopcomm_software.jinja2.py]
_update_hash_filename_ = ru/lopcomm/software.jinja2.py
md5sum = 2cd8515253b75e2ab13cc77399762851
[ru_lopcomm_supervision.jinja2.py]
_update_hash_filename_ = ru/lopcomm/supervision.jinja2.py
md5sum = 243d9fbf640b8dc8bf63d69b07b8afed
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 40f735514d8f4ead0d4328c58b78be93
md5sum = e90ee40dbfdd8639cf21849502975e55
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
......@@ -114,12 +130,12 @@ md5sum = c0313f9d15543361f7c8e19af96c737a
filename = config/ue-nr.jinja2.cfg
md5sum = 824233ab4d53ec428d358fb67bca8ba2
[CreateProcessingEle.jinja2.xml]
filename = netconf/CreateProcessingEle.jinja2.xml
[ru_lopcomm_CreateProcessingEle.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/CreateProcessingEle.jinja2.xml
md5sum = e435990eb0a0d4be41efa9bd16dce09b
[cu_config.jinja2.xml]
filename = netconf/cu_config.jinja2.xml
[ru_lopcomm_cu_config.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/cu_config.jinja2.xml
md5sum = d10b063ad4edc760e154f7a8d63bea47
[software.cfg.html]
......
......@@ -10,30 +10,9 @@ parts =
amarisoft-stats-service
amarisoft-rf-info-service
{% if ru == "lopcomm" %}
lopcomm-firmware-dl
lopcomm-rrh-stats-service
lopcomm-rrh-supervision-service
lopcomm-rrh-reset-info-service
{% if slapparameter_dict.get("cron_schedule", None) %}
lopcomm-rrh-reset-cron
{% endif %}
lopcomm-rrh-config-template
lopcomm-rrh-software-template
netconf-connection-promise
firmware-update-promise
rrh-netconf-socket-promise
lopcomm-cu-config
sshd-service
sshd-add-authorized-key
sshd-promise
check-lopcomm-vswr.py
check-lopcomm-pa-current.py
check-lopcomm-pa-output-power.py
check-lopcomm-lof.py
check-lopcomm-rssi.py
check-lopcomm-sync.py
check-lopcomm-config-log.py
check-lopcomm-stats-log.py
{% endif %}
{% if slapparameter_dict.get("dnsmasq", None) %}
dnsmasq-service
......@@ -46,7 +25,6 @@ parts =
{% endif %}
monitor-base
publish-connection-information
{% set extra_part_list = [] %}
extends = {{ monitor_template }}
......@@ -54,6 +32,10 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{%- import 'ru_libinstance.jinja2.cfg' as rulib with context %}
{{ rulib.buildout() }}
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
......@@ -107,15 +89,6 @@ version = {{ slapparameter_dict.get("enb_config_version") }}
offline = false
{% endif %}
{% if slapparameter_dict.get("cu_config_link", None) %}
[cu-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("cu_config_link") }}
version = {{ slapparameter_dict.get("cu_config_version") }}
offline = false
{% endif %}
[enb-sh-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
......@@ -261,162 +234,6 @@ mode = 0775
url = {{ amarisoft_rf_info_template }}
output = ${directory:bin}/amarisoft-rf-info.py
[lopcomm-rrh-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-stats.log
json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
cfg-json-log-output = ${directory:var}/log/lopcomm-rrh-config.json.log
supervision-json-log-output = ${directory:var}/log/lopcomm-rrh-supervision.json.log
ncsession-json-log-output = ${directory:var}/log/lopcomm-rrh-ncsession.json.log
software-json-log-output = ${directory:var}/log/lopcomm-rrh-software.json.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key json_log_file :json-log-output
key cfg_json_log_file :cfg-json-log-output
key supervision_json_log_file :supervision-json-log-output
key ncsession_json_log_file :ncsession-json-log-output
key software_json_log_file :software-json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_stats_template }}
output = ${directory:bin}/lopcomm-rrh-stats.py
[lopcomm-cu-config]
<= config-base
{% if slapparameter_dict.get("cu_config_link", None) %}
url = ${enb-config-dl:target}
{% else %}
url = {{ cu_config_template }}
{% endif %}
output = ${directory:etc}/cu_config.xml
[lopcomm-rrh-config-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-config.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw CreateProcessingEle_template {{ CreateProcessingEle_template }}
key cu_config_template lopcomm-cu-config:output
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_config_template }}
output = ${directory:script}/lopcomm-rrh-config.py
[lopcomm-rrh-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-software.log
software-reply-json-log-output = ${directory:var}/log/lopcomm-rrh-software-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}${lopcomm-firmware-dl:destination}
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw etc_path ${directory:etc}
raw firmware_name ${lopcomm-firmware-dl:filename}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_software_template }}
output = ${directory:script}/lopcomm-rrh-software.py
[lopcomm-rrh-supervision-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-supervision.log
supervision-reply-json-log-output = ${directory:var}/log/lopcomm-rrh-supervision-reply.json.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key supervision_reply_json_log_file :supervision-reply-json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw etc_path ${directory:etc}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_supervision_template }}
output = ${directory:bin}/lopcomm-rrh-supervision.py
[lopcomm-rrh-reset-info-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-reset-info.log
json-log-output = ${directory:var}/log/lopcomm-rrh-reset-info.json.log
context =
section slap_configuration slap-configuration
key log_file :log-output
key json_log_file :json-log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_reset_info_template }}
output = ${directory:bin}/lopcomm-rrh-reset-info.py
[lopcomm-rrh-reset-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-reset.log
json-log-output = ${directory:var}/log/lopcomm-rrh-reset.json.log
context =
section slap_configuration slap-configuration
key log_file :log-output
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_reset_template }}
output = ${directory:etc}/lopcomm-rrh-reset.py
[lopcomm-rrh-reset-cron]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = rrh-resest
frequency = {{ slapparameter_dict.get("cron_schedule", "") }}
command = {{ buildout_directory}}/bin/pythonwitheggs ${lopcomm-rrh-reset-template:output}
[netconf-connection-promise]
<= monitor-promise-base
promise = check_command_execute
name = netconf-connection-promise.py
config-command = [ -f ${directory:etc}/is_netconf_connected ]
[firmware-update-promise]
<= monitor-promise-base
promise = check_command_execute
name = firmware-update-promise.py
config-command = [ -f ${directory:etc}/is_firmware_updated ]
[rrh-netconf-socket-promise]
<= monitor-promise-base
promise = check_socket_listening
name = rrh-netconf-socket-promise.py
config-host = ${slap-configuration:tap-ipv6-gateway}
config-port = 830
[amarisoft-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${amarisoft-stats-template:output}
......@@ -433,38 +250,6 @@ mode = 0775
hash-files =
${amarisoft-rf-info-template:output}
[lopcomm-rrh-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-stats-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-stats
mode = 0775
hash-files =
${lopcomm-rrh-stats-template:output}
[lopcomm-rrh-supervision-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-supervision-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-supervision
mode = 0775
hash-files =
${lopcomm-rrh-supervision-template:output}
[lopcomm-rrh-reset-info-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-reset-info-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-reset-info
mode = 0775
hash-files =
${lopcomm-rrh-reset-info-template:output}
[lopcomm-firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
filename = PR.PRM61C70V1004.006.tar.gz
md5sum = 5139019aae77c2f3178a99915f1c57dc
destination = ${directory:etc}/${:filename}
offline = false
[user-info]
recipe = slapos.cookbook:userinfo
......@@ -584,7 +369,7 @@ monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
{% if ru == "lopcomm" %}
ssh-command = ssh ${user-info:pw-name}@${slap-configuration:ipv6-random} -p ${sshd-port:port}
ssh-url = ssh://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}
ru-firmware = ${lopcomm-firmware-dl:filename}
ru-firmware = {{ru_lopcomm_firmware_filename}}
ru-ipv6 = ${slap-configuration:tap-ipv6-gateway}
{% endif %}
......@@ -623,79 +408,6 @@ output = ${directory:plugins}/check-amarisoft-stats-log.py
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-amarisoft-stats-log = ${amarisoft-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-vswr.py]
<= macro.promise
promise = check_lopcomm_vswr
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-rssi.py]
<= macro.promise
promise = check_lopcomm_rssi
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-pa-current.py]
<= macro.promise
promise = check_lopcomm_pa_current
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-pa-output-power.py]
<= macro.promise
promise = check_lopcomm_pa_output_power
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-sync.py]
<= macro.promise
promise = check_lopcomm_sync
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-lof.py]
<= macro.promise
promise = check_lopcomm_lof
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-stats-log.py]
<= macro.promise
promise = check_lopcomm_stats_log
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-stats-log = ${lopcomm-rrh-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-config-log.py]
<= macro.promise
promise = check_lopcomm_config_log
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-config-log = ${lopcomm-rrh-config-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
{% if ru == "lopcomm" %}
{%- set cell_list = slapparameter_dict.get('cell_list', {'default': {}}) %}
{%- for i, k in enumerate(cell_list) %}
{%- set sfp_port = cell_list[k].get('cpri_port_number', i) %}
{%- do extra_part_list.append('SFP%s-cpri-lock.py' % sfp_port) %}
[SFP{{sfp_port}}-cpri-lock.py]
<= macro.promise
promise = check_cpri_lock
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-sdr_dev = {{ slapparameter_dict.get('sdr_number', 0) }}
config-sfp_port = {{ sfp_port }}
config-amarisoft-rf-info-log = ${amarisoft-rf-info-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
{%- endfor %}
{% endif %}
[check-rx-saturated.py]
<= macro.promise
promise = check_rx_saturated
......@@ -704,9 +416,3 @@ config-rf-rx-chan-list = {{ list(range(0, int(slapparameter_dict.get('n_antenna_
config-amarisoft-stats-log = ${amarisoft-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
config-max-rx-sample-db = {{ slapparameter_dict.get("max_rx_sample_db", 0) }}
[buildout]
parts +=
{%- for part in extra_part_list %}
{{ part }}
{%- endfor %}
......@@ -38,6 +38,12 @@ context =
raw bbu ${rf-mode:bbu}
raw ru ${rf-mode:ru}
$${:extra-context}
import-list =
rawfile ru_libinstance.jinja2.cfg ${ru_libinstance.jinja2.cfg:target}
rawfile ru_sdr_libinstance.jinja2.cfg ${ru_sdr_libinstance.jinja2.cfg:target}
rawfile ru_lopcomm_libinstance.jinja2.cfg ${ru_lopcomm_libinstance.jinja2.cfg:target}
rawfile ru_sunwave_libinstance.jinja2.cfg ${ru_sunwave_libinstance.jinja2.cfg:target}
[amarisoft]
recipe = slapos.recipe.build
......@@ -270,14 +276,16 @@ extra-context =
raw sib23_template ${sib23.jinja2.asn:target}
raw amarisoft_stats_template ${amarisoft-stats.jinja2.py:target}
raw amarisoft_rf_info_template ${amarisoft-rf-info.jinja2.py:target}
raw lopcomm_rrh_stats_template ${lopcomm-rrh-stats.jinja2.py:target}
raw lopcomm_rrh_config_template ${lopcomm-rrh-config.jinja2.py:target}
raw lopcomm_rrh_software_template ${lopcomm-rrh-software.jinja2.py:target}
raw lopcomm_rrh_supervision_template ${lopcomm-rrh-supervision.jinja2.py:target}
raw lopcomm_rrh_reset_info_template ${lopcomm-rrh-reset-info.jinja2.py:target}
raw lopcomm_rrh_reset_template ${lopcomm-rrh-reset.jinja2.py:target}
raw CreateProcessingEle_template ${CreateProcessingEle.jinja2.xml:target}
raw cu_config_template ${cu_config.jinja2.xml:target}
raw ru_lopcomm_stats_template ${ru_lopcomm_stats.jinja2.py:target}
raw ru_lopcomm_config_template ${ru_lopcomm_config.jinja2.py:target}
raw ru_lopcomm_software_template ${ru_lopcomm_software.jinja2.py:target}
raw ru_lopcomm_supervision_template ${ru_lopcomm_supervision.jinja2.py:target}
raw ru_lopcomm_reset_info_template ${ru_lopcomm_reset-info.jinja2.py:target}
raw ru_lopcomm_reset_template ${ru_lopcomm_reset.jinja2.py:target}
raw ru_lopcomm_CreateProcessingEle_template ${ru_lopcomm_CreateProcessingEle.jinja2.xml:target}
raw ru_lopcomm_cu_config_template ${ru_lopcomm_cu_config.jinja2.xml:target}
raw ru_lopcomm_firmware_path ${ru_lopcomm_firmware-dl:target}
raw ru_lopcomm_firmware_filename ${ru_lopcomm_firmware-dl:filename}
raw openssl_location ${openssl:location}
raw default_lte_bandwidth ${default-params:default-lte-bandwidth}
raw default_lte_inactivity_timer ${default-params:default-lte-inactivity-timer}
......
# ru/buildout.cfg provides common software code for handling Radio Units.
[buildout]
extends =
sdr/buildout.cfg
lopcomm/buildout.cfg
sunwave/buildout.cfg
[ru_libinstance.jinja2.cfg]
<= download-base
{#- 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.
NOTE: driver-specific logic is implemented in rudrv.buildout() .
#}
{%- macro buildout() %}
{#- part emits new buildout section and registers it into buildout.parts #}
{%- set parts_list = [] %}
{%- macro part(name) %}
{%- do parts_list.append(name) %}
[{{ name }}]
{%- endmacro %}
{#- promise emits new buildout section for a promise #}
{%- macro promise(name) %}
{{ part('promise-'+name) }}
<= monitor-promise-base
name = {{ name }}.py
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
{%- endmacro %}
{#- import RU drivers #}
{%- import 'ru_sdr_libinstance.jinja2.cfg' as rudrv_sdr with context %}
{%- import 'ru_lopcomm_libinstance.jinja2.cfg' as rudrv_lopcomm with context %}
{%- import 'ru_sunwave_libinstance.jinja2.cfg' as rudrv_sunwave with context %}
{%- set rudrv_dict = namespace(sdr=rudrv_sdr,
lopcomm=rudrv_lopcomm,
sunwave=rudrv_sunwave) %}
{#- invoke RU-specific buildout handler #}
{%- set ru_type = {'lopcomm': 'lopcomm', 'm2ru': 'sunwave'}.get(ru, 'sdr') %}
{%- set rudrv = rudrv_dict[ru_type] %}
{{ rudrv.buildout() }}
[buildout]
parts +=
{%- for part in parts_list %}
{{ part }}
{%- endfor %}
{%- endmacro %}
# ru/lopcomm/buildout.cfg provides software code for handling Lopcomm ORAN Radio Units.
[buildout]
parts +=
ru_lopcomm_ncclient_common.py
[ru_lopcomm_libinstance.jinja2.cfg]
<= download-base
[ru_lopcomm_config.jinja2.py]
<= download-base
[ru_lopcomm_reset-info.jinja2.py]
<= download-base
[ru_lopcomm_reset.jinja2.py]
<= download-base
[ru_lopcomm_stats.jinja2.py]
<= download-base
[ru_lopcomm_software.jinja2.py]
<= download-base
[ru_lopcomm_supervision.jinja2.py]
<= download-base
[ru_lopcomm_ncclient_common.py]
<= download-base
destination = ${buildout:directory}/ncclient_common.py
[ru_lopcomm_CreateProcessingEle.jinja2.xml]
<= download-base
[ru_lopcomm_cu_config.jinja2.xml]
<= download-base
[ru_lopcomm_firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
filename = PR.PRM61C70V1004.006.tar.gz
md5sum = 5139019aae77c2f3178a99915f1c57dc
{#- Package ru/lopcomm/libinstance provides instance code for handling Lopcomm ORAN Radio Units. #}
{%- macro buildout() %}
{#- indicate whether RU is listening for netconf #}
{{ promise('lopcomm-rrh-netconf-socket') }}
promise = check_socket_listening
config-host = ${slap-configuration:tap-ipv6-gateway}
config-port = 830
{#- monitor state of netconf connection + keep on touching RU watchdog #}
[lopcomm-rrh-supervision-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-supervision.log
supervision-reply-json-log-output = ${directory:var}/log/lopcomm-rrh-supervision-reply.json.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key supervision_reply_json_log_file :supervision-reply-json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw etc_path ${directory:etc}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_supervision_template }}
output = ${directory:bin}/lopcomm-rrh-supervision.py
[lopcomm-rrh-supervision-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-supervision-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-supervision
mode = 0775
hash-files =
${lopcomm-rrh-supervision-template:output}
{{ promise('lopcomm-rrh-netconf-connection') }}
promise = check_command_execute
config-command = [ -f ${directory:etc}/is_netconf_connected ]
{#- push firmware to RU #}
[lopcomm-rrh-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-software.log
software-reply-json-log-output = ${directory:var}/log/lopcomm-rrh-software-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}{{ru_lopcomm_firmware_path}}
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw etc_path ${directory:etc}
raw firmware_name {{ru_lopcomm_firmware_filename}}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_software_template }}
output = ${directory:script}/lopcomm-rrh-software.py
{{ promise('lopcomm-firmware') }}
promise = check_command_execute
config-command = [ -f ${directory:etc}/is_firmware_updated ]
{#- push config to RU #}
{% if slapparameter_dict.get("cu_config_link", None) %}
[cu-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("cu_config_link") }}
version = {{ slapparameter_dict.get("cu_config_version") }}
offline = false
{% endif %}
[lopcomm-cu-config]
<= config-base
{% if slapparameter_dict.get("cu_config_link", None) %}
url = ${cu-config-dl:target}
{% else %}
url = {{ ru_lopcomm_cu_config_template }}
{% endif %}
output = ${directory:etc}/cu_config.xml
[lopcomm-rrh-config-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-config.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw CreateProcessingEle_template {{ ru_lopcomm_CreateProcessingEle_template }}
key cu_config_template lopcomm-cu-config:output
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_config_template }}
output = ${directory:script}/lopcomm-rrh-config.py
{{ promise('lopcomm-config-log') }}
promise = check_lopcomm_config_log
config-config-log = ${lopcomm-rrh-config-template:log-output}
{#- handle notifications from RU #}
[lopcomm-rrh-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-stats.log
json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
cfg-json-log-output = ${directory:var}/log/lopcomm-rrh-config.json.log
supervision-json-log-output = ${directory:var}/log/lopcomm-rrh-supervision.json.log
ncsession-json-log-output = ${directory:var}/log/lopcomm-rrh-ncsession.json.log
software-json-log-output = ${directory:var}/log/lopcomm-rrh-software.json.log
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key json_log_file :json-log-output
key cfg_json_log_file :cfg-json-log-output
key supervision_json_log_file :supervision-json-log-output
key ncsession_json_log_file :ncsession-json-log-output
key software_json_log_file :software-json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_stats_template }}
output = ${directory:bin}/lopcomm-rrh-stats.py
[lopcomm-rrh-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-stats-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-stats
mode = 0775
hash-files =
${lopcomm-rrh-stats-template:output}
{{ promise('lopcomm-vswr') }}
promise = check_lopcomm_vswr
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-rssi') }}
promise = check_lopcomm_rssi
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-pa-current') }}
promise = check_lopcomm_pa_current
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-pa-output-power') }}
promise = check_lopcomm_pa_output_power
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-sync') }}
promise = check_lopcomm_sync
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-lof') }}
promise = check_lopcomm_lof
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
{{ promise('lopcomm-stats-log') }}
promise = check_lopcomm_stats_log
config-stats-log = ${lopcomm-rrh-stats-template:log-output}
{%- set cell_list = slapparameter_dict.get('cell_list', {'default': {}}) %}
{%- for i, k in enumerate(cell_list) %}
{%- set sfp_port = cell_list[k].get('cpri_port_number', i) %}
{{ promise('SFP%d-cpri-lock' % sfp_port) }}
promise = check_cpri_lock
config-sdr_dev = {{ slapparameter_dict.get('sdr_number', 0) }}
config-sfp_port = {{ sfp_port }}
config-amarisoft-rf-info-log = ${amarisoft-rf-info-template:log-output}
{%- endfor %}
{#- reset RU periodically #}
{%- if slapparameter_dict.get("cron_schedule") %}
[lopcomm-rrh-reset-info-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-reset-info.log
json-log-output = ${directory:var}/log/lopcomm-rrh-reset-info.json.log
context =
section slap_configuration slap-configuration
key log_file :log-output
key json_log_file :json-log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_reset_info_template }}
output = ${directory:bin}/lopcomm-rrh-reset-info.py
[lopcomm-rrh-reset-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-reset.log
json-log-output = ${directory:var}/log/lopcomm-rrh-reset.json.log
context =
section slap_configuration slap-configuration
key log_file :log-output
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_reset_template }}
output = ${directory:etc}/lopcomm-rrh-reset.py
{{ part('lopcomm-reset-cron') }}
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = rrh-resest
frequency = {{ slapparameter_dict.get("cron_schedule", "") }}
command = {{ buildout_directory}}/bin/pythonwitheggs ${lopcomm-rrh-reset-template:output}
{{ part('lopcomm-reset-info-service') }}
recipe = slapos.cookbook:wrapper
command-line = ${lopcomm-rrh-reset-info-template:output}
wrapper-path = ${directory:service}/lopcomm-rrh-reset-info
mode = 0775
hash-files =
${lopcomm-rrh-reset-info-template:output}
{%- endif %}
{%- endmacro %}
# ru/sdr/buildout.cfg provides software code for handling SDR Radio Units.
[ru_sdr_libinstance.jinja2.cfg]
<= download-base
{#- Package ru/sdr/libinstance provides instance code for handling SDR Radio Units. #}
{%- macro buildout() %}
{#- nothing SDR-specific #}
{%- endmacro %}
# ru/sunwave/buildout.cfg provides software code for handling SunWave Radio Units.
[ru_sunwave_libinstance.jinja2.cfg]
<= download-base
{#- Package ru/sunwave/libinstance provides instance code for handling SunWave Radio Units. #}
{%- macro buildout() %}
{#- nothing SunWave-specific #}
{%- endmacro %}
......@@ -15,11 +15,11 @@ extends =
../../component/dnsmasq/buildout.cfg
../../component/fluent-bit/buildout.cfg
../../component/openssh/buildout.cfg
ru/buildout.cfg
parts +=
template
slapos-cookbook
ncclient_common
# copy all configs by default
mme.jinja2.cfg
dnsmasq.jinja2.cfg
......@@ -29,8 +29,6 @@ parts +=
ue_db.jinja2.cfg
ue-lte.jinja2.cfg
ue-nr.jinja2.cfg
CreateProcessingEle.jinja2.xml
cu_config.jinja2.xml
sib23.jinja2.asn
monitor-httpd-extra-conf
# copy all gadget file
......@@ -57,34 +55,12 @@ output = ${buildout:directory}/template.cfg
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[ncclient_common]
<= download-base
destination = ${buildout:directory}/ncclient_common.py
[amarisoft-stats.jinja2.py]
<= download-base
[amarisoft-rf-info.jinja2.py]
<= download-base
[lopcomm-rrh-stats.jinja2.py]
<= download-base
[lopcomm-rrh-config.jinja2.py]
<= download-base
[lopcomm-rrh-software.jinja2.py]
<= download-base
[lopcomm-rrh-supervision.jinja2.py]
<= download-base
[lopcomm-rrh-reset-info.jinja2.py]
<= download-base
[lopcomm-rrh-reset.jinja2.py]
<= download-base
[template-enb]
<= download-base
......@@ -111,10 +87,6 @@ url = ${:_profile_base_location_}/${:_buildout_section_name_}
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/config/${:_buildout_section_name_}
[copy-netconf-to-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/netconf/${:_buildout_section_name_}
[gadget]
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}/renderjs.js
......@@ -167,13 +139,6 @@ filename = ue-lte.jinja2.cfg
<= copy-config-to-instance
filename = ue-nr.jinja2.cfg
[CreateProcessingEle.jinja2.xml]
<= copy-netconf-to-instance
filename = CreateProcessingEle.jinja2.xml
[cu_config.jinja2.xml]
<= copy-netconf-to-instance
filename = cu_config.jinja2.xml
# Download gadget files
[software.cfg.html]
<= copy-gadget-to-software
......
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