Ejemplo n.º 1
0
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))
    }
Ejemplo n.º 2
0
def add_auth_opts(options, service_type=None):
    """Add auth options to sample config

    As these are dynamically registered at runtime,
    this adds options for most used auth_plugins
    when generating sample config.
    """
    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, kaloading.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 = kaloading.get_plugin_loader(name)
        add_options(opts, kaloading.get_auth_plugin_conf_options(plugin))
    add_options(opts, kaloading.get_session_conf_options())
    if service_type:
        adapter_opts = kaloading.get_adapter_conf_options(
            include_deprecated=False)
        # adding defaults for valid interfaces
        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
Ejemplo n.º 3
0
def add_auth_opts(options):
    """Add auth options to sample config

    As these are dynamically registered at runtime,
    this adds options for most used auth_plugins
    when generating sample config.
    """
    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, kaloading.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 = kaloading.get_plugin_loader(name)
        add_options(opts, kaloading.get_auth_plugin_conf_options(plugin))
    add_options(opts, kaloading.get_session_conf_options())
    opts.sort(key=lambda x: x.name)
    return opts
Ejemplo n.º 4
0
def list_opts():
    return {
        ironic_group:
        ironic_options + ks_loading.get_session_conf_options() +
        ks_loading.get_auth_common_conf_options() +
        ks_loading.get_auth_plugin_conf_options('v3password')
    }
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
def add_auth_opts(options):
    """Add auth options to sample config

    As these are dynamically registered at runtime,
    this adds options for most used auth_plugins
    when generating sample config.
    """
    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, kaloading.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 = kaloading.get_plugin_loader(name)
        add_options(opts, kaloading.get_auth_plugin_conf_options(plugin))
    add_options(opts, kaloading.get_session_conf_options())
    opts.sort(key=lambda x: x.name)
    return opts
Ejemplo n.º 7
0
def list_opts():
    return {
        placement_group.name:
        (placement_opts + ks_loading.get_session_conf_options() +
         ks_loading.get_auth_common_conf_options() +
         ks_loading.get_auth_plugin_conf_options('v3password'))
    }
Ejemplo n.º 8
0
def list_opts():
    return {
        keystone_group: (
            ks_loading.get_session_conf_options() +
            confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE)
        )
    }
Ejemplo n.º 9
0
def list_opts():
    return {
        ironic_group: ironic_options
        + ks_loading.get_session_conf_options()
        + ks_loading.get_auth_common_conf_options()
        + ks_loading.get_auth_plugin_conf_options("v3password")
    }
Ejemplo n.º 10
0
def add_auth_opts(options, service_type=None):
    """Add auth options to sample config

    As these are dynamically registered at runtime,
    this adds options for most used auth_plugins
    when generating sample config.
    """
    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, kaloading.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 = kaloading.get_plugin_loader(name)
        add_options(opts, kaloading.get_auth_plugin_conf_options(plugin))
    add_options(opts, kaloading.get_session_conf_options())
    if service_type:
        adapter_opts = kaloading.get_adapter_conf_options(
            include_deprecated=False)
        # adding defaults for valid interfaces
        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
Ejemplo n.º 11
0
def list_opts():
    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 = copy.deepcopy(opts)
    opts_copy.insert(0, loading.get_auth_common_conf_options()[0])

    plugins = ['password', 'v2password', 'v3password']
    for name in plugins:
        plugin = loading.get_plugin_loader(name)
        add_options(opts_copy, loading.get_auth_plugin_conf_options(plugin))
    add_options(opts_copy, loading.get_session_conf_options())

    adapter_opts = loading.get_adapter_conf_options(include_deprecated=False)
    # adding defaults for valid interfaces
    cfg.set_defaults(adapter_opts,
                     service_type='identity',
                     valid_interfaces=['internal', 'public'])
    add_options(opts_copy, adapter_opts)
    opts_copy.sort(key=lambda x: x.name)
    return opts_copy
Ejemplo n.º 12
0
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'))
    }
Ejemplo n.º 13
0
def list_opts():
    return {ironic_group: (
        ironic_options +
        ks_loading.get_session_conf_options() +
        ks_loading.get_auth_common_conf_options() +
        ks_loading.get_auth_plugin_conf_options('v3password') +
        confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
    }
Ejemplo n.º 14
0
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
Ejemplo n.º 15
0
def list_opts():
    opts = {
        None:
        default_opts,
        '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')),
        barbican_group:
        (barbican_opts + ks_loading.get_session_conf_options() +
         ks_loading.get_auth_common_conf_options() +
         ks_loading.get_auth_plugin_conf_options('v3password')),
        jsonpath_group:
        jsonpath_opts
    }
    return opts
Ejemplo n.º 16
0
def list_opts():
    return {
        vendordata_group:
        (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'))
    }
Ejemplo n.º 17
0
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'))
    }
Ejemplo n.º 18
0
def list_opts():
    return {
        cinder_group.name:
        (cinder_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'))
    }
Ejemplo n.º 19
0
def list_opts():
    """Return a list of oslo.config options available in the library.

    :returns: a list of (group_name, opts) tuples
    """

    return [(_option_group,
             copy.deepcopy(_options) + loading.get_session_conf_options() +
             loading.get_adapter_conf_options(include_deprecated=False))]
Ejemplo n.º 20
0
def list_opts():
    return {
        placement_group.name:
        (placement_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))
    }
Ejemplo n.º 21
0
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))
    }
Ejemplo n.º 22
0
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'))
    }
Ejemplo n.º 23
0
def list_opts():
    opts = {
        None:
        context_opts,
        barbican_group:
        barbican_opts + ks_loading.get_session_conf_options() +
        ks_loading.get_auth_common_conf_options() +
        ks_loading.get_auth_plugin_conf_options('v3password')
    }
    return opts
Ejemplo n.º 24
0
def list_opts():
    return {
        vendordata_group: (
            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')
        )
    }
Ejemplo n.º 25
0
def list_opts():
    return {
        placement_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))
    }
Ejemplo n.º 26
0
def list_opts():
    return {
        placement_group.name: (
            placement_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'))
    }
Ejemplo n.º 27
0
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'))
    }
Ejemplo n.º 28
0
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'))
    }
Ejemplo n.º 29
0
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
Ejemplo n.º 30
0
    def test_deprecated(self):
        def new_deprecated():
            return cfg.DeprecatedOpt(uuid.uuid4().hex, group=uuid.uuid4().hex)

        opt_names = ['cafile', 'certfile', 'keyfile', 'insecure', 'timeout']
        depr = dict([(n, [new_deprecated()]) for n in opt_names])
        opts = loading.get_session_conf_options(deprecated_opts=depr)

        self.assertThat(opt_names, matchers.HasLength(len(opts)))
        for opt in opts:
            self.assertIn(depr[opt.name][0], opt.deprecated_opts)
Ejemplo n.º 31
0
def list_neutron_opts():
    opt_list = copy.deepcopy(config.neutron_opts)
    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)
    opt_list.sort(key=operator.attrgetter('name'))
    return [(config.neutron_group, opt_list)]
Ejemplo n.º 32
0
def list_neutron_opts():
    opt_list = copy.deepcopy(config.neutron_opts)
    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)
    opt_list.sort(key=operator.attrgetter('name'))
    return [(config.neutron_group, opt_list)]
Ejemplo n.º 33
0
def list_opts():
    return [
        ('api', watcher.api.app.API_SERVICE_OPTS),
        ('watcher_goals', strategy_selector.WATCHER_GOALS_OPTS),
        ('watcher_decision_engine',
         decision_engine_manger.WATCHER_DECISION_ENGINE_OPTS),
        ('watcher_applier', applier_manager.APPLIER_MANAGER_OPTS),
        ('watcher_planner', planner_manager.WATCHER_PLANNER_OPTS),
        ('nova_client', clients.NOVA_CLIENT_OPTS),
        ('glance_client', clients.GLANCE_CLIENT_OPTS),
        ('cinder_client', clients.CINDER_CLIENT_OPTS),
        ('ceilometer_client', clients.CEILOMETER_CLIENT_OPTS),
        ('neutron_client', clients.NEUTRON_CLIENT_OPTS),
        ('watcher_clients_auth',
         (ka_loading.get_auth_common_conf_options() +
          ka_loading.get_auth_plugin_conf_options('password') +
          ka_loading.get_session_conf_options()))
    ]
Ejemplo n.º 34
0
def list_opts():
    """Legacy aggregation of all the watcher config options"""
    return [('DEFAULT', (conf_api.AUTH_OPTS + exception.EXC_LOG_OPTS +
                         paths.PATH_OPTS + utils.UTILS_OPTS)),
            ('api', conf_api.API_SERVICE_OPTS), ('database', db.SQL_OPTS),
            ('watcher_planner', conf_planner.WATCHER_PLANNER_OPTS),
            ('watcher_applier', conf_applier.APPLIER_MANAGER_OPTS),
            ('watcher_decision_engine', (conf_de.WATCHER_DECISION_ENGINE_OPTS +
                                         conf_de.WATCHER_CONTINUOUS_OPTS)),
            ('nova_client', conf_nova_client.NOVA_CLIENT_OPTS),
            ('glance_client', conf_glance_client.GLANCE_CLIENT_OPTS),
            ('cinder_client', conf_cinder_client.CINDER_CLIENT_OPTS),
            ('ceilometer_client',
             conf_ceilometer_client.CEILOMETER_CLIENT_OPTS),
            ('neutron_client', conf_neutron_client.NEUTRON_CLIENT_OPTS),
            ('watcher_clients_auth',
             (ka_loading.get_auth_common_conf_options() +
              ka_loading.get_auth_plugin_conf_options('password') +
              ka_loading.get_session_conf_options()))]
Ejemplo n.º 35
0
    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)]
Ejemplo n.º 36
0
def add_auth_options(options, group):

    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())
    opts.sort(key=lambda x: x.name)
    return [(group, opts)]
Ejemplo n.º 37
0
def add_auth_options(options, group):

    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())
    opts.sort(key=lambda x: x.name)
    return [(group, opts)]
Ejemplo n.º 38
0
def list_opts():
    watcher_opts = [
        ('api', watcher.api.app.API_SERVICE_OPTS),
        ('watcher_decision_engine',
         decision_engine_manger.WATCHER_DECISION_ENGINE_OPTS),
        ('watcher_applier', applier_manager.APPLIER_MANAGER_OPTS),
        ('watcher_planner', planner_manager.WATCHER_PLANNER_OPTS),
        ('nova_client', clients.NOVA_CLIENT_OPTS),
        ('glance_client', clients.GLANCE_CLIENT_OPTS),
        ('cinder_client', clients.CINDER_CLIENT_OPTS),
        ('ceilometer_client', clients.CEILOMETER_CLIENT_OPTS),
        ('neutron_client', clients.NEUTRON_CLIENT_OPTS),
        ('watcher_clients_auth',
         (ka_loading.get_auth_common_conf_options() +
          ka_loading.get_auth_plugin_conf_options('password') +
          ka_loading.get_session_conf_options()))
    ]

    watcher_opts += list_plugin_opts()

    return watcher_opts
Ejemplo n.º 39
0
def list_opts():
    return [
        ('backend',
            itertools.chain(
                [cinder_cmd_volume.host_opt],
            )),
        ('brcd_fabric_example',
            itertools.chain(
                cinder_zonemanager_drivers_brocade_brcdfabricopts.
                brcd_zone_opts,
            )),
        ('cisco_fabric_example',
            itertools.chain(
                cinder_zonemanager_drivers_cisco_ciscofabricopts.
                cisco_zone_opts,
            )),
        ('coordination',
            itertools.chain(
                cinder_coordination.coordination_opts,
            )),
        ('DEFAULT',
            itertools.chain(
                cinder_api_common.api_common_opts,
                [cinder_api_middleware_auth.use_forwarded_for_opt],
                cinder_api_views_versions.versions_opts,
                cinder_backup_api.backup_opts,
                cinder_backup_chunkeddriver.backup_opts,
                cinder_backup_driver.backup_opts,
                cinder_backup_drivers_ceph.service_opts,
                cinder_backup_drivers_gcs.gcsbackup_service_opts,
                cinder_backup_drivers_glusterfs.glusterfsbackup_service_opts,
                cinder_backup_drivers_nfs.nfsbackup_service_opts,
                cinder_backup_drivers_posix.posixbackup_service_opts,
                cinder_backup_drivers_swift.swiftbackup_service_opts,
                cinder_backup_drivers_tsm.tsm_opts,
                cinder_backup_manager.backup_manager_opts,
                [cinder_cmd_backup.backup_workers_opt],
                [cinder_cmd_volume.cluster_opt],
                cinder_common_config.api_opts,
                cinder_common_config.core_opts,
                cinder_common_config.auth_opts,
                cinder_common_config.backup_opts,
                cinder_common_config.image_opts,
                cinder_common_config.global_opts,
                cinder_common_config.compression_opts,
                cinder.compute.compute_opts,
                cinder_context.context_opts,
                cinder_db_api.db_opts,
                cinder_db_api.backup_opts,
                [cinder_db_base.db_driver_opt],
                cinder_image_glance.image_opts,
                cinder_image_glance.glance_core_properties_opts,
                cinder_image_imageutils.image_opts,
                cinder_message_api.messages_opts,
                cinder_quota.quota_opts,
                cinder_scheduler_driver.scheduler_driver_opts,
                cinder_scheduler_hostmanager.host_manager_opts,
                cinder_scheduler_manager.scheduler_manager_opts,
                [cinder_scheduler_scheduleroptions.
                    scheduler_json_config_location_opt],
                cinder_scheduler_weights_capacity.capacity_weight_opts,
                cinder_scheduler_weights_volumenumber.
                volume_number_weight_opts,
                cinder_service.service_opts,
                cinder_sshutils.ssh_opts,
                cinder_transfer_api.volume_transfer_opts,
                [cinder_volume_api.allow_force_upload_opt],
                [cinder_volume_api.volume_host_opt],
                [cinder_volume_api.volume_same_az_opt],
                [cinder_volume_api.az_cache_time_opt],
                cinder_volume_driver.volume_opts,
                cinder_volume_driver.iser_opts,
                cinder_volume_driver.nvmet_opts,
                cinder_volume_driver.scst_opts,
                cinder_volume_driver.backup_opts,
                cinder_volume_driver.image_opts,
                cinder_volume_drivers_datera_dateraiscsi.d_opts,
                cinder_volume_drivers_fusionstorage_dsware.volume_opts,
                cinder_volume_drivers_infortrend_raidcmd_cli_commoncli.
                infortrend_opts,
                cinder_volume_drivers_inspur_as13000_as13000driver.
                inspur_as13000_opts,
                cinder_volume_drivers_inspur_instorage_instoragecommon.
                instorage_mcs_opts,
                cinder_volume_drivers_inspur_instorage_instorageiscsi.
                instorage_mcs_iscsi_opts,
                cinder_volume_drivers_sandstone_sdsdriver.sds_opts,
                cinder_volume_drivers_veritas_access_veritasiscsi.VA_VOL_OPTS,
                cinder_volume_manager.volume_manager_opts,
                cinder_wsgi_eventletserver.socket_opts,
            )),
        ('fc-zone-manager',
            itertools.chain(
                cinder_zonemanager_drivers_brocade_brcdfczonedriver.brcd_opts,
                cinder_zonemanager_drivers_cisco_ciscofczonedriver.cisco_opts,
                cinder_zonemanager_fczonemanager.zone_manager_opts,
            )),
        ('key_manager',
            itertools.chain(
                cinder_keymgr_confkeymgr.key_mgr_opts,
            )),
        ('service_user',
            itertools.chain(
                cinder_serviceauth.service_user_opts,
                loading.get_auth_plugin_conf_options('v3password'),
                loading.get_session_conf_options(),
            )),
        ('backend_defaults',
            itertools.chain(
                cinder_volume_driver.volume_opts,
                cinder_volume_driver.iser_opts,
                cinder_volume_driver.nvmet_opts,
                cinder_volume_driver.scst_opts,
                cinder_volume_driver.image_opts,
                cinder_volume_drivers_dell_emc_powermax_common.powermax_opts,
                cinder_volume_drivers_dell_emc_sc_storagecentercommon.
                common_opts,
                cinder_volume_drivers_dell_emc_unity_driver.UNITY_OPTS,
                cinder_volume_drivers_dell_emc_vnx_common.VNX_OPTS,
                cinder_volume_drivers_dell_emc_vxflexos_driver.vxflexos_opts,
                cinder_volume_drivers_dell_emc_xtremio.XTREMIO_OPTS,
                cinder_volume_drivers_fujitsu_eternus_dx_eternusdxcommon.
                FJ_ETERNUS_DX_OPT_opts,
                cinder_volume_drivers_hpe_hpe3parcommon.hpe3par_opts,
                cinder_volume_drivers_huawei_common.huawei_opts,
                cinder_volume_drivers_ibm_flashsystemcommon.flashsystem_opts,
                cinder_volume_drivers_ibm_flashsystemiscsi.
                flashsystem_iscsi_opts,
                cinder_volume_drivers_ibm_gpfs.gpfs_opts,
                cinder_volume_drivers_ibm_gpfs.gpfs_remote_ssh_opts,
                cinder_volume_drivers_ibm_ibm_storage_ds8kproxy.ds8k_opts,
                cinder_volume_drivers_ibm_ibm_storage_ibmstorage.driver_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvccommon.
                storwize_svc_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvcfc.
                storwize_svc_fc_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvciscsi.
                storwize_svc_iscsi_opts,
                cinder_volume_drivers_infinidat.infinidat_opts,
                cinder_volume_drivers_kaminario_kaminariocommon.
                kaminario_opts,
                cinder_volume_drivers_lenovo_lenovocommon.common_opts,
                cinder_volume_drivers_lenovo_lenovocommon.iscsi_opts,
                cinder_volume_drivers_linstordrv.linstor_opts,
                cinder_volume_drivers_lvm.volume_opts,
                cinder_volume_drivers_macrosan_driver.config.macrosan_opts,
                cinder_volume_drivers_netapp_options.netapp_proxy_opts,
                cinder_volume_drivers_netapp_options.netapp_connection_opts,
                cinder_volume_drivers_netapp_options.netapp_transport_opts,
                cinder_volume_drivers_netapp_options.netapp_basicauth_opts,
                cinder_volume_drivers_netapp_options.netapp_cluster_opts,
                cinder_volume_drivers_netapp_options.netapp_provisioning_opts,
                cinder_volume_drivers_netapp_options.netapp_img_cache_opts,
                cinder_volume_drivers_netapp_options.netapp_nfs_extra_opts,
                cinder_volume_drivers_netapp_options.netapp_san_opts,
                cinder_volume_drivers_netapp_options.netapp_replication_opts,
                cinder_volume_drivers_netapp_options.netapp_support_opts,
                cinder_volume_drivers_nexenta_options.NEXENTA_CONNECTION_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_ISCSI_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_DATASET_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_NFS_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_RRMGR_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_EDGE_OPTS,
                cinder_volume_drivers_nfs.nfs_opts,
                cinder_volume_drivers_nimble.nimble_opts,
                cinder_volume_drivers_prophetstor_options.DPL_OPTS,
                cinder_volume_drivers_pure.PURE_OPTS,
                cinder_volume_drivers_qnap.qnap_opts,
                cinder_volume_drivers_quobyte.volume_opts,
                cinder_volume_drivers_rbd.RBD_OPTS,
                cinder_volume_drivers_remotefs.nas_opts,
                cinder_volume_drivers_remotefs.volume_opts,
                cinder_volume_drivers_san_hp_hpmsacommon.common_opts,
                cinder_volume_drivers_san_hp_hpmsacommon.iscsi_opts,
                cinder_volume_drivers_san_san.san_opts,
                cinder_volume_drivers_solidfire.sf_opts,
                cinder_volume_drivers_storpool.storpool_opts,
                cinder_volume_drivers_stx_common.common_opts,
                cinder_volume_drivers_stx_common.iscsi_opts,
                cinder_volume_drivers_synology_synologycommon.cinder_opts,
                cinder_volume_drivers_vmware_vmdk.vmdk_opts,
                cinder_volume_drivers_vzstorage.vzstorage_opts,
                cinder_volume_drivers_windows_iscsi.windows_opts,
                cinder_volume_drivers_windows_smbfs.volume_opts,
                cinder_volume_drivers_zadara.zadara_opts,
                cinder_volume_manager.volume_backend_opts,
                cinder_volume_targets_spdknvmf.spdk_opts,
            )),
        ('nova',
            itertools.chain(
                cinder_compute_nova.nova_opts,
                cinder_compute_nova.nova_session_opts,
                cinder_compute_nova.nova_auth_opts,
            )),
    ]
Ejemplo n.º 40
0
def list_opts():
    opts = ksa_loading.get_adapter_conf_options()
    opts.extend(ksa_loading.get_session_conf_options())
    return opts
Ejemplo n.º 41
0
               'be looked up in the keystone catalog and should be '
               'one of public, internal or admin.'),
    cfg.StrOpt('token_auth_url',
               help='The authentication URL for the nova connection when '
               'using the current user'
               's token'),
]

NOVA_GROUP = 'nova'
CONF = cfg.CONF

deprecations = {
    'cafile': [cfg.DeprecatedOpt('nova_ca_certificates_file')],
    'insecure': [cfg.DeprecatedOpt('nova_api_insecure')]
}
nova_session_opts = ks_loading.get_session_conf_options(
    deprecated_opts=deprecations)
nova_auth_opts = ks_loading.get_auth_common_conf_options()

CONF.register_opts(old_opts)
CONF.register_opts(nova_opts, group=NOVA_GROUP)
CONF.register_opts(nova_session_opts, group=NOVA_GROUP)
CONF.register_opts(nova_auth_opts, group=NOVA_GROUP)

LOG = logging.getLogger(__name__)

NOVA_API_VERSION = "2.1"

nova_extensions = [
    ext for ext in nova_client.discover_extensions(NOVA_API_VERSION)
    if ext.name in ("assisted_volume_snapshots", "list_extensions")
]
Ejemplo n.º 42
0
               choices=['public', 'admin', 'internal'],
               help='Type of the nova endpoint to use.  This endpoint will '
                    'be looked up in the keystone catalog and should be '
                    'one of public, internal or admin.'),
    cfg.StrOpt('token_auth_url',
               help='The authentication URL for the nova connection when '
                    'using the current user''s token'),
]


NOVA_GROUP = 'nova'
CONF = cfg.CONF

deprecations = {'cafile': [cfg.DeprecatedOpt('nova_ca_certificates_file')],
                'insecure': [cfg.DeprecatedOpt('nova_api_insecure')]}
nova_session_opts = ks_loading.get_session_conf_options(
    deprecated_opts=deprecations)
nova_auth_opts = ks_loading.get_auth_common_conf_options()

CONF.register_opts(old_opts)
CONF.register_opts(nova_opts, group=NOVA_GROUP)
CONF.register_opts(nova_session_opts, group=NOVA_GROUP)
CONF.register_opts(nova_auth_opts, group=NOVA_GROUP)

LOG = logging.getLogger(__name__)

NOVA_API_VERSION = "2.1"

nova_extensions = [ext for ext in
                   nova_client.discover_extensions(NOVA_API_VERSION)
                   if ext.name in ("assisted_volume_snapshots",
                                   "list_extensions",
Ejemplo n.º 43
0
def list_opts():
    return {
        glance_group: (
            glance_opts +
            ks_loading.get_session_conf_options())
    }
Ejemplo n.º 44
0
Archivo: nova.py Proyecto: mahak/cinder
    cfg.StrOpt('interface',
               default='public',
               choices=['public', 'admin', 'internal'],
               help='Type of the nova endpoint to use.  This endpoint will '
                    'be looked up in the keystone catalog and should be '
                    'one of public, internal or admin.'),
    cfg.StrOpt('token_auth_url',
               help='The authentication URL for the nova connection when '
                    'using the current user''s token'),
]


NOVA_GROUP = 'nova'
CONF = cfg.CONF

nova_session_opts = ks_loading.get_session_conf_options()
nova_auth_opts = ks_loading.get_auth_common_conf_options()

CONF.register_opts(nova_opts, group=NOVA_GROUP)
CONF.register_opts(nova_session_opts, group=NOVA_GROUP)
CONF.register_opts(nova_auth_opts, group=NOVA_GROUP)

LOG = logging.getLogger(__name__)

NOVA_API_VERSION = "2.1"

nova_extensions = [ext for ext in
                   nova_client.discover_extensions(NOVA_API_VERSION)
                   if ext.name in ("assisted_volume_snapshots",
                                   "list_extensions",
                                   "server_external_events")]
Ejemplo n.º 45
0
The number of times to retry when a request conflicts.
If set to 0, only try once, no retries.

Related options:

* api_retry_interval
"""),
    cfg.IntOpt(
        'api_retry_interval',
        default=2,
        min=0,
        help="""
The number of seconds to wait before retrying the request.

Related options:

* api_max_retries
"""),
]

ironic_opts = opts + ks_loading.get_session_conf_options() + \
    ks_loading.get_auth_common_conf_options() + \
    ks_loading.get_auth_plugin_conf_options('v3password')


def register_opts(conf):
    conf.register_group(opt_group)
    conf.register_opts(opts, group=opt_group)
    ks_loading.register_auth_conf_options(conf, group=opt_group.name)
    ks_loading.register_session_conf_options(conf, group=opt_group.name)
Ejemplo n.º 46
0
# License for the specific language governing permissions and limitations
# under the License.

from keystoneauth1 import loading
from keystoneclient.v3 import client as ks_client_v3
from oslo_config import cfg

CONF = cfg.CONF

CFG_GROUP = "keystone_auth"

loading.register_auth_conf_options(CONF, CFG_GROUP)
loading.register_session_conf_options(CONF, CFG_GROUP)

opts = (loading.get_auth_common_conf_options() +
        loading.get_session_conf_options() +
        loading.get_auth_plugin_conf_options('password'))


def get_session(conf, project):
    """Get an auth session."""
    auth_plugin = loading.load_auth_from_conf_options(conf, CFG_GROUP,
                                                      project_name=project)
    return loading.load_session_from_conf_options(conf, CFG_GROUP,
                                                  auth=auth_plugin)


def get_client(conf, project):
    """Return a client for Keystone."""
    sess = get_session(conf, project)
    return ks_client_v3.Client(session=sess)
def list_opts():
    return {
        keystone_group: (ks_loading.get_session_conf_options() +
                         confutils.get_ksa_adapter_opts(DEFAULT_SERVICE_TYPE))
    }
Ejemplo n.º 48
0
Archivo: opts.py Proyecto: mahak/cinder
def list_opts():
    return [
        ('backend',
            itertools.chain(
                [cinder_cmd_volume.host_opt],
            )),
        ('brcd_fabric_example',
            itertools.chain(
                cinder_zonemanager_drivers_brocade_brcdfabricopts.
                brcd_zone_opts,
            )),
        ('cisco_fabric_example',
            itertools.chain(
                cinder_zonemanager_drivers_cisco_ciscofabricopts.
                cisco_zone_opts,
            )),
        ('coordination',
            itertools.chain(
                cinder_coordination.coordination_opts,
            )),
        ('DEFAULT',
            itertools.chain(
                cinder_api_common.api_common_opts,
                [cinder_api_middleware_auth.use_forwarded_for_opt],
                cinder_api_views_versions.versions_opts,
                cinder_backup_api.backup_opts,
                cinder_backup_chunkeddriver.backup_opts,
                cinder_backup_driver.backup_opts,
                cinder_backup_drivers_ceph.service_opts,
                cinder_backup_drivers_gcs.gcsbackup_service_opts,
                cinder_backup_drivers_glusterfs.glusterfsbackup_service_opts,
                cinder_backup_drivers_nfs.nfsbackup_service_opts,
                cinder_backup_drivers_posix.posixbackup_service_opts,
                cinder_backup_drivers_swift.swiftbackup_service_opts,
                cinder_backup_drivers_tsm.tsm_opts,
                cinder_backup_manager.backup_manager_opts,
                [cinder_cmd_backup.backup_workers_opt],
                [cinder_cmd_volume.cluster_opt],
                cinder_common_config.api_opts,
                cinder_common_config.core_opts,
                cinder_common_config.auth_opts,
                cinder_common_config.backup_opts,
                cinder_common_config.image_opts,
                cinder_common_config.global_opts,
                cinder.compute.compute_opts,
                cinder_context.context_opts,
                cinder_db_api.db_opts,
                cinder_db_api.backup_opts,
                [cinder_db_base.db_driver_opt],
                cinder_image_glance.image_opts,
                cinder_image_glance.glance_core_properties_opts,
                cinder_image_imageutils.image_opts,
                cinder_message_api.messages_opts,
                cinder_quota.quota_opts,
                cinder_scheduler_driver.scheduler_driver_opts,
                cinder_scheduler_hostmanager.host_manager_opts,
                cinder_scheduler_manager.scheduler_manager_opts,
                [cinder_scheduler_scheduleroptions.
                    scheduler_json_config_location_opt],
                cinder_scheduler_weights_capacity.capacity_weight_opts,
                cinder_scheduler_weights_volumenumber.
                volume_number_weight_opts,
                cinder_service.service_opts,
                cinder_sshutils.ssh_opts,
                cinder_transfer_api.volume_transfer_opts,
                [cinder_volume_api.allow_force_upload_opt],
                [cinder_volume_api.volume_host_opt],
                [cinder_volume_api.volume_same_az_opt],
                [cinder_volume_api.az_cache_time_opt],
                cinder_volume_driver.volume_opts,
                cinder_volume_driver.iser_opts,
                cinder_volume_driver.nvmet_opts,
                cinder_volume_driver.scst_opts,
                cinder_volume_driver.backup_opts,
                cinder_volume_driver.image_opts,
                cinder_volume_drivers_fusionstorage_dsware.volume_opts,
                cinder_volume_drivers_inspur_as13000_as13000driver.
                inspur_as13000_opts,
                cinder_volume_drivers_inspur_instorage_instoragecommon.
                instorage_mcs_opts,
                cinder_volume_drivers_inspur_instorage_instorageiscsi.
                instorage_mcs_iscsi_opts,
                cinder_volume_drivers_storpool.storpool_opts,
                cinder_volume_drivers_veritas_access_veritasiscsi.VA_VOL_OPTS,
                cinder_volume_manager.volume_manager_opts,
                cinder_wsgi_eventletserver.socket_opts,
            )),
        ('fc-zone-manager',
            itertools.chain(
                cinder_zonemanager_drivers_brocade_brcdfczonedriver.brcd_opts,
                cinder_zonemanager_drivers_cisco_ciscofczonedriver.cisco_opts,
                cinder_zonemanager_fczonemanager.zone_manager_opts,
            )),
        ('key_manager',
            itertools.chain(
                cinder_keymgr_confkeymgr.key_mgr_opts,
            )),
        ('service_user',
            itertools.chain(
                cinder_serviceauth.service_user_opts,
                loading.get_session_conf_options(),
            )),
        ('backend_defaults',
            itertools.chain(
                cinder_volume_driver.volume_opts,
                cinder_volume_driver.iser_opts,
                cinder_volume_driver.nvmet_opts,
                cinder_volume_driver.scst_opts,
                cinder_volume_driver.image_opts,
                cinder_volume_drivers_datera_dateraiscsi.d_opts,
                cinder_volume_drivers_dell_emc_powermax_common.powermax_opts,
                cinder_volume_drivers_dell_emc_ps.eqlx_opts,
                cinder_volume_drivers_dell_emc_sc_storagecentercommon.
                common_opts,
                cinder_volume_drivers_dell_emc_scaleio_driver.scaleio_opts,
                cinder_volume_drivers_dell_emc_unity_driver.UNITY_OPTS,
                cinder_volume_drivers_dell_emc_vnx_common.VNX_OPTS,
                cinder_volume_drivers_dell_emc_xtremio.XTREMIO_OPTS,
                cinder_volume_drivers_drbdmanagedrv.drbd_opts,
                cinder_volume_drivers_fujitsu_eternus_dx_eternusdxcommon.
                FJ_ETERNUS_DX_OPT_opts,
                cinder_volume_drivers_hpe_hpe3parcommon.hpe3par_opts,
                cinder_volume_drivers_hpe_hpelefthandiscsi.hpelefthand_opts,
                cinder_volume_drivers_huawei_common.huawei_opts,
                cinder_volume_drivers_ibm_flashsystemcommon.flashsystem_opts,
                cinder_volume_drivers_ibm_flashsystemiscsi.
                flashsystem_iscsi_opts,
                cinder_volume_drivers_ibm_gpfs.gpfs_opts,
                cinder_volume_drivers_ibm_gpfs.gpfs_remote_ssh_opts,
                cinder_volume_drivers_ibm_ibm_storage_ds8kproxy.ds8k_opts,
                cinder_volume_drivers_ibm_ibm_storage_ibmstorage.driver_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvccommon.
                storwize_svc_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvcfc.
                storwize_svc_fc_opts,
                cinder_volume_drivers_ibm_storwize_svc_storwizesvciscsi.
                storwize_svc_iscsi_opts,
                cinder_volume_drivers_infinidat.infinidat_opts,
                cinder_volume_drivers_kaminario_kaminariocommon.
                kaminario_opts,
                cinder_volume_drivers_lenovo_lenovocommon.common_opts,
                cinder_volume_drivers_lenovo_lenovocommon.iscsi_opts,
                cinder_volume_drivers_linstordrv.linstor_opts,
                cinder_volume_drivers_lvm.volume_opts,
                cinder_volume_drivers_netapp_options.netapp_proxy_opts,
                cinder_volume_drivers_netapp_options.netapp_connection_opts,
                cinder_volume_drivers_netapp_options.netapp_transport_opts,
                cinder_volume_drivers_netapp_options.netapp_basicauth_opts,
                cinder_volume_drivers_netapp_options.netapp_cluster_opts,
                cinder_volume_drivers_netapp_options.netapp_provisioning_opts,
                cinder_volume_drivers_netapp_options.netapp_img_cache_opts,
                cinder_volume_drivers_netapp_options.netapp_nfs_extra_opts,
                cinder_volume_drivers_netapp_options.netapp_san_opts,
                cinder_volume_drivers_netapp_options.netapp_replication_opts,
                cinder_volume_drivers_netapp_options.netapp_support_opts,
                cinder_volume_drivers_nexenta_options.NEXENTA_CONNECTION_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_ISCSI_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_DATASET_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_NFS_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_RRMGR_OPTS,
                cinder_volume_drivers_nexenta_options.NEXENTA_EDGE_OPTS,
                cinder_volume_drivers_nfs.nfs_opts,
                cinder_volume_drivers_nimble.nimble_opts,
                cinder_volume_drivers_prophetstor_options.DPL_OPTS,
                cinder_volume_drivers_pure.PURE_OPTS,
                cinder_volume_drivers_qnap.qnap_opts,
                cinder_volume_drivers_quobyte.volume_opts,
                cinder_volume_drivers_rbd.RBD_OPTS,
                cinder_volume_drivers_remotefs.nas_opts,
                cinder_volume_drivers_remotefs.volume_opts,
                cinder_volume_drivers_san_hp_hpmsacommon.common_opts,
                cinder_volume_drivers_san_hp_hpmsacommon.iscsi_opts,
                cinder_volume_drivers_san_san.san_opts,
                cinder_volume_drivers_sheepdog.sheepdog_opts,
                cinder_volume_drivers_solidfire.sf_opts,
                cinder_volume_drivers_synology_synologycommon.cinder_opts,
                cinder_volume_drivers_tintri.tintri_opts,
                cinder_volume_drivers_vmware_vmdk.vmdk_opts,
                cinder_volume_drivers_vzstorage.vzstorage_opts,
                cinder_volume_drivers_windows_iscsi.windows_opts,
                cinder_volume_drivers_windows_smbfs.volume_opts,
                cinder_volume_drivers_zadara.zadara_opts,
                cinder_volume_drivers_zfssa_zfssaiscsi.ZFSSA_OPTS,
                cinder_volume_drivers_zfssa_zfssanfs.ZFSSA_OPTS,
                cinder_volume_manager.volume_backend_opts,
                cinder_volume_targets_spdknvmf.spdk_opts,
            )),
        ('nova',
            itertools.chain(
                cinder_compute_nova.nova_opts,
                cinder_compute_nova.nova_session_opts,
                cinder_compute_nova.nova_auth_opts,
            )),
    ]