Ejemplo n.º 1
0
 def __init__(self,
              iprot_factory,
              oprot_factory=None,
              keyspace=None,
              **sasl_kwargs):
     ThriftSASLClientProtocol.__init__(self, Cassandra.Client,
                                       iprot_factory, oprot_factory,
                                       **sasl_kwargs)
     ManagedThriftClientProtocol.__init__(self, iprot_factory,
                                          oprot_factory, keyspace)
Ejemplo n.º 2
0
 def connectionMade(self):
     # Get host-specific creds so we can properly # create the sasl client
     peer = self.transport.getPeer()
     sasl_kwargs = yield defer.maybeDeferred(self.sasl_cred_factory, peer.host, peer.port)
     self.createSASLClient(**sasl_kwargs)
     try:
         yield ThriftSASLClientProtocol.connectionMade(self)
     except Exception, exc:
         self.transport.loseConnection()
         self.factory.clientConnectionFailed(self.factory.connector, failure.Failure(exc))
Ejemplo n.º 3
0
 def connectionMade(self):
     # Get host-specific creds so we can properly # create the sasl client
     peer = self.transport.getPeer()
     sasl_kwargs = yield defer.maybeDeferred(self.sasl_cred_factory,
                                             peer.host, peer.port)
     self.createSASLClient(**sasl_kwargs)
     try:
         yield ThriftSASLClientProtocol.connectionMade(self)
     except Exception, exc:
         self.transport.loseConnection()
         self.factory.clientConnectionFailed(self.factory.connector,
                                             failure.Failure(exc))
Ejemplo n.º 4
0
 def __init__(self, iprot_factory, oprot_factory=None, keyspace=None, **sasl_kwargs):
     ThriftSASLClientProtocol.__init__(self, Cassandra.Client,
             iprot_factory, oprot_factory, **sasl_kwargs)
     ManagedThriftClientProtocol.__init__(self, iprot_factory, oprot_factory, keyspace)
Ejemplo n.º 5
0
 def __init__(self, sasl_cred_factory):
     ThriftSASLClientProtocol.__init__(self, Cassandra.Client,
                                       self.thriftFactory())
     self.sasl_cred_factory = sasl_cred_factory
Ejemplo n.º 6
0
 def __init__(self, sasl_cred_factory):
     ThriftSASLClientProtocol.__init__(self, Cassandra.Client,
                                       self.thriftFactory())
     self.sasl_cred_factory = sasl_cred_factory