def resync_service_storage(service, resync=False): """ Resync the storage for a service """ connection = get_connection(service) if resync: connection.teardown_schema() connection.setup_schema()
def get_storage_connection(self, **kw): """ Import the storage module for the service that we are going to act on, then return a connection object for that storage module. """ return storage_utils.get_connection(self.svc, self.driver)
def start(self): self.storage_conn = get_connection('rater') super(Service, self).start()
def start(self): self.storage_conn = get_connection('collector') super(Service, self).start()
def get_connection(self, service): return get_connection(service)
def start(self): self.storage_conn = get_connection('central') super(Service, self).start()
'billingstack.central.storage.impl_sqlalchemy', group='central:sqlalchemy') SAMPLES = get_samples() def get_fixture(name, fixture=0, values={}): f = SAMPLES[name][fixture].copy() f.update(values) return f if __name__ == '__main__': service.prepare_service(sys.argv) conn = get_connection('central') samples = get_samples() ctxt = get_admin_context() currencies = {} for c in samples['currency']: currencies[c['name']] = conn.create_currency(ctxt, c) languages = {} for l in samples['language']: languages[l['name']] = conn.create_language(ctxt, l) country_data = { "currency_name": currencies['nok']['name'],
def register_providers(context): conn = get_connection('collector') em = ExtensionManager(Provider.__plugin_ns__) em.map(_register, context, conn)