当前位置: 首页>>代码示例>>Python>>正文


Python loading.register_auth_conf_options方法代码示例

本文整理汇总了Python中keystoneauth1.loading.register_auth_conf_options方法的典型用法代码示例。如果您正苦于以下问题:Python loading.register_auth_conf_options方法的具体用法?Python loading.register_auth_conf_options怎么用?Python loading.register_auth_conf_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在keystoneauth1.loading的用法示例。


在下文中一共展示了loading.register_auth_conf_options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_defaults

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def set_defaults(conf):
    conf.set_default('connection', 'sqlite://', group='database')
    conf.set_default('sqlite_synchronous', False, group='database')
    conf.set_default('policy_dirs', [], group='oslo_policy')
    conf.set_default('auth_strategy', 'noauth')
    conf.set_default('state_path', os.path.abspath(
        os.path.join(os.path.dirname(__file__), '..', '..', '..')))
    conf.set_default('provider_config_dir',
                     os.path.join(os.path.dirname(__file__), 'fake_providers'))
    loading.register_auth_conf_options(conf, 'trustee')
    opts = loading.get_auth_plugin_conf_options('password')
    conf.register_opts(opts, 'trustee')
    conf.set_default('auth_type', 'password', group='trustee')
    conf.set_default('auth_section', None, group='trustee')
    conf.set_default('auth_url', 'http://192.168.1.2/identity',
                     group='trustee')
    conf.set_default('username', 'karbor', group='trustee')
    conf.set_default('password', 'password', group='trustee')
    conf.set_default('user_domain_id', 'default', group='trustee')
    conf.set_default('trigger_poll_interval', 1) 
开发者ID:openstack,项目名称:karbor,代码行数:22,代码来源:conf_fixture.py

示例2: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    conf.import_group(CFG_LEGACY_GROUP, 'keystonemiddleware.auth_token')
    ka_loading.register_auth_conf_options(conf, CFG_GROUP)
    ka_loading.register_session_conf_options(conf, CFG_GROUP)
    conf.set_default('auth_type', default='password', group=CFG_GROUP) 
开发者ID:openstack,项目名称:zun,代码行数:7,代码来源:keystone.py

示例3: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def __init__(self, section=constants.SERVICE_AUTH):
        self._session = None
        self._auth = None

        self.section = section
        ks_loading.register_auth_conf_options(cfg.CONF, self.section)
        ks_loading.register_session_conf_options(cfg.CONF, self.section) 
开发者ID:openstack,项目名称:octavia,代码行数:9,代码来源:keystone.py

示例4: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    conf.register_opts(default_options)
    ks_loading.register_auth_conf_options(conf, group='keystone_authtoken') 
开发者ID:airshipit,项目名称:armada,代码行数:5,代码来源:default.py

示例5: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    # FIXME(pauloewerton): remove import of authtoken group and legacy options
    # after deprecation period
    conf.import_group(CFG_LEGACY_GROUP, 'keystonemiddleware.auth_token')
    ka_loading.register_auth_conf_options(conf, CFG_GROUP)
    ka_loading.register_session_conf_options(
        conf, CFG_GROUP, deprecated_opts=legacy_session_opts)
    conf.set_default('auth_type', default='password', group=CFG_GROUP) 
开发者ID:openstack,项目名称:magnum,代码行数:10,代码来源:keystone.py

示例6: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def __init__(self, config_group_name=None):
        self.config_group_name = config_group_name or 'DEFAULT'

        ks_loading.register_session_conf_options(
            CONF, NEUTRON_GROUP, deprecated_opts=deprecated_opts)
        ks_loading.register_auth_conf_options(CONF, NEUTRON_GROUP)
        CONF.register_opts(neutron_opts, NEUTRON_GROUP)

        self.configuration = getattr(CONF, self.config_group_name, CONF)
        self.last_neutron_extension_sync = None
        self.extensions = {}
        self.auth_obj = None 
开发者ID:openstack,项目名称:manila,代码行数:14,代码来源:api.py

示例7: register_keystoneauth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_keystoneauth_opts():
    ka_loading.register_auth_conf_options(CONF, CFG_GROUP)
    ka_loading.register_session_conf_options(
        CONF, CFG_GROUP,
        deprecated_opts={'cacert': [
            cfg.DeprecatedOpt('os-cacert', group=CFG_GROUP),
            cfg.DeprecatedOpt('os-cacert', group="DEFAULT")]
        }) 
开发者ID:openstack,项目名称:vitrage,代码行数:10,代码来源:keystone_client.py

示例8: setUp

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def setUp(self):
        super(TestPlacementHelper, self).setUp()
        _AUTH_CONF_GROUP = 'watcher_clients_auth'
        ka_loading.register_auth_conf_options(CONF, _AUTH_CONF_GROUP)
        ka_loading.register_session_conf_options(CONF, _AUTH_CONF_GROUP)
        self.client = placement_helper.PlacementHelper()
        self.fake_err_msg = {
            'errors': [{
                'detail': 'The resource could not be found.',
            }]
        } 
开发者ID:openstack,项目名称:watcher,代码行数:13,代码来源:test_placement_helper.py

示例9: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    ka_loading.register_session_conf_options(conf, WATCHER_CLIENTS_AUTH)
    ka_loading.register_auth_conf_options(conf, WATCHER_CLIENTS_AUTH) 
开发者ID:openstack,项目名称:watcher,代码行数:5,代码来源:clients_auth.py

示例10: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    conf.register_group(ZAQAR_GROUP)
    ksa_loading.register_session_conf_options(conf, ZAQAR_GROUP)
    ksa_loading.register_auth_conf_options(conf, ZAQAR_GROUP) 
开发者ID:openstack,项目名称:senlin,代码行数:6,代码来源:zaqar.py

示例11: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_opts(conf):
    conf.register_group(service_user)
    conf.register_opts(service_user_opts, group=service_user)

    ks_loading.register_session_conf_options(conf, SERVICE_USER_GROUP)
    ks_loading.register_auth_conf_options(conf, SERVICE_USER_GROUP) 
开发者ID:openstack,项目名称:cyborg,代码行数:8,代码来源:service_token.py

示例12: register_ksa_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_ksa_opts(conf, group, default_service_type, include_auth=True,
                      deprecated_opts=None):
    """Register keystoneauth auth, Session, and Adapter opts.

    :param conf: oslo_config.cfg.CONF in which to register the options
    :param group: Conf group, or string name thereof, in which to register the
                  options.
    :param default_service_type: Default for the service_type conf option on
                                 the Adapter.
    :param include_auth: For service types where Nova is acting on behalf of
                         the user, auth should come from the user context.
                         In those cases, set this arg to False to avoid
                         registering ksa auth options.
    :param deprecated_opts: dict of deprecated opts to register with the ksa
                            Session or Adapter opts.  See docstring for
                            the deprecated_opts param of:
                    keystoneauth1.loading.session.Session.register_conf_options
    """
    # ksa register methods need the group name as a string.  oslo doesn't care.
    group = getattr(group, 'name', group)
    ks_loading.register_session_conf_options(
        conf, group, deprecated_opts=deprecated_opts)
    if include_auth:
        ks_loading.register_auth_conf_options(conf, group)
    conf.register_opts(get_ksa_adapter_opts(
        default_service_type, deprecated_opts=deprecated_opts), group=group)
    # Have to register dummies for the version-related opts we removed
    for name in _ADAPTER_VERSION_OPTS:
        conf.register_opt(_dummy_opt(name), group=group)


# NOTE(efried): Required for docs build. 
开发者ID:openstack,项目名称:cyborg,代码行数:34,代码来源:utils.py

示例13: register_auth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_auth_opts(group, service_type):
    loading.register_session_conf_options(CONF, group)
    loading.register_auth_conf_options(CONF, group)
    CONF.set_default('auth_type', default='password', group=group)
    loading.register_adapter_conf_options(CONF, group)
    CONF.set_default('valid_interfaces', DEFAULT_VALID_INTERFACES,
                     group=group)
    CONF.set_default('service_type', service_type, group=group) 
开发者ID:openstack,项目名称:ironic-inspector,代码行数:10,代码来源:keystone.py

示例14: register_keystoneauth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_keystoneauth_opts(conf):
    ka_loading.register_auth_conf_options(conf, CFG_GROUP)
    ka_loading.register_session_conf_options(
        conf, CFG_GROUP,
        deprecated_opts={'cacert': [
            cfg.DeprecatedOpt('os-cacert', group=CFG_GROUP),
            cfg.DeprecatedOpt('os-cacert', group="DEFAULT")]
        }) 
开发者ID:openstack,项目名称:aodh,代码行数:10,代码来源:keystone_client.py

示例15: register_keystoneauth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_auth_conf_options [as 别名]
def register_keystoneauth_opts(conf, conf_group):
    ks_loading.register_session_conf_options(conf, conf_group)
    ks_loading.register_auth_conf_options(conf, conf_group) 
开发者ID:openstack,项目名称:kuryr,代码行数:5,代码来源:config.py


注:本文中的keystoneauth1.loading.register_auth_conf_options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。