(opts)
| 327 | gdata["conf_data"] = json.load(data_file) |
| 328 | |
| 329 | def start_zk_client(opts): |
| 330 | zk_hosts = opts.zk_hosts |
| 331 | if not opts.quiet: |
| 332 | sys.stdout.write("connecting to "+zk_hosts) |
| 333 | gdata["zk_client"] = KazooClient(hosts=zk_hosts) |
| 334 | gdata["zk_client"].start() |
| 335 | res = "SUCCEEDED" if gdata["zk_client"].connected else "FAILED" |
| 336 | if not opts.quiet: |
| 337 | print " [{res}]".format(**locals()) |
| 338 | |
| 339 | def stop_zk_client(): |
| 340 | if gdata["zk_client"].connected: |