Commit 91f8e718 authored by Joanne Hugé's avatar Joanne Hugé

software/ors-amarisoft: publish amarisoft version information

parent a6eaad9a
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 998b5ec0dc8c76736c624af2f96ea94d md5sum = b20044ea71c98ee6e4498c25e4e7f7a2
[amarisoft-stats.jinja2.py] [amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py _update_hash_filename_ = amarisoft-stats.jinja2.py
...@@ -56,15 +56,15 @@ md5sum = 63472d5dc9bd46923d3941b5189e2ccd ...@@ -56,15 +56,15 @@ md5sum = 63472d5dc9bd46923d3941b5189e2ccd
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = c93dea774ecd1bf5aafa318f4f63ece5 md5sum = 6be204217dd3c4ce240184ec31332cd6
[template-gnb] [template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = 9b31059f2636311f06cf66af19819b5e md5sum = e4d8c66c00dc5c022e9208c10e37490e
[template-core-network] [template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg _update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = 2be8604cb3f007a8750d4ad494d09a58 md5sum = 919340a049d628a86838453354c9efa2
[template-ue-lte] [template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg _update_hash_filename_ = instance-ue-lte.jinja2.cfg
......
...@@ -245,6 +245,8 @@ password = {{ slapparameter_dict['monitor-password'] | string }} ...@@ -245,6 +245,8 @@ password = {{ slapparameter_dict['monitor-password'] | string }}
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
core-network-ipv6 = ${slap-configuration:ipv6-random} core-network-ipv6 = ${slap-configuration:ipv6-random}
core-network-ipv4 = {{ lan_ipv4 }} core-network-ipv4 = {{ lan_ipv4 }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[macro.promise] [macro.promise]
......
...@@ -588,6 +588,8 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }} ...@@ -588,6 +588,8 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }} current-rx-gain = {{ ors_version['current-rx-gain'] }}
{% endif %} {% endif %}
current-earfcn = {{ ors_version['current-earfcn'] }} current-earfcn = {{ ors_version['current-earfcn'] }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
{% if ru == "lopcomm" %} {% if ru == "lopcomm" %}
ssh-command = ssh ${user-info:pw-name}@${slap-configuration:ipv6-random} -p ${sshd-port:port} ssh-command = ssh ${user-info:pw-name}@${slap-configuration:ipv6-random} -p ${sshd-port:port}
......
...@@ -277,6 +277,8 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }} ...@@ -277,6 +277,8 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }} current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }} current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
current-nr-band = {{ ors_version['current-nr-band'] }} 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-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter] [monitor-instance-parameter]
......
...@@ -55,6 +55,20 @@ init = ...@@ -55,6 +55,20 @@ init =
options['mme'] = path + "/mme" options['mme'] = path + "/mme"
options['ims'] = path + "/ims" options['ims'] = path + "/ims"
options['ue'] = path + "/ue" 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
[ors-version] [ors-version]
recipe = slapos.recipe.build recipe = slapos.recipe.build
...@@ -247,6 +261,8 @@ extra-context = ...@@ -247,6 +261,8 @@ extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
section ors_version ors-version section ors_version ors-version
section ors_id ors-id section ors_id ors-id
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key enb amarisoft:enb key enb amarisoft:enb
key sdr amarisoft:sdr key sdr amarisoft:sdr
raw enb_template ${enb.jinja2.cfg:target} raw enb_template ${enb.jinja2.cfg:target}
...@@ -283,6 +299,8 @@ extra-context = ...@@ -283,6 +299,8 @@ extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
section ors_version ors-version section ors_version ors-version
section ors_id ors-id section ors_id ors-id
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key enb amarisoft:enb key enb amarisoft:enb
key sdr amarisoft:sdr key sdr amarisoft:sdr
raw gnb_template ${gnb.jinja2.cfg:target} raw gnb_template ${gnb.jinja2.cfg:target}
...@@ -305,6 +323,8 @@ filename = instance-core-network.cfg ...@@ -305,6 +323,8 @@ filename = instance-core-network.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key mme amarisoft:mme key mme amarisoft:mme
raw mme_template ${mme.jinja2.cfg:target} raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target} raw dnsmasq_template ${dnsmasq.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