(opts)
| 316 | gdata["conf_data"] = json.load(data_file) |
| 317 | |
| 318 | def start_zk_client(opts): |
| 319 | zk_hosts = opts.zk_hosts |
| 320 | if not opts.quiet: |
| 321 | sys.stdout.write("connecting to "+zk_hosts) |
| 322 | gdata["zk_client"] = KazooClient(hosts=zk_hosts) |
| 323 | gdata["zk_client"].start() |
| 324 | res = "SUCCEEDED" if gdata["zk_client"].connected else "FAILED" |
| 325 | if not opts.quiet: |
| 326 | print " [{res}]".format(**locals()) |
| 327 | |
| 328 | def stop_zk_client(): |
| 329 | if gdata["zk_client"].connected: |