def setUp(self): prefix = str(uuid.uuid4())[:8] cf_defs = CassandraProvisionerStore.get_column_families(prefix=prefix) ks = cassandra.get_keyspace(cf_defs) self.cassandra_mgr = CassandraSchemaManager(ks) yield self.cassandra_mgr.create() host, port = cassandra.get_host_port() username, password = cassandra.get_credentials() self.store = CassandraProvisionerStore(host, port, username, password, keyspace=ks.name, prefix=prefix) self.store.connect()
def setup_store(self): prefix=str(uuid.uuid4())[:8] username, password = cassandra.get_credentials() host, port = cassandra.get_host_port() cf_defs = CassandraProvisionerStore.get_column_families(prefix=prefix) ks = cassandra.get_keyspace(cf_defs) self.cassandra_mgr = cassandra.CassandraSchemaManager(ks) yield self.cassandra_mgr.create() store = provisioner.get_cassandra_store(host, username, password, ks.name, port=port, prefix=prefix) defer.returnValue(store)
def setup(self): cf_defs = CassandraControllerStore.get_column_families() ks = cassandra.get_keyspace(cf_defs) self.cassandra_manager = cassandra.CassandraSchemaManager(ks) yield self.cassandra_manager.create() controller_name = str(uuid.uuid4())[:8] host, port = cassandra.get_host_port() username, password = cassandra.get_credentials() self.store = CassandraControllerStore(controller_name, host, port, username, password, ks.name, CoreInstance, SensorItem) self.store.initialize() self.store.activate() defer.returnValue(self.store)
def setup_store(self): prefix = str(uuid.uuid4())[:8] username, password = cassandra.get_credentials() host, port = cassandra.get_host_port() cf_defs = CassandraProvisionerStore.get_column_families(prefix=prefix) ks = cassandra.get_keyspace(cf_defs) self.cassandra_mgr = cassandra.CassandraSchemaManager(ks) yield self.cassandra_mgr.create() store = provisioner.get_cassandra_store(host, username, password, ks.name, port=port, prefix=prefix) defer.returnValue(store)