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
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
slapos
Commits
b8ffa4c9
Commit
b8ffa4c9
authored
Jan 17, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
eea23a21
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
+27
-11
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+1
-1
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
+1
-1
software/ors-amarisoft/ru/xbuildout.py
software/ors-amarisoft/ru/xbuildout.py
+1
-1
software/ors-amarisoft/slaplte.jinja2
software/ors-amarisoft/slaplte.jinja2
+24
-8
No files found.
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
b8ffa4c9
...
@@ -625,7 +625,7 @@
...
@@ -625,7 +625,7 @@
bitmap: "110011",
bitmap: "110011",
cdm_type: "fd_cdm2",
cdm_type: "fd_cdm2",
{%- else %}
{%- else %}
{%- do error(icell, "unsupported number of DL antennas") %}
{%- do
i
error(icell, "unsupported number of DL antennas") %}
{%- endif %}
{%- endif %}
},
},
{%- if tdd_config != 3 %}
{%- if tdd_config != 3 %}
...
...
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
View file @
b8ffa4c9
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
{%- set ru = iru['_'] %}
{%- set ru = iru['_'] %}
{%- if len(icell_list) != 1 %}
{%- if len(icell_list) != 1 %}
{%- do error(iru, 'ru/lopcomm supports only 1 cell ; requested %d' % len(icell_list)) %}
{%- do
i
error(iru, 'ru/lopcomm supports only 1 cell ; requested %d' % len(icell_list)) %}
{%- endif %}
{%- endif %}
{%- set icell = icell_list[0] %}
{%- set icell = icell_list[0] %}
{%- set cell = icell['_'] %}
{%- set cell = icell['_'] %}
...
...
software/ors-amarisoft/ru/xbuildout.py
View file @
b8ffa4c9
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
#
#
# Recommended usage of encode in buildout profiles is via B as illustrated below:
# Recommended usage of encode in buildout profiles is via B as illustrated below:
#
#
# {#- B(name)
returns buildout-encoded form of name
#}
# {#- B(name)
escapes name to be safe to use in buildout code.
#}
# {%- set B = xbuildout.encode %}
# {%- set B = xbuildout.encode %}
#
#
# ...
# ...
...
...
software/ors-amarisoft/slaplte.jinja2
View file @
b8ffa4c9
...
@@ -8,6 +8,12 @@
...
@@ -8,6 +8,12 @@
In the code iX denotes shared instance of type X, while X denotes
In the code iX denotes shared instance of type X, while X denotes
parameters passed to iX. For example iru denotes Radio Unit shared
parameters passed to iX. For example iru denotes Radio Unit shared
instance, while ru denotes parameters of that Radio Unit instance.
instance, while ru denotes parameters of that Radio Unit instance.
The following utilities are also provided:
- B escapes string to be safe to use in buildout code.
- J should be used around macro calls to retrieve returned objects.
- ierror reports an error about shared instance.
-#}
-#}
...
@@ -78,7 +84,18 @@
...
@@ -78,7 +84,18 @@
%}
%}
{#- XXX explain #}
{#- B(name) escapes name to be safe to use in buildout code.
It escapes buildout control characters in the string so that the result
could be used in buildout code without the risk of buildout profile to
become broken and/or with injected code when handling string input from
outside.
The most often case when B needs to be used is when handling references of
shared instances in generated buildout code.
See xbuildout.encode documentation for details.
#}
{%- set B = xbuildout.encode %}
{%- set B = xbuildout.encode %}
{#- J is used around macro calls to retrieve returned objects.
{#- J is used around macro calls to retrieve returned objects.
...
@@ -129,10 +146,9 @@
...
@@ -129,10 +146,9 @@
{%- do assert(False, msg) %}
{%- do assert(False, msg) %}
{%- endmacro %}
{%- endmacro %}
{#- error reports an error about shared instance #}
{#- ierror reports an error about shared instance. #}
{#- XXX -> ierror ? #}
{#- XXX ierror(ishared, msg) vvv is debug stub -#}
{#- XXX error(ishared, msg) vvv is debug stub -#}
{%- macro ierror(ishared, msg) %}
{%- macro error(ishared, msg) %}
{%- set msg = 'E: %s: %s\n' % (J(jref_of_shared(ishared)), msg) %}
{%- set msg = 'E: %s: %s\n' % (J(jref_of_shared(ishared)), msg) %}
{%- do assert(False, msg) %}
{%- do assert(False, msg) %}
{%- endmacro %}
{%- endmacro %}
...
@@ -150,7 +166,7 @@
...
@@ -150,7 +166,7 @@
{#- check_loaded_everything verifies that all shared instances were handling during the load. #}
{#- check_loaded_everything verifies that all shared instances were handling during the load. #}
{%- macro check_loaded_everything() %}
{%- macro check_loaded_everything() %}
{%- for ishared in qshared_instance_list %}
{%- for ishared in qshared_instance_list %}
{%- do
error(ishared, "shared instance of unsupported type")
%}
{%- do
ierror(ishared, "shared instance of unsupported type")
%}
{%- endfor %}
{%- endfor %}
{%- endmacro %}
{%- endmacro %}
...
@@ -236,7 +252,7 @@
...
@@ -236,7 +252,7 @@
{%- for _, icell in icell_dict|dictsort %}
{%- for _, icell in icell_dict|dictsort %}
{%- set ru_ref = J(jcell_ru_ref(icell, icell_dict)) %}
{%- set ru_ref = J(jcell_ru_ref(icell, icell_dict)) %}
{%- if ru_ref not in iru_dict %}
{%- if ru_ref not in iru_dict %}
{%- do
error(icell, "referred RU %s does not exist" % ru_ref)
%}
{%- do
ierror(icell, "referred RU %s does not exist" % ru_ref)
%}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endfor %}
...
@@ -273,7 +289,7 @@
...
@@ -273,7 +289,7 @@
{%- set cell_ref = J(jref_of_shared(icell)) %}
{%- set cell_ref = J(jref_of_shared(icell)) %}
{%- if cell_ref in seen %}
{%- if cell_ref in seen %}
{%- for x in seen %}
{%- for x in seen %}
{%- do
error(x, "%s form a cycle via RU references" % seen)
%}
{%- do
ierror(x, "%s form a cycle via RU references" % seen)
%}
{%- endfor %}
{%- endfor %}
{#- XXX what to return ? #}
{#- XXX what to return ? #}
{%- else %}
{%- else %}
...
...
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