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
4f8f45a0
Commit
4f8f45a0
authored
Oct 13, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
06abfe87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
+34
-34
No files found.
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
View file @
4f8f45a0
...
...
@@ -4,7 +4,7 @@
{%- set ru_ref = J(jref_of_shared(iru)) %}
{%- set ru = iru['_'] %}
{#- indicate whether
we can connect to RU via
netconf #}
{#- indicate whether
RU is listening for
netconf #}
{{ promise('%s-netconf-socket' % ru_ref) }}
promise = check_socket_listening
...
...
@@ -12,39 +12,6 @@ config-host = ${slap-configuration:tap-ipv6-gateway}
config-port = 830
{#- push firmware to RU #}
[{{ru_ref}}-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
_logbase = ${directory:var}/log/{{ru_ref}}-software
log-output = ${:_logbase}.log
software-reply-json-log-output = ${:_logbase}-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}{{ru_lopcomm_firmware_path}}
is_firmware_updated = ${directory:etc}/{{ru_ref}}.is_firmware_updated
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
key is_firmware_updated :is_firmware_updated
raw firmware_name {{ru_lopcomm_firmware_filename}}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_software_template }}
# XXX -> directory:service ?
output = ${directory:script}/{{ru_ref}}-software.py
{{ promise('%s-firmware' % ru_ref) }}
promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-software-template:is_firmware_updated} ]
{#- monitor state of netconf connection + keep on touching RU watchdog #}
[{{ru_ref}}-supervision-template]
...
...
@@ -82,6 +49,39 @@ promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-supervision-template:is_netconf_connected} ]
{#- push firmware to RU #}
[{{ru_ref}}-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
_logbase = ${directory:var}/log/{{ru_ref}}-software
log-output = ${:_logbase}.log
software-reply-json-log-output = ${:_logbase}-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}{{ru_lopcomm_firmware_path}}
is_firmware_updated = ${directory:etc}/{{ru_ref}}.is_firmware_updated
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
key is_firmware_updated :is_firmware_updated
raw firmware_name {{ru_lopcomm_firmware_filename}}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_software_template }}
# XXX -> directory:service ?
output = ${directory:script}/{{ru_ref}}-software.py
{{ promise('%s-firmware' % ru_ref) }}
promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-software-template:is_firmware_updated} ]
{#- push config to RU #}
{% if ru.get("cu_config_link", None) %}
...
...
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