def callback(f): parameters = client_authentication_codec.decode_response(f.result()) if parameters["status"] != 0: raise AuthenticationError("Authentication failed.") connection.endpoint = parameters["address"] self.owner_uuid = parameters["owner_uuid"] self.uuid = parameters["uuid"] return connection
def callback(f): parameters = client_authentication_codec.decode_response(f.result()) if parameters["status"] != 0: raise AuthenticationError("Authentication failed.") connection.endpoint = parameters["address"] self.owner_uuid = parameters["owner_uuid"] self.uuid = parameters["uuid"] connection.server_version_str = parameters.get("server_hazelcast_version", "") connection.server_version = calculate_version(connection.server_version_str) return connection