Commit b50f7e03 authored by Joanne Hugé's avatar Joanne Hugé

simpleran/ue: fixes

- add power_on parameter
- fix amarisoft_version parameter in ue
- fix com address in UE configuration
- add nginx for the websocket
parent 668d6ff3
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 176b84bde85d95a115a0cf2068912461
md5sum = 9013df1ac77d35a1fc8df37bb5615dcd
[template-ors]
filename = instance-ors.cfg
......@@ -68,7 +68,7 @@ md5sum = bdc8ca95cad8374f24af7ab6a276b61c
[template-ors-ue]
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
md5sum = f4389a92fb111447e7976e452db78607
md5sum = 82449c34a4632191931ce8aa88ce72e6
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
......@@ -76,7 +76,7 @@ md5sum = 92fd8377819ae6e844f77937cecfa605
[template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = 7b6196d92e6988a52a78660c2b6a8b50
md5sum = 763fa11181527bf4c481fd2e6a2f7c59
[template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg
......@@ -124,7 +124,7 @@ md5sum = 8379c4edcccc03db94acceca77e3cd07
[ue.jinja2.cfg]
filename = config/ue.jinja2.cfg
md5sum = 1c65b7227d1416a636a3f04fcabddcdf
md5sum = 9b095aed884849a712366e6c2e5953c7
[software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html
......
......@@ -22,7 +22,11 @@
{%- if not ors %}
rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}",
com_addr: "[[ ",
com_addr: "{{ slapparameter_dict.com_addr }}:{{ slapparameter_dict.com_ws_port }}",
com_auth: {
password: "{{ websocket_password }}",
unsecure: false,
},
{%- endif %}
{# instantiate radio units #}
......
......@@ -4,7 +4,8 @@
"n_antenna_ul": 1,
"rf_mode": "tdd",
"plmn": "00101",
"disable_sdr": false
"disable_sdr": false,
"power_on": true
} %}
{%- for k,v in ors_defaults|dictsort %}
......
......@@ -14,6 +14,8 @@ parts =
directory
lte-ue-config
lte-ue-service
nginx-launcher
nginx-graceful
monitor-base
publish-connection-information
......@@ -84,7 +86,7 @@ inline =
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log};
tail -c 1M ${:ue-log} > ${:ue-log}.tmp;
mv ${:ue-log}.tmp ${:ue-log};
{%- if ors %}
{%- if slapparameter_dict.get('power_on', False) %}
echo "power_on" | sudo -n {{ amarisoft['ue_dir'] }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
{%- else %}
{{ amarisoft['ue_dir'] }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
......@@ -144,6 +146,10 @@ ue-mac = {{ mac }}
websocket-hostname = ${frontend-urlparse:hostname}
websocket-port = ${frontend-urlparse:port}
websocket-password = ${websocket-password:passwd}
amarisoft-version = {{ amarisoft['version'] }}
amarisoft-host-id = {{ amarisoft['lteue_host_id'] }}
amarisoft-available-versions = {{ amarisoft['version_installed'] }}
license-expiration = {{ amarisoft['lteenb_expiration'] }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter]
......
......@@ -101,7 +101,7 @@ init =
if mock:
version_installed = [options['fixed_version']]
else:
version_installed = list(filter(lambda x: re.match(r"v[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{10}", x), os.listdir(options['dir'])))
version_installed = [x[1:] for x in os.listdir(options['dir']) if re.match(r"v[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{10}", x)]
options['version_installed'] = ', '.join(version_installed)
# Set Amarisoft version to use
slapconf_version = options['configuration'].get('amarisoft_version', False)
......@@ -125,11 +125,11 @@ init =
options['ue_dir'] = '${buildout:directory}/bin'
# Get License expiration and host IDs
if mock:
options.update({'lteenb_expiration': '9999-99-99', 'ltemme_expiration': '9999-99-99'})
options.update({'lteenb_host_id': '00-00-00-00-00-00-00-00', 'ltemme_host_id': '00-00-00-00-00-00-00-00'})
options.update({'lteenb_expiration': '9999-99-99', 'ltemme_expiration': '9999-99-99', 'lteue_expiration': '9999-99-99'})
options.update({'lteenb_host_id': '00-00-00-00-00-00-00-00', 'ltemme_host_id': '00-00-00-00-00-00-00-00', 'lteue_host_id': '00-00-00-00-00-00-00-00'})
else:
options.update({'lteenb_expiration': 'Unknown', 'ltemme_expiration': 'Unknown'})
options.update({'lteenb_host_id': 'Unknown', 'ltemme_host_id': 'Unknown'})
options.update({'lteenb_expiration': 'Unknown', 'ltemme_expiration': 'Unknown', 'lteue_expiration': 'Unknown'})
options.update({'lteenb_host_id': 'Unknown', 'ltemme_host_id': 'Unknown', 'lteue_host_id': 'Unknown'})
try:
for filename in os.listdir(options['license_dir']):
if filename.endswith('.key'):
......
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