Commit a6d7a2d3 authored by Jérome Perrin's avatar Jérome Perrin

Update Release Candidate

parents 807af8d5 cbc3929c
......@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = bb4206b61aeba8ce8f848c3bec64e934
md5sum = 06b0acece285ecbc0e746fa267a374b6
[template-default]
filename = instance-default.cfg.jinja.in
......
......@@ -35,6 +35,6 @@ default-parameters =
"node-quantity": 1,
"test-suite-master-url": "",
"instance-dict": "",
"software-path-list": ["https://lab.nexedi.com/nexedi/slapos/raw/1.0.333/software/seleniumrunner/software.cfg"],
"software-path-list": ["https://lab.nexedi.com/nexedi/slapos/raw/1.0.345/software/seleniumrunner/software.cfg"],
"keep-log-days": 15
}
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 1e3d2626ffd677ab6d3c078a376c1c7c
md5sum = e2e286ba8d40790da3da462d55276e29
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
......@@ -28,19 +28,19 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = ef4b9c9ccbb4627c0d74293802e83d57
md5sum = 91ef336b7e913c07d89b82b27ffad11d
[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 = 02a7a12b933544b4287599afed0fc68d
[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
......@@ -48,39 +48,47 @@ md5sum = 6f8d0592cc4b0b695cea5a0c25aafc4e
[ru_lopcomm_stats.jinja2.py]
_update_hash_filename_ = ru/lopcomm/stats.jinja2.py
md5sum = b861ef43beba4a0a2904e8c2aee04723
md5sum = 3a5a3c5588e1698ee81e983bb08e70d7
[ru_lopcomm_config.jinja2.py]
_update_hash_filename_ = ru/lopcomm/config.jinja2.py
md5sum = f2f550b68c8ab243ce1a4bb73a9abc1c
md5sum = 167537a6aa2762355ee703d4c96351ea
[ru_lopcomm_reset-info.jinja2.py]
_update_hash_filename_ = ru/lopcomm/reset-info.jinja2.py
md5sum = e03d7fea24566aa8291f0dc4aaf09c67
md5sum = 3d78df1993211efaabd3dc6f2ec8de30
[ru_lopcomm_reset.jinja2.py]
_update_hash_filename_ = ru/lopcomm/reset.jinja2.py
md5sum = 63472d5dc9bd46923d3941b5189e2ccd
md5sum = 9741fbc99aaf768e9cc3ab48925dfee5
[ru_lopcomm_software.jinja2.py]
_update_hash_filename_ = ru/lopcomm/software.jinja2.py
md5sum = 2cd8515253b75e2ab13cc77399762851
md5sum = 2b08bb666c5f3ab287cdddbfdb4c9249
[ru_lopcomm_supervision.jinja2.py]
_update_hash_filename_ = ru/lopcomm/supervision.jinja2.py
md5sum = 243d9fbf640b8dc8bf63d69b07b8afed
md5sum = 437cc45f132d6c74647a716c6a1920e1
[ru_tapsplit]
_update_hash_filename_ = ru/tapsplit
md5sum = 2b8b57c5771b2a2203c0e7767e629e55
[ru_capdo.c]
_update_hash_filename_ = ru/capdo.c
md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 104d63450ec08d67bc6e82a9dacee6ae
md5sum = 815d57a36c7e3b4361230fbd3c76a9ef
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = a64a0d06740f97cd82eeec0932f61004
md5sum = e8e87a50b861d733894eb69e1aefa683
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = aa7fcf7f68ced7e880158d0aa3307be4
md5sum = c807be73b9304f5a4c7483a3776bbc17
[template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
......@@ -100,7 +108,15 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 9e10632057d64068313267ecee999e97
md5sum = 8e49dfc9318da43bd817b8891cba24b7
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
md5sum = 6c8bdb0ce1d2bdd846a87aa6c5204a9c
[drb_nr.jinja2.cfg]
filename = config/drb_nr.jinja2.cfg
md5sum = 84d3cef8fc7f1c2aed7c348d500f5636
[sib23.jinja2.asn]
filename = config/sib23.jinja2.asn
......@@ -108,15 +124,19 @@ md5sum = a1973ba6e43d40e510d61d461c2d13ac
[gnb.jinja2.cfg]
filename = config/gnb.jinja2.cfg
md5sum = 003bf8098175415c975a10c102df6b8c
md5sum = a4f91c1c9cfd91d000f4845a88cdb38a
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
md5sum = 3d7833ddba3242cedcd74c7db52390c6
[dnsmasq.jinja2.cfg]
filename = config/dnsmasq.jinja2.cfg
md5sum = ecf6081d1fc76a60ba57f042446bc161
[dnsmasq-core-network.jinja2.cfg]
filename = config/dnsmasq-core-network.jinja2.cfg
md5sum = f167b4be5e327b276b42267e0678f577
[dnsmasq-enb.jinja2.cfg]
filename = config/dnsmasq-enb.jinja2.cfg
md5sum = 03e2e642d86b5c21181c7dba874cc08c
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
......
{% if ru == "lopcomm" %}
dhcp-leasefile={{ directory['etc'] }}/dnsmasq.leases
port=5354
dhcp-range=::1,::1,constructor:{{ slap_configuration.get('tap-name', '') }},ra-names,64,5m
dhcp-host={{ slapparameter_dict.get('rrh_mac_addr', '00:0a:00:00:10:20') }},[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}]
dhcp-option=option6:dns-server,[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) + 1 }}],[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) + 2 }}]
dhcp-option=option6:domain-search,bbu.local
# option 17 used for RU callhome
# dhcp-option=option6:17,[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-addr', '')) }}]
log-queries
log-dhcp
log-facility={{ directory['home'] }}/var/log/dnsmasq.log
enable-ra
ra-param=adv-send-advert
ra-param=adv-managed-flag
ra-param=adv-other-config-flag
ra-param=adv-autonomous
{% else %}
interface={{ slap_configuration.get('tun-name', '') }}
port=5353
{%- set filtered_slave_instance_list = [] %}
......@@ -33,4 +15,3 @@ port=5353
{% for i, slave in enumerate(filtered_slave_instance_list) -%}
address=/{{ slave['subdomain'] }}.{{ slap_configuration['configuration'].get('local_domain', '') }}/{{ slave.get('ip', '') }}
{% endfor -%}
{% endif %}
{% if ru == "lopcomm" %}
dhcp-leasefile={{ directory['etc'] }}/dnsmasq.leases
port=5354
{%- for (cell_ref, cell) in cell_list|dictsort | selectattr('1._tap', 'defined') %}
{%- set ru_tap = cell._tap %}
{%- set vtap = json_module.loads(vtap_jdict[ru_tap]) %}
{%- set plen = netaddr.IPNetwork(vtap.network).prefixlen %}
# {{ cell_ref }} @ {{ ru_tap }}
dhcp-range=tag:{{ ru_tap }},{{ vtap.gateway }},{{ vtap.gateway }},static,{{ plen }},5m
dhcp-host={{ cell.ru_mac_addr }},tag:{{ ru_tap }},[{{ vtap.gateway }}]
# option 17 used for RU callhome
# dhcp-option=option6:17,[{{ vtap.addr }}]
{%- endfor %}
log-queries
log-dhcp
log-facility={{ directory['home'] }}/var/log/dnsmasq.log
enable-ra
ra-param=adv-send-advert
ra-param=adv-managed-flag
ra-param=adv-other-config-flag
ra-param=adv-autonomous
{% endif %}
This diff is collapsed.
// DRB configuration for NR cell.
[
{
qci: 1,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 12,
pdcp_SN_SizeDL: 12,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 6,
},
dl_um: {
sn_FieldLength: 6,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 1,
},
},
{
qci: 2,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 150,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 8,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 1,
},
},
{
qci: 3,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 2,
},
},
{
qci: 4,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 9,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 3,
},
},
{
qci: 65,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 12,
pdcp_SN_SizeDL: 12,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 6,
},
dl_um: {
sn_FieldLength: 6,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 5,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 66,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 150,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 67,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 6,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
{
qci: 5,
use_for_mr_dc_scg: false,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 6,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 6,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 10,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
{
qci: 7,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 11,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 6,
},
},
{
qci: 8,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 12,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 7,
},
},
{
qci: 9,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 13,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 7,
},
},
{
qci: 69,
use_for_mr_dc_scg: false,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 4,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 70,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 11,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
]
......@@ -583,412 +583,7 @@
cipher_algo_pref: [],
integ_algo_pref: [2, 1],
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_nr_inactivity_timer']) }},
drb_config: [
{
qci: 1,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 12,
pdcp_SN_SizeDL: 12,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 6,
},
dl_um: {
sn_FieldLength: 6,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 1,
},
},
{
qci: 2,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 150,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 8,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 1,
},
},
{
qci: 3,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 2,
},
},
{
qci: 4,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 9,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 3,
},
},
{
qci: 65,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 12,
pdcp_SN_SizeDL: 12,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 6,
},
dl_um: {
sn_FieldLength: 6,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 5,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 66,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 150,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 7,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 67,
use_for_mr_dc_scg: false,
ims_dedicated_bearer: true,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 6,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
{
qci: 5,
use_for_mr_dc_scg: false,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 6,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 6,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 10,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
{
qci: 7,
pdcp_config: {
discardTimer: 100,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: false,
outOfOrderDelivery: false,
t_Reordering: 0,
},
rlc_config: {
ul_um: {
sn_FieldLength: 12,
},
dl_um: {
sn_FieldLength: 12,
t_Reassembly: 50,
},
},
logical_channel_config: {
priority: 11,
prioritisedBitRate: 0,
bucketSizeDuration: 100,
logicalChannelGroup: 6,
},
},
{
qci: 8,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 12,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 7,
},
},
{
qci: 9,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 13,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 7,
},
},
{
qci: 69,
use_for_mr_dc_scg: false,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 4,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 4,
},
},
{
qci: 70,
pdcp_config: {
discardTimer: 0,
pdcp_SN_SizeUL: 18,
pdcp_SN_SizeDL: 18,
statusReportRequired: true,
outOfOrderDelivery: false,
},
rlc_config: {
ul_am: {
sn_FieldLength: 18,
t_PollRetransmit: 80,
pollPDU: 64,
pollByte: 125,
maxRetxThreshold: 4,
},
dl_am: {
sn_FieldLength: 18,
t_Reassembly: 80,
t_StatusProhibit: 10,
},
},
logical_channel_config: {
priority: 11,
prioritisedBitRate: 8,
bucketSizeDuration: 100,
logicalChannelGroup: 5,
},
},
],
drb_config: "{{ drb_file }}",
meas_config_desc: {
a1_report_type: "rsrp",
......
......@@ -203,15 +203,28 @@ url = {{ mme_template }}
output = ${directory:etc}/mme.cfg
{% if slapparameter_dict.get("local_domain", '') %}
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = {{dnsmasq_template}}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = ${directory:etc}/${:filename}
context =
import json_module json
import netaddr netaddr
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
[dnsmasq-service]
recipe = slapos.cookbook:wrapper
port = 5353
ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file={{ dnsmasq_config_path }} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file=${dnsmasq-config:output} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
{{ dnsmasq_config_path }}
${dnsmasq-config:output}
#[dnsmasq-listen-promise]
#<= monitor-promise-base
......
......@@ -139,6 +139,11 @@
"type": "number",
"default": 0
},
"ru_mac_addr": {
"title": "RU MAC address",
"description": "RU MAC address used for NETCONF",
"type": "string"
},
{%- endif %}
"dl_earfcn": {
"title": "DL EARFCN",
......@@ -182,12 +187,6 @@
"description": "dnsmasq",
"type": "boolean"
},
"rrh_mac_addr": {
"default": "00:0a:00:00:10:20",
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
"type": "string"
},
{%- endif %}
{%- if ru == 'lopcomm' %}
"txa0cc00_active": {
......
......@@ -120,15 +120,29 @@ environment =
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
{% if slapparameter_dict.get("dnsmasq", None) %}
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = {{dnsmasq_template}}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = ${directory:etc}/${:filename}
context =
import json_module json
import netaddr netaddr
section directory directory
section vtap_jdict vtap_jdict
json cell_list {{ rulib.cell_list | tojson }}
raw ru {{ ru }}
[dnsmasq-service]
recipe = slapos.cookbook:wrapper
port = 5353
ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file={{ dnsmasq_config_path }} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file=${dnsmasq-config:output} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
{{ dnsmasq_config_path }}
${dnsmasq-config:output}
#[dnsmasq-listen-promise]
#<= monitor-promise-base
......@@ -336,6 +350,11 @@ context =
url = {{ sib23_template }}
output = ${directory:etc}/sib23.cfg
[drb-config]
<= config-base
url = {{ drb_lte_template }}
output = ${directory:etc}/drb.cfg
[enb-config]
<= config-base
{% if slapparameter_dict.get("enb_config_link", None) %}
......@@ -345,7 +364,9 @@ url = {{ enb_template }}
{% endif %}
output = ${directory:etc}/enb.cfg
extra-context =
json cell_list {{ rulib.cell_list | tojson }}
key sib23_file sib-config:output
key drb_file drb-config:output
[publish-connection-information]
<= monitor-publish
......
......@@ -83,6 +83,11 @@
"type": "number",
"default": 0
},
"ru_mac_addr": {
"title": "RU MAC address",
"description": "RU MAC address used for NETCONF",
"type": "string"
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
......@@ -111,12 +116,6 @@
"description": "dnsmasq",
"type": "boolean"
},
"rrh_mac_addr": {
"default": "00:0a:00:00:10:20",
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
"type": "string"
},
"txa0cc00_active": {
"title": "Lopcomm ORAN TX array carriers (TXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)",
......
......@@ -225,6 +225,7 @@ hash-files =
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extra-context =
context =
section directory directory
section slap_configuration slap-configuration
......@@ -242,6 +243,12 @@ context =
raw bbu {{ bbu }}
raw ru {{ ru }}
import netaddr netaddr
${:extra-context}
[drb-config]
<= config-base
url = {{ drb_nr_template }}
output = ${directory:etc}/drb.cfg
[gnb-config]
<= config-base
......@@ -251,6 +258,8 @@ url = ${gnb-config-dl:target}
url = {{ gnb_template }}
{% endif %}
output = ${directory:etc}/gnb.cfg
extra-context =
key drb_file drb-config:output
[publish-connection-information]
<= monitor-publish
......
......@@ -93,6 +93,11 @@
"type": "number",
"default": 0
},
"ru_mac_addr": {
"title": "RU MAC address",
"description": "RU MAC address used for NETCONF",
"type": "string"
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
......@@ -121,12 +126,6 @@
"description": "dnsmasq",
"type": "boolean"
},
"rrh_mac_addr": {
"default": "00:0a:00:00:10:20",
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
"type": "string"
},
"enb_id": {
"title": "eNB ID",
"description": "eNB ID",
......
......@@ -29,6 +29,7 @@ context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
raw buildout_directory ${buildout:directory}
raw pythonwitheggs ${buildout:bin-directory}/pythonwitheggs
section slap_connection slap-connection
key slapparameter_dict slap-configuration:configuration
key lan_ipv4 lan-ip:ipv4
......@@ -268,11 +269,13 @@ extra-context =
raw monitor_template ${monitor2-template:output}
section ors_version ors-version
section ors_id ors-id
section slap_configuration slap-configuration
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key enb amarisoft:enb
key sdr amarisoft:sdr
raw enb_template ${enb.jinja2.cfg:target}
raw drb_lte_template ${drb_lte.jinja2.cfg:target}
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}
......@@ -286,14 +289,15 @@ extra-context =
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 ru_tapsplit ${ru_tapsplit:target}
raw netcapdo ${netcapdo:exe}
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}
raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq-enb.jinja2.cfg:target}
raw dnsmasq_location ${dnsmasq:location}
key dnsmasq_config_path dnsmasq-config:output
raw fluent_bit_location ${fluent-bit:location}
raw openssh_location ${openssh:location}
raw openssh_output_keygen ${openssh-output:keygen}
......@@ -312,6 +316,7 @@ extra-context =
key enb amarisoft:enb
key sdr amarisoft:sdr
raw gnb_template ${gnb.jinja2.cfg:target}
raw drb_nr_template ${drb_nr.jinja2.cfg:target}
raw amarisoft_stats_template ${amarisoft-stats.jinja2.py:target}
raw amarisoft_rf_info_template ${amarisoft-rf-info.jinja2.py:target}
raw openssl_location ${openssl:location}
......@@ -334,14 +339,13 @@ extra-context =
key lte_expiration amarisoft:lte-expiration
key mme amarisoft:mme
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq-core-network.jinja2.cfg:target}
raw ims_template ${ims.jinja2.cfg:target}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
raw dnsmasq_location ${dnsmasq:location}
key ue_db_path ue-db-config:output
key dnsmasq_config_path dnsmasq-config:output
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-ue-lte]
......@@ -387,17 +391,3 @@ output = $${directory:etc}/$${:filename}
context =
import json_module json
key slave_instance_list slap-configuration:slave-instance-list
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = ${dnsmasq.jinja2.cfg:target}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = $${directory:etc}/$${:filename}
context =
import json_module json
import netaddr netaddr
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
raw ru ${rf-mode:ru}
......@@ -6,5 +6,27 @@ extends =
lopcomm/buildout.cfg
sunwave/buildout.cfg
parts +=
netcapdo
setcap-netcapdo
[ru_libinstance.jinja2.cfg]
<= download-base
[ru_tapsplit]
<= download-base
[ru_capdo.c]
<= download-base
[netcapdo]
recipe = plone.recipe.command
exe = ${buildout:directory}/netcapdo
command = gcc ${:ccflags} -o ${:exe} ${ru_capdo.c:target} -lcap
ccflags = -I${libcap:location}/include -L${libcap:location}/lib -Wl,-rpath=${libcap:location}/lib
stop-on-error = true
[setcap-netcapdo]
<= setcap
exe = ${netcapdo:exe}
// Copyright (C) 2023 Nexedi SA and Contributors.
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Free Software licenses or any of the Open Source
// Initiative approved licenses and Convey the resulting work. Corresponding
// source of such a combination shall include the source code for all other
// software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// Program `capdo prog ...` executes prog with inherited capabilities.
// It is used as trampoline to run scripts under setcap environment.
//
// TODO Relying on setcap should be removed once SlapOS is improved to provide
// several TAP interfaces to instances. See discussion at
// https://lab.nexedi.com/nexedi/slapos/merge_requests/1471#note_194356
// for details.
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/capability.h>
#include <sys/prctl.h>
static int die(const char *fmt, ...);
static int die_err(const char *msg);
int main(int argc, const char *argv[]) {
cap_t caps;
cap_value_t cap;
cap_flag_value_t flag;
uint64_t capbits = 0;
if (argc < 2)
die("usage: capdo prog arguments...");
// permitted -> inheritable (so that we can raise ambient below)
caps = cap_get_proc();
if (!caps)
die("cap_get_proc failed");
for (cap = 0; cap < CAP_LAST_CAP; cap++) {
if (cap_get_flag(caps, cap, CAP_PERMITTED, &flag)) {
if (errno = EINVAL)
continue; // this cap is not supported by running kernel
die_err("cap_get_flag");
}
if (flag) {
cap_set_flag(caps, CAP_INHERITABLE, 1, &cap, flag) && die_err("cap_set_flag");
capbits |= (1ULL << cap);
}
}
cap_set_proc(caps) && die_err("cap_set_proc");
// raise ambient capabilities to what is permitted/inheritable
// this way executed program will have the same capabilities that we have
for (cap = 0; cap <= CAP_LAST_CAP; cap++) {
if (capbits & (1ULL << cap))
prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, cap, 0, 0) && die_err("prctl ambient raise");
}
// tail to exec target
argv++;
execv(argv[0], argv);
// the only chance we are here is due to exec error
die_err(argv[0]);
}
static int die(const char* fmt, ...) {
va_list ap;
fprintf(stderr, "E: capdo: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
exit(128);
return 0;
}
static int die_err(const char* msg) {
return die("%s: %s", msg, strerror(errno));
}
{#- 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,105 @@ config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
lopcomm=rudrv_lopcomm,
sunwave=rudrv_sunwave) %}
{#- invoke RU-specific buildout handler #}
{#- slaptap indicates tap interface, that slapos told us to use,
or 'xxx-notap-xxx' if slapos provided us either nothing or empty string. #}
{%- set slaptap = slap_configuration.get('tap-name', '') %}
{%- if slaptap == '' %}
{%- set slaptap = 'xxx-notap-xxx' %}
{%- endif %}
{#- split slapos tap interface for each RU
fallback to non-split approach for ntap <= 1 to avoid hard-dependecy on setcap/tapsplit
TODO Relying on setcap and tapsplit should be removed once SlapOS is improved to
provide several TAP interfaces to instances. See discussion at
https://lab.nexedi.com/nexedi/slapos/merge_requests/1471#note_194356
for details. #}
{%- set ntap = len(list(cell_list|dictsort)) %}
{%- set vtap_list = [] %}
[vtap]
recipe = plone.recipe.command
ntap = {{ ntap }}
command = {{ netcapdo }} {{ pythonwitheggs }} {{ ru_tapsplit }} {{ slaptap }} ${:ntap}
update-command = ${:command}
stop-on-error = true
{%- if ntap <= 1 %}
[vtap]
ntap = 0
stop-on-error = false
{%- if ntap == 1 %}
{%- do vtap_list.append(slaptap) %}
[vtap.{{ slaptap }}]
network = {{ slap_configuration['tap-ipv6-network'] }}
gateway = {{ slap_configuration['tap-ipv6-gateway'] }}
addr = {{ slap_configuration['tap-ipv6-addr'] }}
{%- endif %}
{%- else %}
{%- for i in range(1,1+ntap) %}
{%- set tap = '%s-%d' % (slaptap, i) %}
{%- do vtap_list.append(tap) %}
[vtap.{{ tap }}]
recipe = slapos.recipe.build
depends = ${vtap:recipe}
init =
import types
def readfile(path):
with open(path) as f:
return f.read()
# ~ import tapsplit
tapsplit = types.ModuleType('tapsplit')
exec(readfile('{{ ru_tapsplit }}'), tapsplit.__dict__)
# simulate what tapsplit would assign to the tap
# ( tap subinterface will be created for real later at install time - when it
# is too late to update section options )
slapnet = tapsplit.ifnet6('{{ slaptap }}')
tapnet = tapsplit.netsplit(slapnet, {{ 1+ntap }}) [{{ i }}]
options['network'] = str(tapnet)
options['gateway'] = str(tapnet[1])
options['addr'] = str(tapnet[-1])
{%- endfor %}
{%- endif %}
# vtap_jdict maps tapname -> json(interface-info)
[vtap_jdict]
recipe = slapos.recipe.build
depends = {% for tap in vtap_list %} ${vtap.{{tap}}:addr} {% endfor %}
init =
import json
{%- for tap in vtap_list %}
tap = self.buildout['vtap.{{tap}}']
tap = {k: tap[k] for k in ('network', 'gateway', 'addr')}
options['{{tap}}'] = json.dumps(tap)
{%- endfor %}
{#- assign TAP interfaces to RUs #}
{%- for i, (cell_ref, cell) in enumerate(cell_list|dictsort) %}
{%- if len(cell_list) > 1 %}
{%- set ru_tap = "%s-%d" % (slaptap, i+1) %}
{%- else %}
{%- set ru_tap = slaptap %}
{%- endif %}
{%- do cell.update({'_tap': ru_tap}) %}
{%- endfor %}
{#- 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]
......
......@@ -8,7 +8,7 @@ if __name__ == '__main__':
nc = LopcommNetconfClient(log_file="{{ log_file }}")
while True:
try:
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
nc.connect("{{ netaddr.IPAddress(vtap.gateway) }}", 830, "oranuser", "oranpassword")
nc.edit_config(["{{ CreateProcessingEle_template }}", "{{ cu_config_template }}"])
break
except Exception as e:
......
......@@ -19,7 +19,7 @@ def get_uptime(hostname, username, password):
client.close()
# Usage
hostname = "{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}"
hostname = "{{ netaddr.IPAddress(vtap.gateway) }}"
username = "oranuser"
password = "oranpassword"
......
......@@ -7,7 +7,7 @@ from ncclient_common import LopcommNetconfClient
if __name__ == '__main__':
nc = LopcommNetconfClient(log_file="{{ log_file }}")
try:
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
nc.connect("{{ netaddr.IPAddress(vtap.gateway) }}", 830, "oranuser", "oranpassword")
nc.reset_device()
nc.logger.info("Device reset successful.")
except Exception as e:
......
......@@ -15,8 +15,8 @@ if __name__ == '__main__':
)
while True:
try:
firmware_check_file= os.path.join('{{etc_path}}','is_firmware_updated')
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
firmware_check_file= '{{ is_firmware_updated }}'
nc.connect("{{ netaddr.IPAddress(vtap.gateway) }}", 830, "oranuser", "oranpassword")
# Fetch software inventory
inventory_vars = nc.get_inventory()
......
......@@ -15,7 +15,7 @@ if __name__ == '__main__':
)
while True:
try:
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
nc.connect("{{ netaddr.IPAddress(vtap.gateway) }}", 830, "oranuser", "oranpassword")
nc.subscribe()
while True:
nc.get_notification()
......
......@@ -14,8 +14,8 @@ 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')
nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
netconf_check_file = '{{ is_netconf_connected }}'
nc.connect("{{ netaddr.IPAddress(vtap.gateway) }}", 830, "oranuser", "oranpassword")
supervision_subscription_rpc_xml = """
<create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
......
{#- 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 %}
#!/usr/bin/env python
# Copyright (C) 2023 Nexedi SA and Contributors.
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""Program tapsplit brings tap interface into state with several children
interfaces each covering part of original interface address space.
Usage: tapsplit <interface> <nchildren>
"""
# TODO Relying on tapsplit should be removed once SlapOS is improved to provide
# several TAP interfaces to instances. See discussion at
# https://lab.nexedi.com/nexedi/slapos/merge_requests/1471#note_194356
# for details.
import netifaces
import netaddr
from socket import AF_INET6
from math import log2, ceil
import sys
import subprocess
def main():
tap = sys.argv[1]
n = int(sys.argv[2])
assert n >= 0, n
# determine tap's network address and owner
owner = readfile(sysnet(tap) + '/owner') .strip()
net = ifnet6(tap)
print('%s: split %s by %d' % (tap, net, n))
# cleanup existing children
for ifname in netifaces.interfaces():
if ifname.startswith('%s-' % tap):
run('ip', 'link', 'del', ifname)
# do the split
# with leaving first range for the original tap
for i, subnet in enumerate(netsplit(net, 1+n)):
if i == 0:
print('preserve %s' % subnet)
continue # leave this range for original tap
subtap = '%s-%d' % (tap, i)
print('-> %s %s' % (subtap, subnet))
run('ip', 'tuntap', 'add', 'dev', subtap, 'mode', 'tap', 'user', owner)
run('ip', 'link', 'set', subtap, 'up')
run('ip', 'addr', 'add', str(subnet), 'dev', subtap, 'noprefixroute')
run('ip', 'route', 'add', str(subnet[1]), 'dev', subtap)
run('ip', 'route', 'add', str(subnet), 'dev', subtap, 'via', str(subnet[1]))
# netsplit splits network into n subnetworks.
def netsplit(net, n): # -> []subnet
# see how much prefix bits we need to take to be able to divide by n
ptake = ceil(log2(n))
return list( net.subnet(net.prefixlen + ptake) )[:n]
# ifnet6 returns IPv6 network address associated with given interface.
def ifnet6(ifname):
addr = None
net = None
prefixlen = None
for iaddr in netifaces.ifaddresses(ifname)[AF_INET6]:
a = iaddr['addr']
if '%' in a: # link-local
a = a.split('%')[0]
a = netaddr.IPAddress(a)
assert a.is_link_local(), a
continue
if addr is not None:
raise RuntimeError('%s: multiple addresses: %s and %s' % (ifname, addr, a))
addr = netaddr.IPAddress(a)
netmask, plen = iaddr['netmask'].split('/')
prefixlen = int(plen)
net = netaddr.IPNetwork('%s/%d' % (a, prefixlen))
if addr is None:
raise RuntimeError('%s: no non link-local addresses' % ifname)
# normalize network
# ex 2401:5180:0:66:a7ff:ffff:ffff:ffff/71 -> 2401:5180:0:66:a600::/71
net = net.cidr
return net
# sysnet returns path on /sys corresponding to given interface.
def sysnet(ifname):
return '/sys/devices/virtual/net/%s' % ifname
def run(*argv):
print(' # %s' % ' '.join(argv))
subprocess.check_call(argv)
def readfile(path):
with open(path) as f:
return f.read()
if __name__ == '__main__':
main()
......@@ -15,6 +15,7 @@ extends =
../../component/dnsmasq/buildout.cfg
../../component/fluent-bit/buildout.cfg
../../component/openssh/buildout.cfg
../../component/libcap/buildout.cfg
ru/buildout.cfg
parts +=
......@@ -22,13 +23,16 @@ parts +=
slapos-cookbook
# copy all configs by default
mme.jinja2.cfg
dnsmasq.jinja2.cfg
dnsmasq-core-network.jinja2.cfg
dnsmasq-enb.jinja2.cfg
ims.jinja2.cfg
enb.jinja2.cfg
gnb.jinja2.cfg
ue_db.jinja2.cfg
ue-lte.jinja2.cfg
ue-nr.jinja2.cfg
drb_lte.jinja2.cfg
drb_nr.jinja2.cfg
sib23.jinja2.asn
monitor-httpd-extra-conf
# copy all gadget file
......@@ -41,7 +45,7 @@ parts +=
dnsmasq
eggs
xamari
setcap
setcap-dnsmasq
# unimplemented parts - the http monitor and better log handling using logrotate
# apache-php
# logrotate
......@@ -114,6 +118,10 @@ destination = ${buildout:directory}/gadget/${:_buildout_section_name_}
[enb.jinja2.cfg]
<= copy-config-to-instance
filename = enb.jinja2.cfg
[drb_lte.jinja2.cfg]
<= copy-config-to-instance
[drb_nr.jinja2.cfg]
<= copy-config-to-instance
[sib23.jinja2.asn]
<= copy-config-to-instance
filename = sib23.jinja2.asn
......@@ -126,9 +134,10 @@ filename = ue_db.jinja2.cfg
[mme.jinja2.cfg]
<= copy-config-to-instance
filename = mme.jinja2.cfg
[dnsmasq.jinja2.cfg]
[dnsmasq-core-network.jinja2.cfg]
<= copy-config-to-instance
[dnsmasq-enb.jinja2.cfg]
<= copy-config-to-instance
filename = dnsmasq.jinja2.cfg
[ims.jinja2.cfg]
<= copy-config-to-instance
filename = ims.jinja2.cfg
......@@ -164,6 +173,8 @@ eggs =
xmltodict
ncclient
${lxml-python:egg}
netifaces
netaddr
interpreter = pythonwitheggs
[xlte-repository]
......@@ -187,9 +198,13 @@ scripts = xamari
[setcap]
recipe = plone.recipe.command
command = sudo -n /opt/amarisoft/setcap ${dnsmasq:location}/sbin/dnsmasq || true
command = sudo -n /opt/amarisoft/setcap ${:exe} || true
update-command = ${:command}
[setcap-dnsmasq]
<= setcap
exe = ${dnsmasq:location}/sbin/dnsmasq
[versions]
websocket-client = 1.4.2
ncclient = 0.6.13
......
......@@ -180,7 +180,7 @@ distro = 1.7.0
dnspython = 1.16.0
entrypoints = 0.3
enum34 = 1.1.10
erp5.util = 0.4.74
erp5.util = 0.4.75
et-xmlfile = 1.0.1
exceptiongroup = 1.1.3:whl
fastjsonschema = 2.18.1
......
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