def do_db_sync():
    """
    Place a database under migration control and upgrade,
    creating first if necessary.
    """
    migration.db_sync(CONF.command.version)
from __future__ import print_function

import sys

from dragon.openstack.common import gettextutils

from oslo.config import cfg
from dragon.openstack.common import log as logging
from dragon.db import api
from dragon.db import migration

gettextutils.install('dragon')

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='dragon', prog='heat-engine')

    api.configure()

    try:
        migration.db_sync()
    except Exception as exc:
        print(str(exc), file=sys.stderr)
        sys.exit(1)
Пример #3
0
def do_db_sync():
    """
    Place a database under migration control and upgrade,
    creating first if necessary.
    """
    migration.db_sync(CONF.command.version)
#    under the License.

from __future__ import print_function

import sys

from dragon.openstack.common import gettextutils

from oslo.config import cfg
from dragon.openstack.common import log as logging
from dragon.db import api
from dragon.db import migration

gettextutils.install('dragon')

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='dragon', prog='heat-engine')

    api.configure()

    try:
        migration.db_sync()
    except Exception as exc:
        print(str(exc), file=sys.stderr)
        sys.exit(1)