Commit e97aef9e authored by Alain Takoudjou's avatar Alain Takoudjou

re6st master: display slave amount in connection parameters

parent c9767ace
......@@ -49,7 +49,9 @@ class Recipe(GenericBaseRecipe):
self.software_release_url = slap_connection['software-release-url']
self.key_file = slap_connection.get('key-file')
self.cert_file = slap_connection.get('cert-file')
self.slave_list = json.loads(options['slave-instance-list'])
options['slave-amount'] = '%s' % len(self.slave_list)
return GenericBaseRecipe.__init__(self, buildout, name, options)
def getSerialFromIpv6(self, ipv6):
......@@ -178,10 +180,9 @@ class Recipe(GenericBaseRecipe):
path_list.append(wrapper)
slave_list = json.loads(self.options['slave-instance-list'])
registry_url = 'http://%s:%s/' % (self.options['ipv4'], self.options['port'])
token_dict, add_token_dict, rm_token_dict = self.generateSlaveTokenList(
slave_list, token_save_path)
self.slave_list, token_save_path)
# write request add token
for reference in add_token_dict:
......
......@@ -204,6 +204,7 @@ port = ${apache-conf:port}
{% do publish_dict.__setitem__('re6stry-url', uri_scheme ~ '://[${apache-conf:ipv6}]:${apache-conf:port}') -%}
{% do publish_dict.__setitem__('re6stry-local-url', 'http://${re6st-registry:ipv4}:${re6st-registry:port}/') -%}
{% do publish_dict.__setitem__('slave-amount', '${re6st-registry:slave-amount}') -%}
[publish]
recipe = slapos.cookbook:publish
{% for name, value in publish_dict.items() -%}
......
......@@ -96,7 +96,7 @@ extra-context =
[template-re6stnet]
< = download-base
filename = instance-re6stnet.cfg.in
md5sum = beaeb547aaff591f9961ff295aadb5f5
md5sum = 3f72b0d5ef63b037e26e742e8eecaa1d
[template-logrotate-base]
< = template-jinja2-base
......
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