Implemented base + moved plugins & service conf
In this changeset, I implemented the main logic although this is mainly a shameful copy/paste of Nova's blueprint https://blueprints.launchpad.net/nova/+spec/centralize-config-options Partially Implements: blueprint centralise-config-opts Change-Id: Ib645ad5da5c706336bb6ac37e85b027d05665c32
This commit is contained in:
@@ -24,13 +24,14 @@ from oslo_log import log as logging
|
||||
|
||||
from watcher._i18n import _LI
|
||||
from watcher.common import service
|
||||
from watcher import conf
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
def main():
|
||||
service.prepare_service(sys.argv)
|
||||
service.prepare_service(sys.argv, CONF)
|
||||
|
||||
host, port = cfg.CONF.api.host, cfg.CONF.api.port
|
||||
protocol = "http" if not CONF.api.enable_ssl_api else "https"
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from watcher._i18n import _LI
|
||||
from watcher.applier import manager
|
||||
from watcher.common import service as watcher_service
|
||||
from watcher import conf
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
def main():
|
||||
watcher_service.prepare_service(sys.argv)
|
||||
watcher_service.prepare_service(sys.argv, CONF)
|
||||
|
||||
LOG.info(_LI('Starting Watcher Applier service in PID %s'), os.getpid())
|
||||
|
||||
|
||||
@@ -24,10 +24,11 @@ import sys
|
||||
from oslo_config import cfg
|
||||
|
||||
from watcher.common import service
|
||||
from watcher import conf
|
||||
from watcher.db import migration
|
||||
from watcher.db import purge
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
class DBCommand(object):
|
||||
@@ -152,5 +153,5 @@ def main():
|
||||
if not set(sys.argv).intersection(valid_commands):
|
||||
sys.argv.append('upgrade')
|
||||
|
||||
service.prepare_service(sys.argv)
|
||||
service.prepare_service(sys.argv, CONF)
|
||||
CONF.command.func()
|
||||
|
||||
@@ -20,22 +20,22 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from watcher._i18n import _LI
|
||||
from watcher.common import service as watcher_service
|
||||
from watcher import conf
|
||||
from watcher.decision_engine import gmr
|
||||
from watcher.decision_engine import manager
|
||||
from watcher.decision_engine import scheduling
|
||||
from watcher.decision_engine import sync
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
def main():
|
||||
watcher_service.prepare_service(sys.argv)
|
||||
watcher_service.prepare_service(sys.argv, CONF)
|
||||
gmr.register_gmr_plugins()
|
||||
|
||||
LOG.info(_LI('Starting Watcher Decision Engine service in PID %s'),
|
||||
|
||||
@@ -24,15 +24,17 @@ from oslo_log import log as logging
|
||||
|
||||
from watcher._i18n import _LI
|
||||
from watcher.common import service as service
|
||||
from watcher import conf
|
||||
from watcher.decision_engine import sync
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = conf.CONF
|
||||
|
||||
|
||||
def main():
|
||||
LOG.info(_LI('Watcher sync started.'))
|
||||
|
||||
service.prepare_service(sys.argv)
|
||||
service.prepare_service(sys.argv, CONF)
|
||||
syncer = sync.Syncer()
|
||||
syncer.sync()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user