slave_instance is dict

Use it as dict and not as instance object
parent ee8e92db
...@@ -107,12 +107,12 @@ class Recipe(BaseSlapRecipe): ...@@ -107,12 +107,12 @@ class Recipe(BaseSlapRecipe):
) )
url = 'https://%s:%s/%s/vnc_auto.html?host=%s&port=%s&encrypt=1&path=%s' % ( url = 'https://%s:%s/%s/vnc_auto.html?host=%s&port=%s&encrypt=1&path=%s' % (
# XXX-Cedric : uh? how to fetch slave reference? # XXX-Cedric : uh? how to fetch slave reference?
slave_frontend.getParameter('domainname'), slave_frontend.get('connection_xml').getParameter('domainname'),
slave_frontend.getParameter('port'), slave_frontend.get('connection_xml').getParameter('port'),
slave_frontend.get('reference'), slave_frontend.get('slave_reference'),
slave_frontend.getParameter('domainname'), slave_frontend.get('connection_xml').getParameter('domainname'),
slave_frontend.getParameter('port'), slave_frontend.get('connection_xml').getParameter('port'),
slave_frontend.get('reference')) slave_frontend.get('slave_reference'))
connection_dict = dict( connection_dict = dict(
url = url, url = url,
backend_url = ipv6_url, backend_url = ipv6_url,
......
...@@ -109,22 +109,19 @@ class Recipe(BaseSlapRecipe): ...@@ -109,22 +109,19 @@ class Recipe(BaseSlapRecipe):
rewrite_rule_list=rewrite_rule_list, rewrite_rule_list=rewrite_rule_list,
key=key, certificate=certificate) key=key, certificate=certificate)
for reference, url in slave_dict.iteritems():
self.setConnectionDict(dict(site_url=url), reference)
# Send connection parameters of master instance # Send connection parameters of master instance
self.setConnectionDict( self.setConnectionDict(
dict(site_url=node_parameter_dict['site_url'], dict(site_url=node_parameter_dict['site_url'],
domain_ipv6_address=self.getGlobalIPv6Address())) domain_ipv6_address=self.getGlobalIPv6Address()))
# Send connection parameters of slave instances # Send connection parameters of slave instances
for slave_instance in slave_instance_list: for slave_instance in slave_dict.iteritems():
slave_site_url = '%s%s' % (node_parameter_dict['site_url'], slave_site_url = '%s%s' % (node_parameter_dict['site_url'],
# XXX-Cedric reference?
slave_instance.get('reference')) slave_instance.get('reference'))
slave_instance.setConnectionDict( self.setConnectionDict(
dict(site_url=slave_site_url, dict(site_url=slave_site_url,
domainname=frontend_domain_name), domainname=frontend_domain_name,
port=frontend_port_number) port=frontend_port_number),
slave_instance.get('slave_reference'))
return self.path_list return self.path_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