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
Paul Graydon
slapos
Commits
fb39e73d
Commit
fb39e73d
authored
Jul 20, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add template for promise
parent
6aa0adb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+4
-4
software/ors-amarisoft/instance-mme.jinja2.cfg
software/ors-amarisoft/instance-mme.jinja2.cfg
+9
-2
software/ors-amarisoft/promise/check_interface_up.jinja2.py
software/ors-amarisoft/promise/check_interface_up.jinja2.py
+1
-1
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
fb39e73d
...
...
@@ -40,7 +40,7 @@ md5sum = 7d25976008c3aa588527db2b461ad72c
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum =
6b2d5427d8cdea6ac49a305b41bf71c7
md5sum =
eed24ef6943a1f3ab49329c8f8519e93
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
...
...
@@ -72,8 +72,8 @@ md5sum = 36281b03597252cf75169417d02fc28c
[sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.py
md5sum =
f7436ff76fea58e37a401d4712275422
md5sum =
2353f90918ea72df77c5823ed7cbaf77
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py
md5sum =
505efcbe04e717088924f2267b10c2b
9
_update_hash_filename_ = promise/check_interface_up.
jinja2.
py
md5sum =
f2618cb03b163a29c60d37de61a2226
9
software/ors-amarisoft/instance-mme.jinja2.cfg
View file @
fb39e73d
...
...
@@ -150,10 +150,17 @@ password = {{ slapparameter_dict['monitor-password'] | string }}
recipe = slapos.cookbook:publish.serialised
epc-ip = ${slap-configuration:ipv6-random}
[tun-up-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ interface_up_promise }}
output = ${directory:etc}/check-tun-up.py
extensions = jinja2.ext.do
context =
section slap_configuration slap-configuration
# Add custom promise to check if /dev/sdr0 is busy
[tun-up-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file =
{{ interface_up_promise }
}
file =
${tun-up-promise-template:output
}
output = ${directory:plugins}/check-tun-up.py
config-ifname = "slaptun0"
software/ors-amarisoft/promise/check_interface_up.py
→
software/ors-amarisoft/promise/check_interface_up.
jinja2.
py
View file @
fb39e73d
...
...
@@ -27,7 +27,7 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
ifname
=
self
.
getConfig
(
'ifname'
)
ifname
=
"{{ slap_configuration.get('tun-name', 'tun0') }}"
# f = open('/sys/class/net/%s/operstate' % ifname, 'r')
# if f.read() == 'up\n':
...
...
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