Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove sasl_demo.py

  • Loading branch information...
commit 487aa2600cf929d8b2c0a144a7142bf1babed130 1 parent a1a8862
@thobbs thobbs authored
Showing with 0 additions and 32 deletions.
  1. +0 −32 sasl_demo.py
View
32 sasl_demo.py
@@ -1,32 +0,0 @@
-#!/usr/bin/python
-
-from pycassa.pool import ConnectionPool
-from pycassa.columnfamily import ColumnFamily
-from pycassa.connection import make_sasl_transport_factory
-from pycassa.system_manager import SystemManager
-
-def make_creds(host, port):
- # typically, you would use the passed-in host, but my kerberos test setup
- # is not that sophisticated
- return {'host': 'thobbs-laptop2',
- 'service': 'host',
- 'mechanism': 'GSSAPI'}
-
-transport_factory = make_sasl_transport_factory(make_creds)
-
-sysman = SystemManager(transport_factory=transport_factory)
-if 'Keyspace1' not in sysman.list_keyspaces():
- sysman.create_keyspace('Keyspace1', 'SimpleStrategy', {'replication_factor': '1'})
- sysman.create_column_family('Keyspace1', 'Standard1')
-sysman.close()
-
-pool = ConnectionPool('Keyspace1', transport_factory=transport_factory)
-cf = ColumnFamily(pool, 'Standard1')
-
-for i in range(100):
- cf.insert('key%d' % i, {'col': 'val'})
-
-for i in range(100):
- print 'key%d:' % i, cf.get('key%d' % i)
-
-pool.dispose()
Please sign in to comment.
Something went wrong with that request. Please try again.