Example #1
0
    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()
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)
Example #5
0
    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)
Example #6
0
    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()