Exemple #1
0
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()
Exemple #2
0
 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)
Exemple #3
0
 def start(self):
     self.storage_conn = get_connection('rater')
     super(Service, self).start()
Exemple #4
0
 def start(self):
     self.storage_conn = get_connection('collector')
     super(Service, self).start()
Exemple #5
0
 def get_connection(self, service):
     return get_connection(service)
Exemple #6
0
 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'],
Exemple #8
0
 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)
Exemple #9
0
def register_providers(context):
    conn = get_connection('collector')
    em = ExtensionManager(Provider.__plugin_ns__)
    em.map(_register, context, conn)
Exemple #10
0
def register_providers(context):
    conn = get_connection('collector')
    em = ExtensionManager(Provider.__plugin_ns__)
    em.map(_register, context, conn)