@staticmethod
def get_zk(hosts):
    if CenterConfig.USE_ACL:
        default_acl = make_digest_acl(CenterConfig.ZK_USERNAME, CenterConfig.ZK_PASSWORD, all=True)
        zk = KazooClient(hosts=hosts, default_acl=[default_acl], auth_data=[('digest', '{}:{}'.format(CenterConfig.ZK_USERNAME, CenterConfig.ZK_PASSWORD))])
    else:
        zk = KazooClient(hosts=hosts)
    return zk
@staticmethod
def get_zk(hosts):
    if CenterConfig.USE_ACL:
        default_acl = make_digest_acl(CenterConfig.ZK_USERNAME, CenterConfig.ZK_PASSWORD, all=True)
        zk = KazooClient(hosts=hosts, default_acl=[default_acl], auth_data=[('digest', '{}:{}'.format(CenterConfig.ZK_USERNAME, CenterConfig.ZK_PASSWORD))])
    else:
        zk = KazooClient(hosts=hosts)
    return zk