Commit 4f8f45a0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 06abfe87
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{%- set ru_ref = J(jref_of_shared(iru)) %} {%- set ru_ref = J(jref_of_shared(iru)) %}
{%- set ru = 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('%s-netconf-socket' % ru_ref) }}
promise = check_socket_listening promise = check_socket_listening
...@@ -12,39 +12,6 @@ config-host = ${slap-configuration:tap-ipv6-gateway} ...@@ -12,39 +12,6 @@ config-host = ${slap-configuration:tap-ipv6-gateway}
config-port = 830 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 #} {#- monitor state of netconf connection + keep on touching RU watchdog #}
[{{ru_ref}}-supervision-template] [{{ru_ref}}-supervision-template]
...@@ -82,6 +49,39 @@ promise = check_command_execute ...@@ -82,6 +49,39 @@ promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-supervision-template:is_netconf_connected} ] 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 #} {#- push config to RU #}
{% if ru.get("cu_config_link", None) %} {% if ru.get("cu_config_link", None) %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment