當前位置: 首頁>>代碼示例>>Python>>正文


Python loading.get_auth_common_conf_options方法代碼示例

本文整理匯總了Python中keystoneauth1.loading.get_auth_common_conf_options方法的典型用法代碼示例。如果您正苦於以下問題:Python loading.get_auth_common_conf_options方法的具體用法?Python loading.get_auth_common_conf_options怎麽用?Python loading.get_auth_common_conf_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在keystoneauth1.loading的用法示例。


在下文中一共展示了loading.get_auth_common_conf_options方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def list_opts():
    return [
        ('DEFAULT',
         itertools.chain(searchlight.common.property_utils.property_opts,
                         searchlight.common.config.common_opts)),
        ('elasticsearch', searchlight.elasticsearch.search_opts),
        ('service_credentials',
         itertools.chain(
             searchlight.elasticsearch.plugins.openstack_clients.client_opts,
             loading.get_auth_common_conf_options(),
             list_auth_opts())),
        ('resource_plugin',
         searchlight.elasticsearch.plugins.base.indexer_opts),
        ('paste_deploy', searchlight.common.config.paste_deploy_opts),
        ('profiler', searchlight.common.wsgi.profiler_opts),
        ('listener', searchlight.listener.listener_opts),
        ('api',
         itertools.chain(searchlight.api.versions.versions_opts,
                         searchlight.common.wsgi.bind_opts,
                         searchlight.common.wsgi.socket_opts,
                         searchlight.common.wsgi.eventlet_opts)),
    ] 
開發者ID:openstack,項目名稱:searchlight,代碼行數:24,代碼來源:opts.py

示例2: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例3: add_auth_options

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例4: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def list_opts():
    keystone_auth_opts = (ka_loading.get_auth_common_conf_options() +
                          ka_loading.get_auth_plugin_conf_options('password'))
    return {
        keystone_auth_group: keystone_auth_opts
    } 
開發者ID:openstack,項目名稱:zun,代碼行數:8,代碼來源:keystone.py

示例5: list_auth_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def list_auth_opts():
    opt_list = ks_loading.register_session_conf_options(CONF, GROUP_AUTHTOKEN)
    opt_list.insert(0, ks_loading.get_auth_common_conf_options()[0])
    # NOTE(mhickey): 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:
        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)
    opt_list.sort(key=operator.attrgetter('name'))
    return [(GROUP_AUTHTOKEN, opt_list)] 
開發者ID:openstack,項目名稱:ec2-api,代碼行數:14,代碼來源:opts.py

示例6: add_auth_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def add_auth_opts():
    opts = ks_loading.register_session_conf_options(
        cfg.CONF, constants.SERVICE_AUTH)
    opt_list = copy.deepcopy(opts)
    opt_list.insert(0, ks_loading.get_auth_common_conf_options()[0])
    # NOTE(mhickey): 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:
        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)
    opt_list.sort(key=operator.attrgetter('name'))
    return (constants.SERVICE_AUTH, opt_list) 
開發者ID:openstack,項目名稱:octavia,代碼行數:16,代碼來源:opts.py

示例7: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例8: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例9: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def list_opts():
    return {
        ZAQAR_GROUP: (ksa_loading.get_auth_common_conf_options() +
                      ksa_loading.get_auth_plugin_conf_options('password'))
    } 
開發者ID:openstack,項目名稱:senlin,代碼行數:7,代碼來源:zaqar.py

示例10: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例11: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例12: list_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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

示例13: list_keystoneauth_opts

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_conf_options [as 別名]
def list_keystoneauth_opts():
    # NOTE(sileht): the configuration file contains only the options
    # for the password plugin that handles keystone v2 and v3 API
    # with discovery. But other options are possible.
    return [('service_credentials', (
            loading.get_auth_common_conf_options() +
            loading.get_auth_plugin_conf_options('password')))] 
開發者ID:openstack,項目名稱:aodh,代碼行數:9,代碼來源:opts.py

示例14: get_keystoneauth_conf_options

# 需要導入模塊: from keystoneauth1 import loading [as 別名]
# 或者: from keystoneauth1.loading import get_auth_common_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


注:本文中的keystoneauth1.loading.get_auth_common_conf_options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。