Commit 563a21ca authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb+ue: Stop using slap_configuration to propagate LTE and NR defaults

instance-enb and instance-ue currently setup that slap_configuration with
LTE/NR defaults to be accessible from enb.jinja2.cfg and ue.jinja2.cfg. But we
will soon need to have access to those defaults from slaplte.jinja2 as well,
and it will break if left as is because when slaplte is imported from e.g.
enb.jinja2 - it will work, but when slaplte is imported from instance-enb it
will break because parent of instance-enb (instance.cfg) does not setup
defaults in slap_configuration at that level.

The fix is to either duplicate slap_configuration at instance.cfg level, or to
switch access to the defaults to go via original default_* parameters.

We go the second way for simplicity.
parent 1c0317be
......@@ -87,11 +87,11 @@
{%- endif %}
{%- endif %}
{%- set ru.n_antenna_dl = slapparameter_dict.get('n_antenna_dl', int(slap_configuration['configuration.default_n_antenna_dl'])) %}
{%- set ru.n_antenna_dl = slapparameter_dict.get('n_antenna_dl', int(default_n_antenna_dl)) %}
{% if ru.ru_type == "sunwave" %}
{%- set ru.n_antenna_ul = slapparameter_dict.get('n_antenna_ul', 1) %}
{% else %}
{%- set ru.n_antenna_ul = slapparameter_dict.get('n_antenna_ul', int(slap_configuration['configuration.default_n_antenna_ul'])) %}
{%- set ru.n_antenna_ul = slapparameter_dict.get('n_antenna_ul', int(default_n_antenna_ul)) %}
{% endif %}
{
......@@ -205,7 +205,7 @@
n_id_cell: {{ cell_list[k].get('pci', slapparameter_dict.get('pci', i)) }},
root_sequence_index: {{ cell_list[k].get('root_sequence_index', slapparameter_dict.get('root_sequence_index', 204 + i)) }},
dl_earfcn: {{ cell_list[k].get('dl_earfcn', slapparameter_dict.get('dl_earfcn', earfcn)) }},
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_lte_inactivity_timer']) }},
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', default_lte_inactivity_timer) }},
// Handover
{{- handover_config() }}
......@@ -241,7 +241,7 @@
sp_config: 7,
{%- endif %}
{%- set n_rb_dl = J(jlte_n_rb_dl(slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']))) %}
{%- set n_rb_dl = J(jlte_n_rb_dl(slapparameter_dict.get('bandwidth', default_lte_bandwidth))) %}
n_rb_dl: {{ n_rb_dl }},
si_coderate: {{ 0.30 if n_rb_dl == 6 else 0.20 }},
......@@ -428,12 +428,12 @@
n_id_cell: {{ slapparameter_dict.get('pci', 500) }},
band: {{ nr_band }},
dl_nr_arfcn: {{ nr_arfcn }},
bandwidth: {{ slapparameter_dict.get('nr_bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
bandwidth: {{ slapparameter_dict.get('nr_bandwidth', default_nr_bandwidth) }},
subcarrier_spacing: 30,
ssb_pos_bitmap: "{{ slapparameter_dict.get('ssb_pos_bitmap', slap_configuration['configuration.default_nr_ssb_pos_bitmap']) }}",
ssb_pos_bitmap: "{{ slapparameter_dict.get('ssb_pos_bitmap', default_nr_ssb_pos_bitmap) }}",
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_nr_inactivity_timer']) }},
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', default_nr_inactivity_timer) }},
// Handover
{{- handover_config() }}
......
......@@ -23,10 +23,10 @@ rf_driver: {
multi_ue: true,
cells: [
{
bandwidth: {{ slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) .removesuffix(' MHz') }},
bandwidth: {{ slapparameter_dict.get('bandwidth', default_lte_bandwidth) .removesuffix(' MHz') }},
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', 0) }},
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }},
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', default_n_antenna_dl) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', default_n_antenna_ul) }},
global_timing_advance: -1,
}
],
......@@ -41,13 +41,13 @@ rf_driver: {
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: {{ slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
bandwidth: {{ slapparameter_dict.get('bandwidth', default_nr_bandwidth) }},
band: {{ slapparameter_dict.get('nr_band', 0) }},
dl_nr_arfcn: {{ slapparameter_dict.get('dl_nr_arfcn', 0) }},
ssb_nr_arfcn: {{ slapparameter_dict.get('ssb_nr_arfcn', 0) }},
subcarrier_spacing: 30,
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }},
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', default_n_antenna_dl) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', default_n_antenna_ul) }},
}
],
},
......@@ -62,13 +62,13 @@ rf_driver: {
impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}",
{%- if do_lte %}
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}",
imsi: "{{ slapparameter_dict.get('imsi', default_lte_imsi) }}",
K: "{{ slapparameter_dict.get('k', default_lte_k) }}",
ue_category: 12,
{%- endif %}
{%- if do_nr %}
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_nr_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_nr_k']) }}",
imsi: "{{ slapparameter_dict.get('imsi', default_nr_imsi) }}",
K: "{{ slapparameter_dict.get('k', default_nr_k) }}",
as_release: 15,
ue_category: "nr",
{%- endif %}
......
......@@ -61,13 +61,6 @@ configuration.com_addr = 127.0.1.2
configuration.mme_addr = 127.0.1.100
configuration.amf_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
configuration.default_lte_inactivity_timer = {{ default_lte_inactivity_timer }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_nr_inactivity_timer = {{ default_nr_inactivity_timer }}
configuration.default_nr_ssb_pos_bitmap = {{ default_nr_ssb_pos_bitmap }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
[directory]
recipe = slapos.cookbook:mkdirectory
......@@ -208,6 +201,13 @@ context =
raw trx {{ trx }}
raw bbu {{ bbu }}
raw ru_type {{ ru }}
raw default_lte_bandwidth {{ default_lte_bandwidth }}
raw default_lte_inactivity_timer {{ default_lte_inactivity_timer }}
raw default_nr_bandwidth {{ default_nr_bandwidth }}
raw default_nr_ssb_pos_bitmap {{ default_nr_ssb_pos_bitmap }}
raw default_nr_inactivity_timer {{ default_nr_inactivity_timer }}
raw default_n_antenna_dl {{ default_n_antenna_dl }}
raw default_n_antenna_ul {{ default_n_antenna_ul }}
{%- if enb_mode == 'enb' %}
json do_lte true
json do_nr false
......
......@@ -39,15 +39,6 @@ url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
configuration.default_lte_imsi = {{ default_lte_imsi }}
configuration.default_nr_imsi = {{ default_nr_imsi }}
configuration.default_lte_k = {{default_lte_k}}
configuration.default_nr_k = {{ default_nr_k }}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
......@@ -108,6 +99,14 @@ context =
section slap_configuration slap-configuration
section pub_info publish-connection-information
key slapparameter_dict slap-configuration:configuration
raw default_lte_bandwidth {{ default_lte_bandwidth }}
raw default_nr_bandwidth {{ default_nr_bandwidth }}
raw default_n_antenna_dl {{ default_n_antenna_dl }}
raw default_n_antenna_ul {{ default_n_antenna_ul }}
raw default_lte_imsi {{ default_lte_imsi }}
raw default_nr_imsi {{ default_nr_imsi }}
raw default_lte_k {{default_lte_k}}
raw default_nr_k {{ default_nr_k }}
{%- if rat == 'lte' %}
json do_lte true
json do_nr false
......
<xc:config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
{%- set n_antenna_dl = slapparameter_dict.get('n_antenna_dl', int(slap_configuration['configuration.default_n_antenna_dl'])) %}
{%- set n_antenna_ul = slapparameter_dict.get('n_antenna_ul', int(slap_configuration['configuration.default_n_antenna_ul'])) %}
{%- set n_antenna_dl = slapparameter_dict.get('n_antenna_dl', int(default_n_antenna_dl)) %}
{%- set n_antenna_ul = slapparameter_dict.get('n_antenna_ul', int(default_n_antenna_ul)) %}
<user-plane-configuration xc:operation="replace" xmlns="urn:o-ran:uplane-conf-option8:1.0">
<!-- TX path: eaxcid → TxEndpoint
......
......@@ -69,23 +69,23 @@ def do(src, out, rat, slapparameter_dict):
"drb_file": "drb",
"slap_configuration": {
"tap-name": "slaptap9",
"configuration.default_lte_bandwidth": "10 MHz",
"configuration.default_lte_imsi": "001010123456789",
"configuration.default_lte_k": "00112233445566778899aabbccddeeff",
"configuration.default_lte_inactivity_timer": 10000,
"configuration.default_nr_bandwidth": 40,
"configuration.default_nr_imsi": "001010123456789",
"configuration.default_nr_k": "00112233445566778899aabbccddeeff",
"configuration.default_nr_ssb_pos_bitmap": "10000000",
"configuration.default_n_antenna_dl": 2,
"configuration.default_n_antenna_ul": 2,
"configuration.default_nr_inactivity_timer": 10000,
"configuration.com_ws_port": 9001,
"configuration.com_addr": "127.0.1.2",
"configuration.amf_addr": "127.0.1.100",
"configuration.mme_addr": "127.0.1.100",
"configuration.gtp_addr": "127.0.1.1"
},
"default_lte_bandwidth": "10 MHz",
"default_lte_imsi": "001010123456789",
"default_lte_k": "00112233445566778899aabbccddeeff",
"default_lte_inactivity_timer": 10000,
"default_nr_bandwidth": 40,
"default_nr_imsi": "001010123456789",
"default_nr_k": "00112233445566778899aabbccddeeff",
"default_nr_ssb_pos_bitmap": "10000000",
"default_n_antenna_dl": 2,
"default_n_antenna_ul": 2,
"default_nr_inactivity_timer": 10000,
"directory": {
"log": "log",
"etc": "etc",
......
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