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
7a8f604d
Commit
7a8f604d
authored
Aug 23, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4b896eeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+8
-2
No files found.
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
7a8f604d
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
{#- XXX what to return ? #}
{#- XXX what to return ? #}
{%- else %}
{%- else %}
{%- do seen.append(cell_ref) %}
{%- do seen.append(cell_ref) %}
{%- set ru =
J(cell['_'])['ru']
%}
{%- set ru =
cell['_']['ru']
%}
{%- if ru['ru_type'] == 'ru_ref' %}
{%- if ru['ru_type'] == 'ru_ref' %}
{{- ru['ru_ref'] | tojson }}
{{- ru['ru_ref'] | tojson }}
{%- elif ru['ru_type'] == 'ruincell_ref' %}
{%- elif ru['ru_type'] == 'ruincell_ref' %}
...
@@ -57,11 +57,13 @@
...
@@ -57,11 +57,13 @@
{#- cell_dict keeps cell slave instances: reference -> cell #}
{#- cell_dict keeps cell slave instances: reference -> cell #}
{#- ru_dict keeps RU slave instances + RU whose definition is embedded into a cell: reference -> RU #}
{#- ru_dict keeps RU slave instances + RU whose definition is embedded into a cell: reference -> RU #}
{#- in the kept instances _ is automatically json-decoded #}
{%- set cell_dict = {} %}
{%- set cell_dict = {} %}
{%- set ru_dict = {} %}
{%- set ru_dict = {} %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- set _ = J(slave['_']) %}
{%- do slave.update({'_': _}) %}
{%- if 'ru_type' in _ %}
{%- if 'ru_type' in _ %}
{%- do ru_dict.update({ref: slave}) %}
{%- do ru_dict.update({ref: slave}) %}
{%- elif 'cell_type' in _ %}
{%- elif 'cell_type' in _ %}
...
@@ -69,7 +71,11 @@
...
@@ -69,7 +71,11 @@
{%- set ru = _['ru'] %}
{%- set ru = _['ru'] %}
{%- if ru['ru_type'] not in ('ru_ref', 'ruincell_ref') %}
{%- if ru['ru_type'] not in ('ru_ref', 'ruincell_ref') %}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{%- do ru_dict.update({'_%s_ru' % ref: ru}) %}
{%- do ru_dict.update({'_%s_ru' % ref: {
'_': ru,
'slave_title': '%s. RU' % slave['slave_title'],
'slave_reference': slave['slave_reference'],
}}) %}
{%- endif %}
{%- endif %}
{%- else %}
{%- else %}
{%- do error(slave, "unknown shared instance type") %}
{%- do error(slave, "unknown shared instance type") %}
...
...
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