How to use the keystoneauth1.loading.get_auth_plugin_conf_options function in keystoneauth1

To help you get started, we’ve selected a few keystoneauth1 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / searchlight / searchlight / opts.py View on Github external
def list_auth_opts():
    # Inspired by similar code in neutron
    opt_list = []
    for plugin in ['password', 'v2password', 'v3password']:
        plugin_options = loading.get_auth_plugin_conf_options(plugin)
        for plugin_option in plugin_options:
            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 opt_list
github openstack / vitrage / vitrage / middleware / basic_and_keystone_auth.py View on Github external
def __init__(self, application, conf):
        super(BasicAndKeystoneAuth, self).__init__(application, conf)

        self.application = application

        self.oslo_conf = cfg.ConfigOpts()
        self.oslo_conf([],
                       project='vitrage',
                       validate_default_values=True)
        password_option = loading.get_auth_plugin_conf_options('password')
        self.oslo_conf.register_opts(password_option, group=CFG_GROUP)
        self.auth_url = self.oslo_conf.service_credentials.auth_url or ''
github openstack / heat / heat / common / context.py View on Github external
def list_opts():
    trustee_opts = ks_loading.get_auth_common_conf_options()
    trustee_opts.extend(ks_loading.get_auth_plugin_conf_options(
        PASSWORD_PLUGIN))
    yield TRUSTEE_CONF_GROUP, trustee_opts
github openstack / nova / nova / conf / neutron.py View on Github external
def list_opts():
    return {
        neutron_group: (
            ALL_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') +
            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
    }
github openstack / kuryr / kuryr / lib / opts.py View on Github external
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
github openstack / watcher / watcher / conf / _opts.py View on Github external
(conf_planner.watcher_planner, conf_planner.WATCHER_PLANNER_OPTS),
        (conf_applier.watcher_applier, conf_applier.APPLIER_MANAGER_OPTS),
        (conf_de.watcher_decision_engine,
         (conf_de.WATCHER_DECISION_ENGINE_OPTS)),
        (conf_nova_client.nova_client, conf_nova_client.NOVA_CLIENT_OPTS),
        (conf_glance_client.glance_client,
         conf_glance_client.GLANCE_CLIENT_OPTS),
        (conf_cinder_client.cinder_client,
         conf_cinder_client.CINDER_CLIENT_OPTS),
        (conf_ceilometer_client.ceilometer_client,
         conf_ceilometer_client.CEILOMETER_CLIENT_OPTS),
        (conf_neutron_client.neutron_client,
         conf_neutron_client.NEUTRON_CLIENT_OPTS),
        (conf_auth.WATCHER_CLIENTS_AUTH,
         (ka_loading.get_auth_common_conf_options() +
          ka_loading.get_auth_plugin_conf_options('password') +
          ka_loading.get_session_conf_options()))
    ]
github att-comdev / shipyard / src / bin / shipyard_airflow / shipyard_airflow / conf / config.py View on Github external
def register_opts(conf):
    """ Registers all the sections in this module.
    """
    for section in SECTIONS:
        conf.register_group(
            cfg.OptGroup(name=section.name,
                         title=section.title,
                         help=section.help))
        conf.register_opts(section.options, group=section.name)

    conf.register_opts(
        ks_loading.get_auth_plugin_conf_options('password'),
        group='keystone_authtoken'
    )
github openstack / neutron / neutron / opts.py View on Github external
def list_auth_opts():
    opt_list = copy.deepcopy(_nova_options)
    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 [(NOVA_GROUP, opt_list)]
github openstack / octavia / octavia / opts.py View on Github external
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)