Beispiel #1
0
def setup():
    import mox  # pyflakes_bypass   Workaround for bug 810424
    from heat.db import migration
    from heat import db  # pyflakes_bypass review 23102

    reset_db()
    migration.db_sync()
    engine = get_engine()
    conn = engine.connect()
Beispiel #2
0
def setup():
    import mox  # Fail fast if you don't have mox. Workaround for bug 810424

    from heat import db
    from heat.db import migration

    reset_db()
    migration.db_sync()
    engine = get_engine()
    conn = engine.connect()
Beispiel #3
0
def setup():
    import mox  # Fail fast if you don't have mox. Workaround for bug 810424

    from heat import db
    from heat.db import migration

    reset_db()
    migration.db_sync()
    engine = get_engine()
    conn = engine.connect()
Beispiel #4
0
def setup_dummy_db():
    migration.db_sync()
    engine = get_engine()
    engine.connect()
Beispiel #5
0
def do_db_sync():
    """
    Place a database under migration control and upgrade,
    creating first if necessary.
    """
    migration.db_sync(CONF.command.version)
Beispiel #6
0
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from __future__ import print_function

import sys

from oslo.config import cfg

from heat.db import migration
from heat.openstack.common import gettextutils
from heat.openstack.common import log as logging

gettextutils.install('heat')

LOG = logging.getLogger(__name__)


if __name__ == '__main__':
    print('*******************************************', file=sys.stderr)
    print('Deprecated: use heat-manage db_sync instead', file=sys.stderr)
    print('*******************************************', file=sys.stderr)
    cfg.CONF(project='heat', prog='heat-engine')

    try:
        migration.db_sync()
    except Exception as exc:
        print(str(exc), file=sys.stderr)
        sys.exit(1)
Beispiel #7
0
def do_db_sync():
    """
    Place a database under migration control and upgrade,
    creating first if necessary.
    """
    migration.db_sync(CONF.command.version)
Beispiel #8
0
def setup_dummy_db():
    cfg.CONF.set_default('sqlite_synchronous', False)
    session.set_defaults(sql_connection="sqlite://", sqlite_db='heat.db')
    migration.db_sync()
    engine = get_engine()
    engine.connect()