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