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


Python loading.register_session_conf_options方法代码示例

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


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

示例1: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_conf_options [as 别名]
def __init__(self, configuration):
        self._conf = configuration
        self._conf.register_opts(_vault_opts, group=_VAULT_OPT_GROUP)
        loading.register_session_conf_options(self._conf, _VAULT_OPT_GROUP)
        self._session = requests.Session()
        self._root_token_id = self._conf.vault.root_token_id
        self._approle_role_id = self._conf.vault.approle_role_id
        self._approle_secret_id = self._conf.vault.approle_secret_id
        self._cached_approle_token_id = None
        self._approle_token_ttl = None
        self._approle_token_issue = None
        self._kv_mountpoint = self._conf.vault.kv_mountpoint
        self._kv_version = self._conf.vault.kv_version
        self._vault_url = self._conf.vault.vault_url
        if self._vault_url.startswith("https://"):
            self._verify_server = self._conf.vault.ssl_ca_crt_file or True
        else:
            self._verify_server = False 
开发者ID:openstack,项目名称:castellan,代码行数:20,代码来源:vault_key_manager.py

示例2: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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: list_auth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例4: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_conf_options [as 别名]
def __init__(self, configuration):
        self._barbican_client = None
        self._base_url = None
        self.conf = configuration
        self.conf.register_opts(_barbican_opts, group=_BARBICAN_OPT_GROUP)
        loading.register_session_conf_options(self.conf, _BARBICAN_OPT_GROUP) 
开发者ID:openstack,项目名称:castellan,代码行数:8,代码来源:barbican_key_manager.py

示例5: add_auth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例6: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例7: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_conf_options [as 别名]
def register_opts(conf):
    conf.register_group(KEYSTONE_GROUP)
    ksa_loading.register_adapter_conf_options(conf, KEYSTONE_GROUP)
    ksa_loading.register_session_conf_options(conf, KEYSTONE_GROUP)
    conf.set_default('service_type', 'identity', group=KEYSTONE_GROUP) 
开发者ID:openstack,项目名称:designate,代码行数:7,代码来源:keystone.py

示例8: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例9: __init__

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例10: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_conf_options [as 别名]
def register_opts(conf):
    conf.register_opts(nova_opts)
    ks_loading.register_session_conf_options(conf, 'DEFAULT') 
开发者ID:openstack,项目名称:masakari,代码行数:5,代码来源:nova.py

示例11: register_keystoneauth_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例12: setUp

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例13: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例14: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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

示例15: register_opts

# 需要导入模块: from keystoneauth1 import loading [as 别名]
# 或者: from keystoneauth1.loading import register_session_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


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