Example #1
0
])


# initialize config
from fabkit import util, env
from fabkit.conf import conf_base, conf_fabric, conf_web, conf_test  # noqa

log_file = None
tasks = env.tasks
if len(tasks) > 0:
    if tasks[0] == 'agent':
        log_file = 'agent.log'
    elif tasks[0] == 'agent_central':
        log_file = 'agent-central.log'

conf_base.init(REPO_DIR, log_file)
conf_fabric.init()

util.create_required_dirs()
util.event_handler.init()
# util.git_clone_required_fablib()


# register fabric tasks
from node import node, nodestr  # noqa
from setup import setup, manage, check  # noqa
from job import job  # noqa
from databag import databag  # noqa
from runserver import runserver  # noqa
from agent import agent, agent_central, agent_manager  # noqa
from fabtest import test  # noqa
Example #2
0
from alembic import context
# from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig

# for oslo
from oslo_config import cfg
from oslo_db.sqlalchemy import session

import os
import sys
ALEMBIC_DIR = os.path.dirname(os.path.abspath(__file__))
CORE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(ALEMBIC_DIR)))
REPO_DIR = os.path.dirname(os.path.dirname(CORE_DIR))
sys.path.extend([CORE_DIR])
from fabkit.conf import conf_base
conf_base.init(REPO_DIR)

CONF = cfg.CONF

db_dir = os.path.join(os.path.dirname(__file__), '../')
sys.path.extend([db_dir])

from pdns.impl_sqlalchemy.models import Base
target_metadata = Base.metadata


# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config

# Interpret the config file for Python logging.
Example #3
0
    REPO_DIR,
])

# initialize config
from fabkit import util, env
from fabkit.conf import conf_base, conf_fabric, conf_web, conf_test  # noqa

log_file = None
tasks = env.tasks
if len(tasks) > 0:
    if tasks[0] == 'agent':
        log_file = 'agent.log'
    elif tasks[0] == 'agent_central':
        log_file = 'agent-central.log'

conf_base.init(REPO_DIR, log_file)
conf_fabric.init()

util.create_required_dirs()
util.event_handler.init()
# util.git_clone_required_fablib()

# register fabric tasks
from node import node, nodestr  # noqa
from setup import setup, manage, check  # noqa
from job import job  # noqa
from databag import databag  # noqa
from runserver import runserver  # noqa
from agent import agent, agent_central, agent_manager  # noqa
from fabtest import test  # noqa
from doc import doc  # noqa