Commit c59ae847 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6df3bd94
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 7f0dd2b2bfb3b71809d66749b3f8c8a1
md5sum = 65a356f616bf9681d98f810dfd006901
[amari_lte.jinja2]
_update_hash_filename_ = amari/lte.jinja2
......@@ -88,15 +88,15 @@ md5sum = 4855e1b8dbc6fee88a16cefc39e96693
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = cfd86f44a21903aed6d86abaf1bf3163
md5sum = 289240ac3fe76f22b903a255a643ebc5
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = e758c9358c49360ef0b3db946ab0f493
md5sum = e4d8c66c00dc5c022e9208c10e37490e
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = 6a17d6d37a011ad72a01137829ca48d4
md5sum = 68512b0f564a6fb736ab92dd25613d47
[template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg
......@@ -112,7 +112,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = aa301e59aa732cfa92f1d04138b0a6e8
md5sum = 775aa46cc8aeba4ee35e7ed78c37384b
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
......@@ -137,7 +137,7 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
md5sum = 4020cb985323a431ed2f570f9cc4116f
md5sum = 44fc9ee5082dd8e0298801f8d4618b06
[dnsmasq-core-network.jinja2.cfg]
filename = config/dnsmasq-core-network.jinja2.cfg
......
......@@ -36,18 +36,19 @@
{{ lte.ru_config(iru_dict, slapparameter_dict) }}
{%- if slapparameter_dict.get('websocket_password', '') %}
com_addr: "[{{ gtp_addr_v6 }}]:9001",
com_addr: "[{{ gtp_addr_v6 }}]:{{ slap_configuration['configuration.com_ws_port'] }}",
com_auth: {
password: "{{ slapparameter_dict['websocket_password'] }}",
},
{%- else %}
com_addr: "127.0.1.2:9001",
com_addr: "{{ slap_configuration['configuration.com_addr'] }}:{{ slap_configuration['configuration.com_ws_port'] }}",
{%- endif %}
// XXX only if slapparameter_dict.get('mme_list') || has LTE cell ?
mme_list: [
{%- for _, mme in slapparameter_dict.get('mme_list', {'1':{'mme_addr': '127.0.1.100'}})
| dictsort %}
{%- for _, mme in slapparameter_dict.get('mme_list',
{'1':{'mme_addr': slap_configuration['configuration.mme_addr']}})
| dictsort %}
{
mme_addr: "{{ mme['mme_addr'] }}",
},
......@@ -56,8 +57,9 @@
// XXX only if slapparameter_dict.get('afm_list') || has NR cell ?
afm_list: [
{%- for _, afm in slapparameter_dict.get('afm_list', {'1':{'afm_addr': '127.0.1.100'}})
| dictsort %}
{%- for _, afm in slapparameter_dict.get('afm_list',
{'1':{'afm_addr': slap_configuration['configuration.amf_addr']}})
| dictsort %}
{
afm_addr: "{{ afm['afm_addr'] }}",
},
......@@ -82,7 +84,7 @@
gtp_addr: "{{ gtp_addr_v6 }}",
{% endif %}
{% else %}
gtp_addr: "127.0.1.1",
gtp_addr: "{{ slap_configuration['configuration.gtp_addr'] }}",
{% endif %}
enb_id: {{ cfg('enb_id') }},
......
......@@ -11,7 +11,7 @@
gtp_addr: "{{ gtp_addr_v6 }}",
{% endif %}
{% else %}
gtp_addr: "127.0.1.100",
gtp_addr: "{{ slap_configuration['configuration.gtp_addr'] }}",
{% endif %}
plmn: "{{ slapparameter_dict.get('core_network_plmn', "00101") }}",
......@@ -32,8 +32,8 @@
},
network_name: "{{ slap_configuration['configuration.network_name'] }}",
network_short_name: "{{ slap_configuration['configuration.network_name'] }}",
network_name: "{{ slapparameter_dict.get('network_name', 'RAPIDSPACE') }}",
network_short_name: "{{ slapparameter_dict.get('network_short_name', 'RAPIDSPACE') }}",
cp_ciot_opt: true,
......
......@@ -27,6 +27,18 @@
"description": "Activates local DNS server serving the given domain name",
"type": "string"
},
"network_name": {
"title": "Network Name",
"description": "Network name displayed on UE",
"type": "string",
"default": "RAPIDSPACE"
},
"network_short_name": {
"title": "Network Short Name",
"description": "Network short name displayed on UE",
"type": "string",
"default": "RAPIDSPACE"
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
......
......@@ -67,16 +67,9 @@ partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.network_name = RAPIDSPACE
configuration.domain = rapid.space
configuration.log_size = 50M
configuration.mme_ws_port = 9000
configuration.enb_ws_port = 9002
configuration.ims_ws_port = 9003
configuration.mme_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.100
configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
configuration.enb_addr = 127.0.1.1
ue_db_path = {{ ue_db_path }}
[monitor-httpd-conf-parameter]
......@@ -265,6 +258,8 @@ password = {{ slapparameter_dict['monitor-password'] | string }}
recipe = slapos.cookbook:publish.serialised
core-network-ipv6 = ${slap-configuration:ipv6-random}
core-network-ipv4 = {{ lan_ipv4 }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[macro.promise]
......
......@@ -65,14 +65,10 @@ url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.network_name = RAPIDSPACE
configuration.domain = rapid.space
configuration.mme_ws_port = 9000
configuration.enb_ws_port = 9002
configuration.ims_ws_port = 9003
configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
configuration.enb_addr = 127.0.1.1
configuration.com_ws_port = 9001
configuration.com_addr = 127.0.1.2
configuration.mme_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1
# XXX -> ru ?
configuration.default_lte_inactivity_timer = {{ default_lte_inactivity_timer }}
......@@ -389,8 +385,10 @@ frequency-range-rating = {{ ors_version['range'] }}
current-tx-power-estimate = {{ ors_version['power-estimate'] }}
current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-earfcn = {{ ors_version['current-earfcn'] }}
{% endif %}
current-earfcn = {{ ors_version['current-earfcn'] }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
ru-list = {{ rulib.iru_dict.keys() | sort | join(', ') }}
cell-list = {{ rulib.icell_dict.keys() | sort | join(', ') }}
......
......@@ -45,14 +45,10 @@ url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.network_name = RAPIDSPACE
configuration.domain = rapid.space
configuration.mme_ws_port = 9000
configuration.enb_ws_port = 9002
configuration.ims_ws_port = 9003
configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
configuration.enb_addr = 127.0.1.1
configuration.com_ws_port = 9001
configuration.com_addr = 127.0.1.2
configuration.amf_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1
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 }}
......@@ -281,6 +277,8 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
current-nr-band = {{ ors_version['current-nr-band'] }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter]
......
......@@ -77,6 +77,20 @@ init =
options['mme'] = path + "/mme"
options['ims'] = path + "/ims"
options['ue'] = path + "/ue"
import os
lte_expiration = "Unknown"
amarisoft_dir = '/opt/amarisoft/.amarisoft'
try:
for filename in os.listdir(amarisoft_dir):
if filename.endswith('.key'):
with open(os.path.join(amarisoft_dir, filename), 'r') as f:
f.seek(260)
for l in f:
if l.startswith('version='):
lte_expiration = l.split('=')[1].strip()
except FileNotFoundError:
pass
options['lte-expiration'] = lte_expiration
# XXX -> ru/ors ?
[ors-version]
......@@ -184,10 +198,9 @@ init =
return subprocess.check_output(
["sudo", "-n", "/opt/amarisoft/get-sdr-info", "-" + cmd]
)
#options['version'] = float(get_sdr_info('v').decode())
options['version'] = get_sdr_info('v').decode()
#options['is_ors'] = is_ors = (options['version'] != 'UNKNOWN')
options['is_ors'] = is_ors = False
version = get_sdr_info('v').decode()
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['is_ors'] = is_ors = (options['version'] != 0)
options['band'] = get_sdr_info('b').decode()
options['tdd'] = get_sdr_info('t').decode()
if is_ors:
......@@ -275,6 +288,8 @@ extra-context =
section ors_version ors-version
section comp_id comp-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}
......@@ -315,6 +330,8 @@ extra-context =
raw monitor_template ${monitor2-template:output}
section ors_version ors-version
section comp_id comp-id
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key enb amarisoft:enb
key sdr amarisoft:sdr
raw gnb_template ${gnb.jinja2.cfg:target}
......@@ -333,6 +350,8 @@ filename = instance-core-network.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key mme amarisoft:mme
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq-core-network.jinja2.cfg:target}
......
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