本文整理汇总了Python中sahara.plugins.base.setup_plugins函数的典型用法代码示例。如果您正苦于以下问题:Python setup_plugins函数的具体用法?Python setup_plugins怎么用?Python setup_plugins使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setup_plugins函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir,
'etc',
'sahara',
'sahara.conf')
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
common_config.set_config_defaults()
log.setup(CONF, "sahara")
# Validate other configurations (that may produce logs) here
cinder.validate_config()
keystone.validate_config()
validate_castellan_config()
messaging.setup(service_name)
plugins_base.setup_plugins()
ds_manager.setup_data_sources()
jb_manager.setup_job_binaries()
LOG.info('Sahara {service} started'.format(service=service_name))
示例2: setUp
def setUp(self):
super(StormPluginTest, self).setUp()
self.override_config("plugins", ["storm"])
self.master_host = "master"
self.master_inst = "6789"
self.storm_topology_name = 'topology1'
pb.setup_plugins()
示例3: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir,
'etc',
'sahara',
'sahara.conf')
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
log.setup("sahara")
LOG.info(_LI('Starting Sahara %s'), service_name)
# Validate other configurations (that may produce logs) here
cinder.validate_config()
messaging.setup()
if service_name != 'all-in-one':
LOG.warn(
_LW("Distributed mode is in the alpha state, it's recommended to "
"use all-in-one mode by running 'sahara-all' binary."))
plugins_base.setup_plugins()
示例4: setUp
def setUp(self):
super(TestJobManager, self).setUp()
p.patch_minidom_writexml()
self.override_config('plugins', ['fake'])
pb.setup_plugins()
castellan.validate_config()
ds_manager.setup_data_sources()
示例5: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir,
'etc',
'sahara',
'sahara.conf')
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
log.setup("sahara")
LOG.info('Starting Sahara %s' % service_name)
plugins_base.setup_plugins()
示例6: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir, "etc", "sahara", "sahara.conf")
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
log.setup(CONF, "sahara")
# Validate other configurations (that may produce logs) here
cinder.validate_config()
if service_name != "all-in-one" or cfg.CONF.enable_notifications:
messaging.setup()
plugins_base.setup_plugins()
LOG.info(_LI("Sahara {service} started").format(service=service_name))
示例7: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir,
'etc',
'sahara',
'sahara.conf')
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
log.setup("sahara")
LOG.info('Starting Sahara %s' % service_name)
if service_name != 'all-in-one':
LOG.warn("Distributed mode is in the alpha state, it's recommended to "
"use all-in-one mode by running 'sahara-all' binary.")
plugins_base.setup_plugins()
示例8: setup_common
def setup_common(possible_topdir, service_name):
dev_conf = os.path.join(possible_topdir,
'etc',
'sahara',
'sahara.conf')
config_files = None
if os.path.exists(dev_conf):
config_files = [dev_conf]
config.parse_configs(config_files)
common_config.set_config_defaults()
log.setup(CONF, "sahara")
# Validate other configurations (that may produce logs) here
cinder.validate_config()
castellan.validate_config()
if (service_name != 'all-in-one' or
CONF.oslo_messaging_notifications.enable):
messaging.setup()
plugins_base.setup_plugins()
LOG.info(_LI('Sahara {service} started').format(service=service_name))
示例9: setUp
def setUp(self):
super(EdpEngineTestV530, self).setUp()
pb.setup_plugins()
示例10: setUp
def setUp(self):
super(TestJobManager, self).setUp()
p.patch_minidom_writexml()
pb.setup_plugins()
castellan.validate_config()
示例11: setUp
def setUp(self):
super(AmbariPluginTest, self).setUp()
pb.setup_plugins()
示例12: setUp
def setUp(self):
super(TestOozieEngine, self).setUp()
pb.setup_plugins()
示例13: make_app
def make_app():
"""App builder (wsgi)
Entry point for Sahara REST API server
"""
app = flask.Flask('sahara.api')
@app.route('/', methods=['GET'])
def version_list():
context.set_ctx(None)
return api_utils.render({
"versions": [
{"id": "v1.0", "status": "CURRENT"}
]
})
@app.teardown_request
def teardown_request(_ex=None):
context.set_ctx(None)
app.register_blueprint(api_v10.rest, url_prefix='/v1.0')
app.register_blueprint(api_v10.rest, url_prefix='/v1.1')
app.register_blueprint(api_v11.rest, url_prefix='/v1.1')
plugins_base.setup_plugins()
periodic.setup(app)
engine = _get_infrastructure_engine()
service_api.setup_service_api(engine)
remote_driver = _get_remote_driver()
remote.setup_remote(remote_driver, engine)
def make_json_error(ex):
status_code = (ex.code
if isinstance(ex, werkzeug_exceptions.HTTPException)
else 500)
description = (ex.description
if isinstance(ex, werkzeug_exceptions.HTTPException)
else str(ex))
return api_utils.render({'error': status_code,
'error_message': description},
status=status_code)
for code in six.iterkeys(werkzeug_exceptions.default_exceptions):
app.error_handler_spec[None][code] = make_json_error
if CONF.debug and not CONF.log_exchange:
LOG.debug('Logging of request/response exchange could be enabled using'
' flag --log-exchange')
if CONF.log_exchange:
cfg = app.config
app.wsgi_app = log_exchange.LogExchange.factory(cfg)(app.wsgi_app)
app.wsgi_app = auth_valid.filter_factory(app.config)(app.wsgi_app)
app.wsgi_app = auth_token.filter_factory(
app.config,
auth_host=CONF.os_auth_host,
auth_port=CONF.os_auth_port,
auth_protocol=CONF.os_auth_protocol,
admin_user=CONF.os_admin_username,
admin_password=CONF.os_admin_password,
admin_tenant_name=CONF.os_admin_tenant_name
)(app.wsgi_app)
return app
示例14: setUp
def setUp(self):
super(VanillaPluginTest, self).setUp()
pb.setup_plugins()
self.pl = p.VanillaProvider()
示例15: setUp
def setUp(self):
super(BasePluginsSupportTest, self).setUp()
pb.setup_plugins()