Example #1
0
def main():
    CONF.register_cli_opt(command_opt)
    try:
        default_config_files = cfg.find_config_files('dragon', 'dragon-engine')
        CONF(sys.argv[1:],
             project='dragon',
             prog='dragon-manage',
             version=version.version_info.version_string(),
             default_config_files=default_config_files)
        log.setup("dragon")
        db_api.configure()
    except RuntimeError as e:
        sys.exit("ERROR: %s" % e)

    try:
        CONF.command.func()
    except Exception as e:
        sys.exit("ERROR: %s" % e)
def main():
    CONF.register_cli_opt(command_opt)
    try:
        default_config_files = cfg.find_config_files("dragon", "dragon-engine")
        CONF(
            sys.argv[1:],
            project="dragon",
            prog="dragon-manage",
            version=version.version_info.version_string(),
            default_config_files=default_config_files,
        )
        log.setup("dragon")
        db_api.configure()
    except RuntimeError as e:
        sys.exit("ERROR: %s" % e)

    try:
        CONF.command.func()
    except Exception as e:
        sys.exit("ERROR: %s" % e)
def _get_sql_connection():
    # FIXME .
    db_api.configure()
    return db_api.SQL_CONNECTION
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)
def _get_sql_connection():
    # FIXME .
    db_api.configure()
    return db_api.SQL_CONNECTION
#    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)