Commit 4d3b16f4 authored by Paul Graydon's avatar Paul Graydon

software/wendelin-telecom: Add slave gateway-host connection parameter

parent 7e1714f5
...@@ -4,4 +4,4 @@ md5sum = 79e4a9d4c632eaf0472929464a12e768 ...@@ -4,4 +4,4 @@ md5sum = 79e4a9d4c632eaf0472929464a12e768
[template-wendelin-telecom] [template-wendelin-telecom]
filename = instance-wendelin-telecom.cfg.in filename = instance-wendelin-telecom.cfg.in
md5sum = 69a3e01ed92feda544ec2519746a5d49 md5sum = f52ac49e933d6144aa319f2525d14108
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
"properties": {} "properties": {
"gateway-host": {
"description": "Address of the instance's fluentd gateway",
"type": "string"
}
}
} }
...@@ -11,6 +11,7 @@ slave-instance-list = {{ dumps(slave_instance_list) }} ...@@ -11,6 +11,7 @@ slave-instance-list = {{ dumps(slave_instance_list) }}
site-id = ${publish:site-id} site-id = ${publish:site-id}
inituser-login = ${publish:inituser-login} inituser-login = ${publish:inituser-login}
inituser-password = ${publish-early:inituser-password} inituser-password = ${publish-early:inituser-password}
gateway-host = {{ slapparameter_dict.get("gateway-host", "") }}
update = update =
import json import json
import logging import logging
...@@ -47,6 +48,7 @@ update = ...@@ -47,6 +48,7 @@ update =
wendelin_telecom_site_id = options['site-id'] wendelin_telecom_site_id = options['site-id']
inituser_login = options['inituser-login'] inituser_login = options['inituser-login']
inituser_password = options['inituser-password'] inituser_password = options['inituser-password']
fluentd_gateway_host = options['gateway-host']
for slave in self.slave_instance_list: for slave in self.slave_instance_list:
slave_reference = slave['slave_reference'] slave_reference = slave['slave_reference']
...@@ -68,6 +70,8 @@ update = ...@@ -68,6 +70,8 @@ update =
log.info(error_msg) log.info(error_msg)
else: else:
log.info("ORS successfully registered: %s" % slave_reference) log.info("ORS successfully registered: %s" % slave_reference)
log.info("Update parameters for %s" % slave_reference)
computer_partition.setConnectionDict({'gateway-host': str(fluentd_gateway_host)}, slave_reference),
[publish] [publish]
slave-amount = {{ len(slave_instance_list) }} slave-amount = {{ len(slave_instance_list) }}
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