예제 #1
0
파일: placement.py 프로젝트: Juniper/nova
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'))
    }
예제 #2
0
파일: vendordata.py 프로젝트: Juniper/nova
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')
        )
    }
예제 #3
0
파일: neutron.py 프로젝트: Juniper/nova
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'))
    }
예제 #4
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'))
    }
예제 #5
0
파일: placement.py 프로젝트: mahak/nova
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))
    }
예제 #6
0
파일: neutron.py 프로젝트: arbrandes/nova
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))
    }
예제 #7
0
파일: ironic.py 프로젝트: alaski/nova
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")
    }
예제 #8
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
예제 #9
0
파일: auth.py 프로젝트: Tehsmash/ironic
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
예제 #10
0
    def test_loading_v3(self):
        section = uuid.uuid4().hex
        auth_url = uuid.uuid4().hex,
        token = uuid.uuid4().hex
        trust_id = uuid.uuid4().hex
        project_id = uuid.uuid4().hex
        project_domain_name = uuid.uuid4().hex

        self.conf_fixture.config(auth_section=section, group=self.GROUP)
        loading.register_auth_conf_options(self.conf_fixture.conf,
                                           group=self.GROUP)

        opts = loading.get_auth_plugin_conf_options(v3.Token())
        self.conf_fixture.register_opts(opts, group=section)

        self.conf_fixture.config(auth_type=self.V3TOKEN,
                                 auth_url=auth_url,
                                 token=token,
                                 trust_id=trust_id,
                                 project_id=project_id,
                                 project_domain_name=project_domain_name,
                                 group=section)

        a = loading.load_auth_from_conf_options(self.conf_fixture.conf,
                                                self.GROUP)

        self.assertEqual(token, a.auth_methods[0].token)
        self.assertEqual(trust_id, a.trust_id)
        self.assertEqual(project_id, a.project_id)
        self.assertEqual(project_domain_name, a.project_domain_name)
예제 #11
0
    def test_loading_v2(self):
        section = uuid.uuid4().hex
        auth_url = uuid.uuid4().hex
        username = uuid.uuid4().hex
        password = uuid.uuid4().hex
        trust_id = uuid.uuid4().hex
        tenant_id = uuid.uuid4().hex

        self.conf_fixture.config(auth_section=section, group=self.GROUP)
        loading.register_auth_conf_options(self.conf_fixture.conf,
                                           group=self.GROUP)

        opts = loading.get_auth_plugin_conf_options(v2.Password())
        self.conf_fixture.register_opts(opts, group=section)

        self.conf_fixture.config(auth_type=self.V2PASS,
                                 auth_url=auth_url,
                                 username=username,
                                 password=password,
                                 trust_id=trust_id,
                                 tenant_id=tenant_id,
                                 group=section)

        a = loading.load_auth_from_conf_options(self.conf_fixture.conf,
                                                self.GROUP)

        self.assertEqual(auth_url, a.auth_url)
        self.assertEqual(username, a.username)
        self.assertEqual(password, a.password)
        self.assertEqual(trust_id, a.trust_id)
        self.assertEqual(tenant_id, a.tenant_id)
예제 #12
0
파일: opts.py 프로젝트: andymcc/ceilometer
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')))]
예제 #13
0
파일: test_nova.py 프로젝트: mahak/cinder
    def setUp(self):
        super(NovaClientTestCase, self).setUp()

        # Register the Password auth plugin options,
        # so we can use CONF.set_override
        # reset() first, otherwise already registered CLI options will
        # prevent unregister in tearDown()
        # Use CONF.set_override(), because we'll unregister the opts,
        # no need (and not possible) to cleanup.
        CONF.reset()
        self.password_opts = \
            ks_loading.get_auth_plugin_conf_options('password')
        CONF.register_opts(self.password_opts, group='nova')
        CONF.set_override('auth_url',
                          'http://keystonehost:5000',
                          group='nova')
        CONF.set_override('username', 'adminuser', group='nova')
        CONF.set_override('password', 'strongpassword', group='nova')
        self.ctx = context.RequestContext('regularuser', 'e3f0833dc08b4cea',
                                          auth_token='token', is_admin=False)
        self.ctx.service_catalog = \
            [{'type': 'compute', 'name': 'nova', 'endpoints':
              [{'publicURL': 'http://novahost:8774/v2/e3f0833dc08b4cea'}]},
             {'type': 'identity', 'name': 'keystone', 'endpoints':
              [{'publicURL': 'http://keystonehostfromsc:5000/v3'}]}]

        self.override_config('auth_type', 'password', group='nova')
        self.override_config('cafile', 'my.ca', group='nova')
예제 #14
0
파일: opts.py 프로젝트: ityaptin/ceilometer
def list_opts():
    return [
        ('DEFAULT',
         itertools.chain(ceilometer.agent.manager.OPTS,
                         ceilometer.api.app.OPTS,
                         ceilometer.cmd.polling.CLI_OPTS,
                         ceilometer.compute.util.OPTS,
                         ceilometer.compute.virt.inspector.OPTS,
                         ceilometer.compute.virt.libvirt.inspector.OPTS,
                         ceilometer.dispatcher.OPTS,
                         ceilometer.ipmi.notifications.ironic.OPTS,
                         ceilometer.middleware.OPTS,
                         ceilometer.nova_client.OPTS,
                         ceilometer.objectstore.swift.OPTS,
                         ceilometer.pipeline.OPTS,
                         ceilometer.sample.OPTS,
                         ceilometer.service.OPTS,
                         ceilometer.utils.OPTS,)),
        ('api', ceilometer.api.app.API_OPTS),
        ('collector',
         itertools.chain(ceilometer.collector.OPTS,
                         [ceilometer.service.COLL_OPT])),
        ('compute', ceilometer.compute.discovery.OPTS),
        ('coordination', ceilometer.coordination.OPTS),
        ('database', ceilometer.storage.OPTS),
        ('dispatcher_file', ceilometer.dispatcher.file.OPTS),
        ('dispatcher_gnocchi', ceilometer.dispatcher.gnocchi.dispatcher_opts),
        ('event', ceilometer.event.converter.OPTS),
        ('exchange_control', ceilometer.exchange_control.EXCHANGE_OPTS),
        ('hardware', ceilometer.hardware.discovery.OPTS),
        ('ipmi',
         itertools.chain(ceilometer.ipmi.platform.intel_node_manager.OPTS,
                         ceilometer.ipmi.pollsters.OPTS)),
        ('meter', ceilometer.meter.notifications.OPTS),
        ('notification',
         itertools.chain(ceilometer.notification.OPTS,
                         [ceilometer.service.NOTI_OPT])),
        ('polling', ceilometer.agent.manager.POLLING_OPTS),
        ('publisher', ceilometer.publisher.utils.OPTS),
        ('publisher_notifier', ceilometer.publisher.messaging.NOTIFIER_OPTS),
        ('rgw_admin_credentials', ceilometer.objectstore.rgw.CREDENTIAL_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.
        ('service_credentials', (
            ceilometer.keystone_client.CLI_OPTS +
            loading.get_auth_common_conf_options() +
            loading.get_auth_plugin_conf_options('password'))),
        ('service_types',
         itertools.chain(ceilometer.energy.kwapi.SERVICE_OPTS,
                         ceilometer.image.discovery.SERVICE_OPTS,
                         ceilometer.neutron_client.SERVICE_OPTS,
                         ceilometer.nova_client.SERVICE_OPTS,
                         ceilometer.objectstore.rgw.SERVICE_OPTS,
                         ceilometer.objectstore.swift.SERVICE_OPTS,)),
        ('storage', ceilometer.dispatcher.STORAGE_OPTS),
        ('vmware', ceilometer.compute.virt.vmware.inspector.OPTS),
        ('xenapi', ceilometer.compute.virt.xenapi.inspector.OPTS),
    ]
예제 #15
0
파일: opts.py 프로젝트: zqfan/aodh
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.
    # Also, the default loaded plugin is password-aodh-legacy for
    # backward compatibily
    return [('service_credentials', (
            loading.get_auth_common_conf_options() +
            loading.get_auth_plugin_conf_options('password')))]
예제 #16
0
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', itertools.chain(
        loading.get_auth_common_conf_options(),
        loading.get_auth_plugin_conf_options('password'),
        ceilometer.keystone_client.CLI_OPTS
    ))]
예제 #17
0
파일: opts.py 프로젝트: celebdor/kuryr
def list_neutron_opts():
    opt_list = copy.deepcopy(config.neutron_opts)
    opt_list.insert(0, ks_loading.get_auth_common_conf_options()[0])
    # 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)]
예제 #18
0
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
예제 #19
0
파일: opts.py 프로젝트: openstack/neutron
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)]
예제 #20
0
    def test_same_section(self, m):
        opts = loading.get_auth_plugin_conf_options(utils.MockLoader())
        self.conf_fixture.register_opts(opts, group=self.GROUP)

        loading.register_auth_conf_options(self.conf_fixture.conf,
                                           group=self.GROUP)
        self.conf_fixture.config(auth_type=uuid.uuid4().hex,
                                 group=self.GROUP,
                                 **self.TEST_VALS)

        a = loading.load_auth_from_conf_options(self.conf_fixture.conf,
                                                self.GROUP)
        self.assertTestVals(a)
예제 #21
0
파일: opts.py 프로젝트: openstack/octavia
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)
    def configure_middleware(self,
                             auth_type,
                             **kwargs):
        opts = loading.get_auth_plugin_conf_options(auth_type)
        self.cfg.register_opts(opts, group=_base.AUTHTOKEN_GROUP)

        # Since these tests cfg.config() themselves rather than waiting for
        # auth_token to do it on __init__ we need to register the base auth
        # options (e.g., auth_plugin)
        loading.register_auth_conf_options(self.cfg.conf,
                                           group=_base.AUTHTOKEN_GROUP)

        self.cfg.config(group=_base.AUTHTOKEN_GROUP,
                        auth_type=auth_type,
                        **kwargs)
예제 #23
0
def _gen_opts_from_plugins():
    opts = copy.deepcopy(neutron_options)
    opts.insert(0, ks_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 = ks_loading.get_plugin_loader(name)
        for plugin_option in ks_loading.get_auth_plugin_conf_options(plugin):
            for option in opts:
                if option.name == plugin_option.name:
                    break
            else:
                opts.append(plugin_option)
    opts.sort(key=lambda x: x.name)
    return opts
예제 #24
0
    def test_other_params(self, m):
        m.return_value = utils.MockManager(utils.MockLoader())
        driver_name = uuid.uuid4().hex

        opts = loading.get_auth_plugin_conf_options(utils.MockLoader())
        self.conf_fixture.register_opts(opts, group=self.GROUP)
        self.conf_fixture.config(auth_type=driver_name,
                                 group=self.GROUP,
                                 **self.TEST_VALS)

        a = loading.load_auth_from_conf_options(self.conf_fixture.conf,
                                                self.GROUP)
        self.assertTestVals(a)

        m.assert_called_once_with(namespace=loading.PLUGIN_NAMESPACE,
                                  name=driver_name,
                                  invoke_on_load=True)
예제 #25
0
 def test_legacy_loading_new_in_legacy(self, load_auth_mock, load_mock):
     # NOTE(pas-ha) this is due to auth_plugin options
     # being dynamically registered on first load,
     # but we need to set the config before
     plugin = kaloading.get_plugin_loader('password')
     opts = kaloading.get_auth_plugin_conf_options(plugin)
     self.cfg_fixture.register_opts(opts, group=ironic_auth.LEGACY_SECTION)
     self.config(group=ironic_auth.LEGACY_SECTION,
                 auth_uri='http://127.0.0.1:9898',
                 username='******',
                 password='******',
                 project_name='fake_tenant',
                 auth_url='http://127.0.0.1:9898',
                 auth_type='password')
     load_auth_mock.side_effect = [None, mock.Mock()]
     keystone.get_session(self.test_group)
     self.assertFalse(load_mock.called)
     self.assertEqual(2, load_auth_mock.call_count)
예제 #26
0
파일: opts.py 프로젝트: Jean-Emile/watcher
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()))
    ]
예제 #27
0
 def setUp(self):
     super(KeystoneTestCase, self).setUp()
     self.test_group = 'test_group'
     self.cfg_fixture.conf.register_group(cfg.OptGroup(self.test_group))
     ironic_auth.register_auth_opts(self.cfg_fixture.conf, self.test_group,
                                    service_type='vikings')
     self.config(auth_type='password',
                 group=self.test_group)
     # NOTE(pas-ha) this is due to auth_plugin options
     # being dynamically registered on first load,
     # but we need to set the config before
     plugin = kaloading.get_plugin_loader('password')
     opts = kaloading.get_auth_plugin_conf_options(plugin)
     self.cfg_fixture.register_opts(opts, group=self.test_group)
     self.config(auth_url='http://127.0.0.1:9898',
                 username='******',
                 password='******',
                 project_name='fake_tenant',
                 group=self.test_group)
예제 #28
0
 def setUp(self):
     super(CheckImageServiceTestCase, self).setUp()
     self.context = context.RequestContext(global_request_id='global')
     self.service = service.GlanceImageService(None, self.context)
     # NOTE(pas-ha) register keystoneauth dynamic options manually
     plugin = kaloading.get_plugin_loader('password')
     opts = kaloading.get_auth_plugin_conf_options(plugin)
     self.cfg_fixture.register_opts(opts, group='glance')
     self.config(auth_type='password',
                 auth_url='viking',
                 username='******',
                 password='******',
                 project_name='parrot',
                 service_type='image',
                 region_name='SomeRegion',
                 interface='internal',
                 auth_strategy='keystone',
                 group='glance')
     base_image_service._GLANCE_SESSION = None
예제 #29
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)]
예제 #30
0
    def setUp(self):
        super(TestDesignateClientKeystoneV3, self).setUp()
        # Register the Password auth plugin options,
        # so we can use CONF.set_override
        password_option = loading.get_auth_plugin_conf_options('password')
        config.cfg.CONF.register_opts(password_option, group='designate')
        self.addCleanup(
            config.cfg.CONF.unregister_opts,
            password_option, group='designate')

        config.cfg.CONF.set_override('url',
                                     self.TEST_URL,
                                     group='designate')
        config.cfg.CONF.set_override('auth_type',
                                     'password',
                                     group='designate')
        config.cfg.CONF.set_override('username',
                                     self.TEST_ADMIN_USERNAME,
                                     group='designate')
        config.cfg.CONF.set_override('password',
                                     self.TEST_ADMIN_PASSWORD,
                                     group='designate')
        config.cfg.CONF.set_override('user_domain_id',
                                     self.TEST_ADMIN_USER_DOMAIN_ID,
                                     group='designate')
        config.cfg.CONF.set_override('project_domain_id',
                                     self.TEST_ADMIN_PROJECT_DOMAIN_ID,
                                     group='designate')
        config.cfg.CONF.set_override('auth_url',
                                     self.TEST_ADMIN_AUTH_URL,
                                     group='designate')

        # enforce session recalculation
        mock.patch.object(driver, '_SESSION', new=None).start()
        self.driver_session = (
            mock.patch.object(session, 'Session').start())
        self.load_auth = (
            mock.patch.object(driver.loading,
                'load_auth_from_conf_options').start())
        self.password = (
            mock.patch.object(driver.password, 'Password').start())
예제 #31
0
def list_opts():
    return [
        ('DEFAULT',
         itertools.chain(ceilometer.agent.manager.OPTS,
                         ceilometer.api.app.OPTS,
                         ceilometer.cmd.polling.CLI_OPTS,
                         ceilometer.compute.notifications.OPTS,
                         ceilometer.compute.util.OPTS,
                         ceilometer.compute.virt.inspector.OPTS,
                         ceilometer.compute.virt.libvirt.inspector.OPTS,
                         ceilometer.dispatcher.OPTS,
                         ceilometer.image.glance.OPTS,
                         ceilometer.ipmi.notifications.ironic.OPTS,
                         ceilometer.middleware.OPTS,
                         ceilometer.network.notifications.OPTS,
                         ceilometer.nova_client.OPTS,
                         ceilometer.objectstore.swift.OPTS,
                         ceilometer.pipeline.OPTS,
                         ceilometer.sample.OPTS,
                         ceilometer.service.OPTS,
                         ceilometer.storage.OLD_OPTS,
                         ceilometer.storage.CLI_OPTS,
                         ceilometer.utils.OPTS,)),
        ('api',
         itertools.chain(ceilometer.api.OPTS,
                         ceilometer.api.app.API_OPTS,
                         [ceilometer.service.API_OPT])),
        # deprecated path, new one is 'polling'
        ('central', ceilometer.agent.manager.OPTS),
        ('collector',
         itertools.chain(ceilometer.collector.OPTS,
                         [ceilometer.service.COLL_OPT])),
        ('compute', ceilometer.compute.discovery.OPTS),
        ('coordination', ceilometer.coordination.OPTS),
        ('database', ceilometer.storage.OPTS),
        ('dispatcher_file', ceilometer.dispatcher.file.OPTS),
        ('dispatcher_gnocchi', ceilometer.dispatcher.gnocchi.dispatcher_opts),
        ('event', ceilometer.event.converter.OPTS),
        ('exchange_control', ceilometer.exchange_control.EXCHANGE_OPTS),
        ('hardware', ceilometer.hardware.discovery.OPTS),
        ('ipmi',
         itertools.chain(ceilometer.ipmi.platform.intel_node_manager.OPTS,
                         ceilometer.ipmi.pollsters.OPTS)),
        ('meter', ceilometer.meter.notifications.OPTS),
        ('notification',
         itertools.chain(ceilometer.notification.OPTS,
                         [ceilometer.service.NOTI_OPT])),
        ('polling', ceilometer.agent.manager.OPTS),
        ('publisher', ceilometer.publisher.utils.OPTS),
        ('publisher_notifier', ceilometer.publisher.messaging.NOTIFIER_OPTS),
        ('rgw_admin_credentials', ceilometer.objectstore.rgw.CREDENTIAL_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.
        # Also, the default loaded plugin is password-ceilometer-legacy for
        # backward compatibility
        ('service_credentials', (
            ceilometer.keystone_client.CLI_OPTS +
            loading.get_auth_common_conf_options() +
            loading.get_auth_plugin_conf_options('password'))),
        ('service_types',
         itertools.chain(ceilometer.energy.kwapi.SERVICE_OPTS,
                         ceilometer.image.glance.SERVICE_OPTS,
                         ceilometer.neutron_client.SERVICE_OPTS,
                         ceilometer.nova_client.SERVICE_OPTS,
                         ceilometer.objectstore.rgw.SERVICE_OPTS,
                         ceilometer.objectstore.swift.SERVICE_OPTS,)),
        ('storage', ceilometer.dispatcher.STORAGE_OPTS),
        ('vmware', ceilometer.compute.virt.vmware.inspector.OPTS),
        ('xenapi', ceilometer.compute.virt.xenapi.inspector.OPTS),
    ]
예제 #32
0
def list_opts():
    return {
        'DEFAULT': default_options,
        'keystone_authtoken': loading.get_auth_plugin_conf_options('password')
    }
예제 #33
0
def register_opts(conf):
    conf.register_group(api_group)
    conf.register_opts(monitor_api_opts, group=api_group)
    conf.register_opts(ks_loading.get_auth_plugin_conf_options('password'),
                       group=api_group)
예제 #34
0
def list_opts():
    return [(constants.IRONIC_GROUP_NAME,
             IRONIC_OPTS + loading.get_session_conf_options() +
             loading.get_auth_plugin_conf_options('v3password'))]
예제 #35
0
def list_opts():
    return [
        (IRONIC_GROUP, IRONIC_OPTS
         + loading.get_adapter_conf_options(deprecated_opts=_deprecated_opts)
         + loading.get_session_conf_options(deprecated_opts=_deprecated_opts)
         + loading.get_auth_plugin_conf_options('v3password'))]
예제 #36
0
파일: zaqar.py 프로젝트: albertjone/senlin
def list_opts():
    return {
        ZAQAR_GROUP: (ksa_loading.get_auth_common_conf_options() +
                      ksa_loading.get_auth_plugin_conf_options('password'))
    }
예제 #37
0
def list_keystoneauth_opts():
    return [(GROUP_NAME, (ks_loading.get_auth_common_conf_options() +
                          ks_loading.get_auth_plugin_conf_options('password')))
            ]
예제 #38
0
    ('heat',
     murano.common.config.heat_opts + ks_loading.get_session_conf_options()),
    ('neutron', murano.common.config.neutron_opts +
     ks_loading.get_session_conf_options()),
    ('murano',
     murano.common.config.murano_opts + ks_loading.get_session_conf_options()),
    ('glare',
     murano.common.config.glare_opts + ks_loading.get_session_conf_options()),
    ('mistral', murano.common.config.mistral_opts +
     ks_loading.get_session_conf_options()),
    ('networking', murano.common.config.networking_opts),
    ('stats', murano.common.config.stats_opts),
    ('murano_auth', murano.common.config.murano_auth_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')),
    (None,
     build_list([
         murano.common.config.metadata_dir,
         murano.common.config.bind_opts,
         murano.common.config.file_server,
         murano.common.wsgi.wsgi_opts,
     ])),
]

_cfapi_opt_lists = [
    ('cfapi', murano.common.cf_config.cfapi_opts),
    ('glare',
     murano.common.config.glare_opts + ks_loading.get_session_conf_options())
예제 #39
0
파일: keystone.py 프로젝트: knowx/digital
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}
예제 #40
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_cmd_opts,
                [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_driver.fqdn_opts,
                cinder_volume_drivers_dell_emc_powerflex_driver.
                powerflex_opts,
                cinder_volume_drivers_dell_emc_powermax_common.powermax_opts,
                cinder_volume_drivers_dell_emc_powerstore_driver.
                POWERSTORE_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_xtremio.XTREMIO_OPTS,
                cinder_volume_drivers_fujitsu_eternus_dx_eternusdxcommon.
                FJ_ETERNUS_DX_OPT_opts,
                cinder_volume_drivers_hitachi_hbsdcommon.COMMON_VOLUME_OPTS,
                cinder_volume_drivers_hitachi_hbsdfc.FC_VOLUME_OPTS,
                cinder_volume_drivers_hitachi_hbsdrest.REST_VOLUME_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,
            )),
    ]
예제 #41
0
def list_opts():
    trustee_opts = ks_loading.get_auth_common_conf_options()
    trustee_opts.extend(ks_loading.get_auth_plugin_conf_options(
        V3_PASSWORD_PLUGIN))
    yield TRUSTEE_CONF_GROUP, trustee_opts
예제 #42
0
 def tearDown(self):
     super(TestDesignateClientKeystoneV3, self).tearDown()
     config.cfg.CONF.unregister_opts(
         loading.get_auth_plugin_conf_options('password'),
         group='designate')
예제 #43
0
def _config_options():
    trustee_opts = loading.get_auth_common_conf_options()
    trustee_opts.extend(loading.get_auth_plugin_conf_options(PASSWORD_PLUGIN))
    yield TRUSTEE_CONF_GROUP, trustee_opts
예제 #44
0
파일: keystone.py 프로젝트: taget/higgins
from keystoneauth1.identity import access as ka_access_plugin
from keystoneauth1.identity import v3 as ka_v3
from keystoneauth1 import loading as ka_loading
from keystoneclient.v3 import client as kc_v3
from oslo_config import cfg
from oslo_log import log as logging

from higgins.common import exception
from higgins.common.i18n import _LE

CONF = cfg.CONF
CFG_GROUP = 'keystone_auth'
LOG = logging.getLogger(__name__)

keystone_auth_opts = (ka_loading.get_auth_common_conf_options() +
                      ka_loading.get_auth_plugin_conf_options('password'))

CONF.import_group('keystone_authtoken', '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)


class KeystoneClientV3(object):
    """Keystone client wrapper so we can encapsulate logic in one place."""

    def __init__(self, context):
        self.context = context
        self._client = None
        self._session = None
예제 #45
0
파일: api.py 프로젝트: iorchard/okidoki
def list_opts():
    return {
        api_group: (monitor_api_opts +
                    ks_loading.get_auth_plugin_conf_options('password'))
    }
예제 #46
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')
            }
예제 #47
0
def register_opts(conf):
    conf.register_opts(default_options)
    conf.register_opts(loading.get_auth_plugin_conf_options('password'),
                       group='keystone_authtoken')