Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
ffcd018d
Commit
ffcd018d
authored
Nov 22, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: put amarisoft section in instance-amarisoft-base
parent
275ef4b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
35 deletions
+27
-35
software/simpleran/buildout.hash.cfg
software/simpleran/buildout.hash.cfg
+4
-0
software/simpleran/instance-core-network.jinja2.cfg
software/simpleran/instance-core-network.jinja2.cfg
+2
-0
software/simpleran/instance-enb.jinja2.cfg
software/simpleran/instance-enb.jinja2.cfg
+4
-2
software/simpleran/instance-ue.jinja2.cfg
software/simpleran/instance-ue.jinja2.cfg
+2
-0
software/simpleran/instance.cfg
software/simpleran/instance.cfg
+12
-33
software/simpleran/software.cfg
software/simpleran/software.cfg
+3
-0
No files found.
software/simpleran/buildout.hash.cfg
View file @
ffcd018d
...
...
@@ -78,6 +78,10 @@ md5sum = dab992c02a363e00cdc86f102a7ae489
_update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = 0c387a13a57f7270595b74e11be8eb36
[template-amarisoft-base]
_update_hash_filename_ = instance-amarisoft-base.jinja2.cfg
md5sum = b116b58365600f12129d458750b57c71
[template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg
md5sum = c5f581ba01654b2aec46000abf8d0e35
...
...
software/simpleran/instance-core-network.jinja2.cfg
View file @
ffcd018d
...
...
@@ -101,6 +101,8 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% include 'instance-amarisoft-base.jinja2.cfg' %}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
...
...
software/simpleran/instance-enb.jinja2.cfg
View file @
ffcd018d
...
...
@@ -45,6 +45,8 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% include 'instance-amarisoft-base.jinja2.cfg' %}
{%- set icell_kind='enb' %}
{%- import 'slaplte.jinja2' as slaplte with context %}
{%- import 'ru_libinstance.jinja2.cfg' as rulib with context %}
...
...
@@ -307,8 +309,8 @@ websocket-port = 443
websocket-password = ${websocket-password:passwd}
enb-ipv6 = {{ my_ipv6 }}
enb-ipv4 = {{ lan_ipv4 }}
amarisoft-version =
{{ lte_version }}
license-expiration =
{{ lte_expiration }}
amarisoft-version =
amarisoft:lte-version
license-expiration =
amarisoft:lte-expiration
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
ru-list = {{ dumps(rulib.iru_dict.keys() | sort) }}
cell-list = {{ dumps(rulib.icell_dict.keys() | sort) }}
...
...
software/simpleran/instance-ue.jinja2.cfg
View file @
ffcd018d
...
...
@@ -24,6 +24,8 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% include 'instance-amarisoft-base.jinja2.cfg' %}
{%- set icell_kind='ue' %}
{%- import 'slaplte.jinja2' as slaplte with context %}
{%- import 'ru_libinstance.jinja2.cfg' as rulib with context %}
...
...
software/simpleran/instance.cfg
View file @
ffcd018d
...
...
@@ -80,38 +80,6 @@ init =
assert 'xbuildout' not in sys.modules
sys.modules['xbuildout'] = xbuildout
[amarisoft]
recipe = slapos.recipe.build
init =
import os, re
try:
lte_version = sorted(filter(lambda x: re.match(r"v[0-9]{4}-[0-9]{2}-[0-9]{2}", x), os.listdir('/opt/amarisoft')))[-1][1:]
except FileNotFoundError:
lte_version = 'LTEVERSION'
path = "/opt/amarisoft/v" + lte_version
options['lte-version'] = lte_version
options['path'] = path
options['sdr'] = path + "/trx_sdr"
options['enb'] = path + "/enb"
options['mme'] = path + "/mme"
options['ims'] = path + "/mme"
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
[lan-ip]
recipe = slapos.recipe.build
init =
...
...
@@ -142,6 +110,12 @@ enb = dynamic-template-enb:output
core-network = dynamic-template-core-network:output
ue = dynamic-template-ue:output
[dynamic-template-amarisoft-base]
< = jinja2-template-base
url = ${template-amarisoft-base:target}
filename = instance-amarisoft-base.cfg
extensions = jinja2.ext.do
[dynamic-template-enb]
< = jinja2-template-base
url = ${template-enb:target}
...
...
@@ -170,6 +144,8 @@ extra-context =
raw fluent_bit_location ${fluent-bit:location}
raw openssh_location ${openssh:location}
raw openssh_output_keygen ${openssh-output:keygen}
import-list +=
rawfile instance-amarisoft-base.jinja2.cfg ${template-amarisoft-base:target}
[dynamic-template-core-network]
< = jinja2-template-base
...
...
@@ -194,6 +170,8 @@ extra-context =
raw dnsmasq_location ${dnsmasq:location}
key slave_instance_list slap-configuration:slave-instance-list
section slap_configuration slap-configuration
import-list +=
rawfile instance-amarisoft-base.jinja2.cfg ${template-amarisoft-base:target}
[dynamic-template-ue]
< = jinja2-template-base
...
...
@@ -208,7 +186,6 @@ extra-context =
raw ue_template ${ue.jinja2.cfg:target}
raw slaplte_template ${slaplte.jinja2:target}
raw openssl_location ${openssl:location}
raw ru_amarisoft_stats_template ${ru_amarisoft-stats.jinja2.py:target}
raw ru_amarisoft_rf_info_template ${ru_amarisoft-rf-info.jinja2.py:target}
raw ru_tapsplit ${ru_tapsplit:target}
...
...
@@ -217,3 +194,5 @@ extra-context =
raw dnsmasq_location ${dnsmasq:location}
raw openssh_location ${openssh:location}
raw openssh_output_keygen ${openssh-output:keygen}
import-list +=
rawfile instance-amarisoft-base.jinja2.cfg ${template-amarisoft-base:target}
software/simpleran/software.cfg
View file @
ffcd018d
...
...
@@ -72,6 +72,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-ue]
<= download-base
[template-amarisoft-base]
<= download-base
[template-obsolete]
<= download-base
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment