def start(self):
if self.is_host_port_reachable():<EOL><INDENT>self.client = self._kazoo_client(_makehostportlist(self.hostportlist))<EOL><DEDENT>else:<EOL><INDENT>localhostports = self.establish_ssh_tunnel()<EOL>self.client = self._kazoo_client(_makehostportlist(localhostports))<EOL><DEDENT>self.client.start()<EOL>def on_connection_change(state):<EOL><INDENT>"""<STR_LIT>"""<EOL>LOG.info("<STR_LIT>" + state)<EOL><DEDENT>self.client.add_listener(on_connection_change)<EOL>
state Zookeeper