Ejemplo n.º 1
0
 def _generate_schema_w_migrations(cls, engine):
     alembic_configs = migration.get_alembic_configs()
     with engine.connect() as conn:
         for alembic_config in alembic_configs:
             alembic_config.attributes['connection'] = conn
             alembic_config.neutron_config = cfg.CONF
             alembic_config.neutron_config.set_override(
                 'connection', str(engine.url), group='database')
             migration.do_alembic_command(
                 alembic_config, 'upgrade', 'heads')
Ejemplo n.º 2
0
 def _generate_schema_w_migrations(cls, engine):
     alembic_configs = migration.get_alembic_configs()
     with engine.connect() as conn:
         for alembic_config in alembic_configs:
             alembic_config.attributes['connection'] = conn
             alembic_config.neutron_config = cfg.CONF
             alembic_config.neutron_config.set_override(
                 'connection', str(engine.url), group='database')
             migration.do_alembic_command(
                 alembic_config, 'upgrade', 'heads')
Ejemplo n.º 3
0
 def db_sync(self, engine):
     cfg.CONF.set_override('connection', engine.url, group='database')
     for conf in migration.get_alembic_configs():
         self.alembic_config = conf
         self.alembic_config.neutron_config = cfg.CONF
         migration.do_alembic_command(conf, 'upgrade', 'heads')
 def db_sync(self, engine):
     cfg.CONF.set_override('connection', engine.url, group='database')
     for conf in migration.get_alembic_configs():
         self.alembic_config = conf
         self.alembic_config.neutron_config = cfg.CONF
         migration.do_alembic_command(conf, 'upgrade', 'heads')
    def setUp(self):
        super(TestSanityCheck, self).setUp()

        for conf in migration.get_alembic_configs():
            self.alembic_config = conf
            self.alembic_config.neutron_config = cfg.CONF
 def db_sync(self, engine):
     cfg.CONF.set_override("connection", engine.url, group="database")
     for conf in migration.get_alembic_configs():
         self.alembic_config = conf
         self.alembic_config.neutron_config = cfg.CONF
         migration.do_alembic_command(conf, "upgrade", "heads")