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
106
Merge Requests
106
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
2a8fb1e4
Commit
2a8fb1e4
authored
Oct 24, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0354a097
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+3
-3
software/ors-amarisoft/config/dnsmasq-enb.jinja2.cfg
software/ors-amarisoft/config/dnsmasq-enb.jinja2.cfg
+1
-0
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+1
-1
software/ors-amarisoft/ru/libinstance.jinja2.cfg
software/ors-amarisoft/ru/libinstance.jinja2.cfg
+17
-1
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
2a8fb1e4
...
...
@@ -28,7 +28,7 @@ md5sum = 07e6e578c88062a15d9bb4ceae27d5fa
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum =
0d6552b13d87f89f8e5df0d4821ae3c8
md5sum =
63701da67c30199ec7b7b2743b7cdfe4
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
...
...
@@ -88,7 +88,7 @@ md5sum = 4855e1b8dbc6fee88a16cefc39e96693
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
1fb7bb19dc2a5aee2494253d83d3527
3
md5sum =
cfd86f44a21903aed6d86abaf1bf316
3
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
...
...
@@ -145,7 +145,7 @@ md5sum = f167b4be5e327b276b42267e0678f577
[dnsmasq-enb.jinja2.cfg]
filename = config/dnsmasq-enb.jinja2.cfg
md5sum =
e2b415046926d9a9ef542816dd86eefb
md5sum =
fa3598d521ba603960eeeef190be788d
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
...
...
software/ors-amarisoft/config/dnsmasq-enb.jinja2.cfg
View file @
2a8fb1e4
{%- for (ru_ref, iru) in iru_dict|dictsort | selectattr('1._.cpri_link', 'defined') %}
{%- set ru = iru['_'] %}
{%- set ru_tap = ru.cpri_link._tap %}
{%- set vtap = json_module.loads(vtap_jdict[ru_tap]) %}
# {{ ru_ref }} @ {{ ru_tap }}
dhcp-leasefile={{ directory['etc'] }}/dnsmasq.leases
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
2a8fb1e4
...
...
@@ -147,7 +147,7 @@ context =
import json_module json
import netaddr netaddr
section directory directory
section vtap
vtap
section vtap
_jdict vtap_jdict
json iru_dict {{ rulib.iru_dict | tojson }}
[dnsmasq-service]
...
...
software/ors-amarisoft/ru/libinstance.jinja2.cfg
View file @
2a8fb1e4
...
...
@@ -55,6 +55,7 @@ config-testing = {{ slapparameter_dict.get("testing", False) }}
{#- split slapos tap interface for each RU that needs its own tap.
fallback to non-split approach for ntap <= 1 to avoid hard-dependecy on setcap/tapsplit #}
{%- set ntap = len(list(iru_dict|dictsort | selectattr('1._.cpri_link', 'defined'))) %}
{%- set vtap_list = [] %}
[vtap]
recipe = plone.recipe.command
ntap = {{ ntap }}
...
...
@@ -68,6 +69,7 @@ ntap = 0
stop-on-error = false
{%- if ntap == 1 %}
{%- do vtap_list.append('{{ slaplte.tap }}') %}
[vtap.{{ slaplte.tap }}]
network = {{ slap_configuration['tap-ipv6-network'] }}
gateway = {{ slap_configuration['tap-ipv6-gateway'] }}
...
...
@@ -78,8 +80,9 @@ addr = {{ slap_configuration['tap-ipv6-addr'] }}
{%- for i in range(1,ntap+1) %}
{%- set tap = '%s-%d' % (slaplte.tap, i) %}
{%- do vtap_list.append(tap) %}
[vtap.{{ tap }}]
recip
t
= slapos.recipe.build
recip
e
= slapos.recipe.build
init =
tapsplit = __import__('{{ ru_tapsplit }}')
net = tapsplit.ifnet6('{{ tap }}')
...
...
@@ -91,6 +94,19 @@ init =
{%- endif %}
# vtap_jdict maps tapname -> json(interface-info)
[vtap_jdict]
recipe = slapos.recipe.build
depends = {% for tap in vtap_list %} ${vtap.{{tap}}:recipe} {% endfor %}
init =
import json
{%- for tap in vtap_list %}
tap = self.buildout['vtap.{{tap}}']
tap = {k: tap[k] for k in ('network', 'gateway', 'addr')}
options['{{tap}}'] = json.dumps(tap)
{%- endfor %}
...
...
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