コード例 #1
0
ファイル: manage.py プロジェクト: MsiRgb/fuel-web
def action_loaddefault(params):
    from nailgun.db.sqlalchemy import fixman
    from nailgun.logger import logger

    logger.info("Uploading fixture...")
    fixman.upload_fixtures()
    logger.info("Done")
コード例 #2
0
def action_loaddefault(params):
    from nailgun.db.sqlalchemy import fixman
    from nailgun.logger import logger

    logger.info("Uploading fixture...")
    fixman.upload_fixtures()
    logger.info("Done")
コード例 #3
0
ファイル: manage.py プロジェクト: mmalchuk/openstack-fuel-web
def action_loaddefault(params):
    from nailgun.db.sqlalchemy import fixman
    from nailgun.logger import logger

    logger.info("Uploading fixture...")
    fixman.upload_fixtures()
    logger.info("Applying fake deployment tasks to all releases...")
    fixman.load_fake_deployment_tasks()
    logger.info("Done")
コード例 #4
0
def action_loaddefault(params):
    from nailgun.db.sqlalchemy import fixman
    from nailgun.logger import logger

    logger.info("Uploading fixture...")
    fixman.upload_fixtures()
    logger.info("Applying fake deployment tasks to all releases...")
    fixman.load_fake_deployment_tasks()
    logger.info("Done")
コード例 #5
0
ファイル: base.py プロジェクト: Axam/fuel-main
 def clear_nailgun_database():
     from nailgun.db import dropdb
     from nailgun.db import syncdb
     from nailgun.db.sqlalchemy import fixman
     dropdb()
     syncdb()
     fixman.upload_fixtures()
     for fixture in NAILGUN_FIXTURES.split(':'):
         if fixture == '':
             continue
         with open(fixture, "r") as fileobj:
             fixman.upload_fixture(fileobj)
コード例 #6
0
 def clear_nailgun_database():
     from nailgun.db import dropdb
     from nailgun.db import syncdb
     from nailgun.db.sqlalchemy import fixman
     dropdb()
     syncdb()
     fixman.upload_fixtures()
     for fixture in NAILGUN_FIXTURES.split(':'):
         if fixture == '':
             continue
         with open(fixture, "r") as fileobj:
             fixman.upload_fixture(fileobj)
コード例 #7
0
     logger.info("Done")
 elif params.action == "test":
     logger.info("Running tests...")
     from nailgun.unit_test import TestRunner
     TestRunner.run()
     logger.info("Done")
 elif params.action == "loaddata":
     logger.info("Uploading fixture...")
     from nailgun.db.sqlalchemy import fixman
     with open(params.fixture, "r") as fileobj:
         fixman.upload_fixture(fileobj)
     logger.info("Done")
 elif params.action == "loaddefault":
     logger.info("Uploading fixture...")
     from nailgun.db.sqlalchemy import fixman
     fixman.upload_fixtures()
     logger.info("Done")
 elif params.action == "dump_settings":
     sys.stdout.write(settings.dump())
 elif params.action in ("run", ):
     settings.update({
         'LISTEN_PORT': int(params.port),
         'LISTEN_ADDRESS': params.address,
     })
     for attr in [
             'FAKE_TASKS', 'FAKE_TASKS_TICK_COUNT',
             'FAKE_TASKS_TICK_INTERVAL', 'FAKE_TASKS_AMQP'
     ]:
         param = getattr(params, attr.lower())
         if param is not None:
             settings.update({attr: param})
コード例 #8
0
ファイル: manage.py プロジェクト: e0ne/fuel-web
     logger.info("Done")
 elif params.action == "test":
     logger.info("Running tests...")
     from nailgun.unit_test import TestRunner
     TestRunner.run()
     logger.info("Done")
 elif params.action == "loaddata":
     logger.info("Uploading fixture...")
     from nailgun.db.sqlalchemy import fixman
     with open(params.fixture, "r") as fileobj:
         fixman.upload_fixture(fileobj)
     logger.info("Done")
 elif params.action == "loaddefault":
     logger.info("Uploading fixture...")
     from nailgun.db.sqlalchemy import fixman
     fixman.upload_fixtures()
     logger.info("Done")
 elif params.action == "dump_settings":
     sys.stdout.write(settings.dump())
 elif params.action in ("run",):
     settings.update({
         'LISTEN_PORT': int(params.port),
         'LISTEN_ADDRESS': params.address,
     })
     for attr in ['FAKE_TASKS', 'FAKE_TASKS_TICK_COUNT',
                  'FAKE_TASKS_TICK_INTERVAL', 'FAKE_TASKS_AMQP']:
         param = getattr(params, attr.lower())
         if param is not None:
             settings.update({attr: param})
     if params.config_file:
         settings.update_from_file(params.config_file)