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


Python loading.get_session_conf_options方法代码示例

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


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

示例1: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts(group):
        """Generates a list of config option for a given group

        :param group: group name
        :return: list of auth default configuration
        """
        opts = copy.deepcopy(ks_loading.get_session_conf_options())
        opts.insert(0, ks_loading.get_auth_common_conf_options()[0])

        for plugin_option in ks_loading.get_auth_plugin_conf_options(
                'password'):
            found = False
            for option in opts:
                if option.name == plugin_option.name:
                    found = True
                    break
            if not found:
                opts.append(plugin_option)
        opts.sort(key=lambda x: x.name)
        return [(group, opts)] 
开发者ID:openstack,项目名称:manila,代码行数:22,代码来源:client_auth.py

示例2: add_auth_options

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def add_auth_options(options, service_type):
    def add_options(opts, opts_to_add):
        for new_opt in opts_to_add:
            for opt in opts:
                if opt.name == new_opt.name:
                    break
            else:
                opts.append(new_opt)

    opts = copy.deepcopy(options)
    opts.insert(0, loading.get_auth_common_conf_options()[0])
    # NOTE(dims): There are a lot of auth plugins, we just generate
    # the config options for a few common ones
    plugins = ['password', 'v2password', 'v3password']
    for name in plugins:
        plugin = loading.get_plugin_loader(name)
        add_options(opts, loading.get_auth_plugin_conf_options(plugin))
    add_options(opts, loading.get_session_conf_options())
    adapter_opts = loading.get_adapter_conf_options(
        include_deprecated=False)
    cfg.set_defaults(adapter_opts, service_type=service_type,
                     valid_interfaces=DEFAULT_VALID_INTERFACES)
    add_options(opts, adapter_opts)
    opts.sort(key=lambda x: x.name)
    return opts 
开发者ID:openstack,项目名称:ironic-inspector,代码行数:27,代码来源:keystone.py

示例3: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        KEYSTONE_GROUP: (ksa_loading.get_adapter_conf_options() +
                         ksa_loading.get_session_conf_options())
    } 
开发者ID:openstack,项目名称:designate,代码行数:7,代码来源:keystone.py

示例4: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        'DEFAULT': default_options,
        'keystone_authtoken': (
            ks_loading.get_session_conf_options()
            + ks_loading.get_auth_common_conf_options()
            + ks_loading.get_auth_plugin_conf_options('password')
            + ks_loading.get_auth_plugin_conf_options('v3password'))
    } 
开发者ID:airshipit,项目名称:armada,代码行数:11,代码来源:default.py

示例5: list_opts

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

示例6: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        service_user: (
            service_user_opts +
            ks_loading.get_session_conf_options() +
            ks_loading.get_auth_common_conf_options() +
            ks_loading.get_auth_plugin_conf_options('password') +
            ks_loading.get_auth_plugin_conf_options('v2password') +
            ks_loading.get_auth_plugin_conf_options('v3password'))
    } 
开发者ID:openstack,项目名称:cyborg,代码行数:12,代码来源:service_token.py

示例7: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        keystone_group: (
            ks_loading.get_session_conf_options() +
            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE)
        )
    } 
开发者ID:openstack,项目名称:cyborg,代码行数:9,代码来源:keystone.py

示例8: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {glance_group: (
        glance_opts +
        ks_loading.get_session_conf_options() +
        confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE,
                                       deprecated_opts=deprecated_ksa_opts))} 
开发者ID:openstack,项目名称:cyborg,代码行数:8,代码来源:glance.py

示例9: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        nova_group.name: (
            ks_loading.get_session_conf_options() +
            ks_loading.get_auth_common_conf_options() +
            ks_loading.get_auth_plugin_conf_options('password') +
            ks_loading.get_auth_plugin_conf_options('v2password') +
            ks_loading.get_auth_plugin_conf_options('v3password') +
            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
    } 
开发者ID:openstack,项目名称:cyborg,代码行数:12,代码来源:nova.py

示例10: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    return {
        PLACEMENT_CONF_SECTION: (
            ks_loading.get_session_conf_options() +
            ks_loading.get_auth_common_conf_options() +
            ks_loading.get_auth_plugin_conf_options('password') +
            ks_loading.get_auth_plugin_conf_options('v2password') +
            ks_loading.get_auth_plugin_conf_options('v3password') +
            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
    } 
开发者ID:openstack,项目名称:cyborg,代码行数:12,代码来源:placement.py

示例11: get_keystoneauth_conf_options

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def get_keystoneauth_conf_options():
    opt_list = []
    opt_list.insert(0, ks_loading.get_auth_common_conf_options()[0])
    opt_list += ks_loading.get_session_conf_options()
    # NOTE(apuimedo): There are a lot of auth plugins, we just generate the
    # config options for a few common ones
    for name in ENABLED_AUTH_PLUGINS:
        for plugin_option in ks_loading.get_auth_plugin_conf_options(name):
            if all(option.name != plugin_option.name for option in opt_list):
                opt_list.append(plugin_option)
    return opt_list 
开发者ID:openstack,项目名称:kuryr,代码行数:13,代码来源:opts.py

示例12: list_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import get_session_conf_options [as 别名]
def list_opts():
    """ List the options identified by this configuration
    """
    all_opts = {
        section.name: section.options for section in SECTIONS
    }
    all_opts['keystone_authtoken'] = ks_loading.get_session_conf_options()
    return all_opts 
开发者ID:airshipit,项目名称:shipyard,代码行数:10,代码来源:config.py


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