Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
e92da066
Commit
e92da066
authored
Oct 20, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6a81e608
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
software/ors-amarisoft/amari/lte.jinja2
software/ors-amarisoft/amari/lte.jinja2
+1
-11
software/ors-amarisoft/amari/slap.jinja2
software/ors-amarisoft/amari/slap.jinja2
+11
-2
No files found.
software/ors-amarisoft/amari/lte.jinja2
View file @
e92da066
...
...
@@ -70,17 +70,7 @@
cpri_rx_delay: "{{ vcpri | map(attribute='rx_delay') | map('default', '') | join(',') }}",
cpri_tx_delay: "{{ vcpri | map(attribute='tx_delay') | map('default', '') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='tx_dbm') | map('default', '') | join(',') }}",
{%- set tap_base = slap_configuration.get('tap-name', '') %}
{%- set vtap = ['']*len(dev_argv) %}
{%- for i, (dev, _) in enumerate(ru_cpri_dict|dictsort) %}
{%- if len(ru_cpri_dict) > 1 %}
{%- set tap = "%s-%d" % (tap_base, i+1) %}
{%- else %}
{%- set tap = tap_base %}
{%- endif %}
{%- do vtap.__setitem__(dev, tap) %}
{%- endfor %}
ifname: "{{ vtap | join(',') }}",
ifname: "{{ vcpri | map(attribute='_tap') | map('default', '') | join(',') }}",
{%- endif %}
},
...
...
software/ors-amarisoft/amari/slap.jinja2
View file @
e92da066
...
...
@@ -233,8 +233,17 @@
{%- endfor %}
{#- assign TAP interfaces to cpri RUs #}
{%- set iru_vcpri = list(iru_dict.values() | selectattr('_.ru_link_type', '==', 'cpri')) %}
{%- do print('ncpri:'), pprint(len(iru_vcpri)) %}
{%- set iru_vcpri = list(iru_dict|dictsort | selectattr('1._.ru_link_type', '==', 'cpri')) %}
{%- do print('ncpri:'), pprint(len(iru_vcpri)) %}
{%- set tap_base = slap_configuration.get('tap-name', '') %}
{%- for i, (ru_ref, iru) in enumerate(iru_vcpri) %}
{%- if len(iru_vcpri) > 1 %}
{%- set tap = "%s-%d" % (tap_base, i+1) %}
{%- else %}
{%- set tap = tap_base %}
{%- endif %}
{%- do iru._.cpri_link.update({'_tap': tap}) %}
{%- endfor %}
{%- endmacro %}
...
...
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