Python oslo_i18n.enable_lazy() Examples
The following are 10
code examples of oslo_i18n.enable_lazy().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
oslo_i18n
, or try the search function
.
Example #1
Source File: test_public_api.py From oslo.i18n with Apache License 2.0 | 5 votes |
def test_toggle_lazy(self): original = _lazy.USE_LAZY try: oslo_i18n.enable_lazy(True) oslo_i18n.enable_lazy(False) finally: oslo_i18n.enable_lazy(original)
Example #2
Source File: i18n.py From vdi-broker with Apache License 2.0 | 5 votes |
def enable_lazy(enable=True): return i18n.enable_lazy(enable)
Example #3
Source File: _i18n.py From Python-notes with MIT License | 5 votes |
def enable_lazy(enable=True): return oslo_i18n.enable_lazy(enable)
Example #4
Source File: service.py From searchlight with Apache License 2.0 | 5 votes |
def prepare_service(argv=None): oslo_i18n.enable_lazy() log.set_defaults(_DEFAULT_LOG_LEVELS) log.register_options(CONF) gmr.TextGuruMeditation.setup_autorun(version) utils.register_plugin_opts() if argv is None: argv = sys.argv CONF(argv[1:], project='searchlight') log.setup(cfg.CONF, 'searchlight') oslo_messaging.set_transport_defaults('searchlight')
Example #5
Source File: _i18n.py From syntribos with Apache License 2.0 | 5 votes |
def enable_lazy(): return oslo_i18n.enable_lazy()
Example #6
Source File: service.py From cloudkitty with Apache License 2.0 | 5 votes |
def prepare_service(argv=None, config_files=None): oslo_i18n.enable_lazy() log.register_options(cfg.CONF) log.set_defaults() defaults.set_cors_middleware_defaults() if argv is None: argv = sys.argv cfg.CONF(argv[1:], project='cloudkitty', validate_default_values=True, version=version.version_info.version_string(), default_config_files=config_files) log.setup(cfg.CONF, 'cloudkitty') messaging.setup()
Example #7
Source File: i18n.py From coriolis with GNU Affero General Public License v3.0 | 5 votes |
def enable_lazy(enable=True): return i18n.enable_lazy(enable)
Example #8
Source File: service.py From aodh with Apache License 2.0 | 5 votes |
def prepare_service(argv=None, config_files=None): conf = cfg.ConfigOpts() oslo_i18n.enable_lazy() log.register_options(conf) log_levels = ( conf.default_log_levels + [ 'futurist=INFO', 'keystoneclient=INFO', 'oslo_db.sqlalchemy=WARN', 'cotyledon=INFO' ] ) log.set_defaults(default_log_levels=log_levels) defaults.set_cors_middleware_defaults() db_options.set_defaults(conf) if profiler_opts: profiler_opts.set_defaults(conf) policy_opts.set_defaults(conf, policy_file=os.path.abspath( os.path.join(os.path.dirname(__file__), "api", "policy.json"))) from aodh import opts # Register our own Aodh options for group, options in opts.list_opts(): conf.register_opts(list(options), group=None if group == "DEFAULT" else group) keystone_client.register_keystoneauth_opts(conf) conf(argv, project='aodh', validate_default_values=True, default_config_files=config_files) ka_loading.load_auth_from_conf_options(conf, "service_credentials") log.setup(conf, 'aodh') profiler.setup(conf) messaging.setup() return conf
Example #9
Source File: i18n.py From karbor with Apache License 2.0 | 5 votes |
def enable_lazy(enable=True): return i18n.enable_lazy(enable)
Example #10
Source File: i18n.py From python-hpedockerplugin with Apache License 2.0 | 5 votes |
def enable_lazy(enable=True): return i18n.enable_lazy(enable)