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 get_epu_keyspace_definition(): """Gathers column family definitions from EPU components """ name = get_keyspace_name() from epu.provisioner.store import CassandraProvisionerStore provisioner_cfs = CassandraProvisionerStore.get_column_families(name) from epu.epucontroller.controller_store import CassandraControllerStore controller_cfs = CassandraControllerStore.get_column_families(name) all_cfs = [] all_cfs.extend(provisioner_cfs) all_cfs.extend(controller_cfs) return get_keyspace(all_cfs)
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)