@classmethod
    def factory(cls, host, timeout, *args, **kwargs):
        start = time.time()
        kwargs['connect_timeout'] = timeout
        conn = cls(host, *args, **kwargs)
        elapsed = time.time() - start
        conn.connected_event.wait(timeout - elapsed)
        if conn.last_error:
            if conn.is_unsupported_proto_version:
                raise ProtocolVersionUnsupported(host, conn.protocol_version)
            raise conn.last_error
        elif not conn.connected_event.is_set():
            conn.close()
            raise OperationTimedOut("Timed out creating connection (%s seconds)" % timeout)
        else:
            return conn
Test for return currently configured routes from routing table
dataset/ETHPy150Open datastax/python-driver/cassandra/connection.py/Connection.factory--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/network_test.py/NetworkTestCase.test_routes