Permalink
Browse files

Rename sasl_host/service to just host/service

  • Loading branch information...
1 parent 4475ff2 commit b8951ec9bf4fe082464c49db9da4f5338b453645 @thobbs thobbs committed Oct 9, 2012
Showing with 7 additions and 7 deletions.
  1. +5 −5 pycassa/connection.py
  2. +2 −2 sasl_demo.py
View
@@ -64,14 +64,13 @@ class TSaslClientTransport(TTransportBase, CReadableTransport):
ERROR = 4
COMPLETE = 5
- def __init__(self, transport, sasl_host, sasl_service,
+ def __init__(self, transport, host, service,
mechanism='GSSAPI', **sasl_kwargs):
from puresasl.client import SASLClient
self.transport = transport
- self.sasl = SASLClient(
- sasl_host, sasl_service, mechanism, **sasl_kwargs)
+ self.sasl = SASLClient(host, service, mechanism, **sasl_kwargs)
self.__wbuf = StringIO()
self.__rbuf = StringIO()
@@ -172,8 +171,9 @@ def make_sasl_transport_factory(credential_factory):
Example usage::
>>> def make_credentials(host, port):
- ... return {'sasl_host': host,
- ... 'sasl_service': 'cassandra',
+ ... return {'host': host,
+ ... 'service': 'cassandra',
+ ... 'principal': 'user/role@FOO.EXAMPLE.COM',
... 'mechanism': 'GSSAPI'}
>>>
>>> factory = make_sasl_transport_factory(make_credentials)
View
@@ -8,8 +8,8 @@
def make_creds(host, port):
# typically, you would use the passed-in host, but my kerberos test setup
# is not that sophisticated
- return {'sasl_host': 'thobbs-laptop',
- 'sasl_service': 'host',
+ return {'host': 'thobbs-laptop2',
+ 'service': 'host',
'mechanism': 'GSSAPI'}
transport_factory = make_sasl_transport_factory(make_creds)

0 comments on commit b8951ec

Please sign in to comment.