Exemple #1
0
def list_opts():
    # yield None, rpc_opts
    yield None, engine_opts
    yield None, service_opts
    yield paste_deploy_group.name, paste_deploy_opts
    yield auth_password_group.name, auth_password_opts
    yield revision_group.name, revision_opts
    yield profiler.list_opts()[0]
    yield fusionsphere_group, fusionsphere_opts
    yield 'clients', default_clients_opts

    for client in ('barbican', 'ceilometer', 'cinder', 'designate', 'glance',
                   'heat', 'keystone', 'magnum', 'manila', 'mistral',
                   'neutron', 'nova', 'sahara', 'senlin', 'swift', 'trove',
                   'zaqar', 'ces', 'groupwatch', 'scheduler', 'his'):
        client_specific_group = 'clients_' + client
        yield client_specific_group, clients_opts

    yield 'clients_heat', heat_client_opts
    yield 'clients_keystone', keystone_client_opts
    yield 'clients_nova', client_http_log_debug_opts
    yield 'clients_cinder', client_http_log_debug_opts
    yield 'clients_ces', ces_client_opts
    yield 'clients_groupwatch', groupwatch_client_opts
    yield 'clients_scheduler', sheduler_client_opts
    yield 'clients_his', his_client_opts
Exemple #2
0
def list_opts():
    """Return a list of oslo.config options available.

    The purpose of this function is to allow tools like the Oslo sample config
    file generator to discover the options exposed to users by this service.
    The returned list includes all oslo.config options which may be registered
    at runtime by the service api/engine.

    Each element of the list is a tuple. The first element is the name of the
    group under which the list of elements in the second element will be
    registered. A group name of None corresponds to the [DEFAULT] group in
    config files.

    This function is also discoverable via the 'senlin.config' entry point
    under the 'oslo.config.opts' namespace.

    :returns: a list of (group_name, opts) tuples
    """
    for g, o in wsgi.wsgi_opts():
        yield g, o
    yield 'DEFAULT', cloud_backend_opts
    yield 'DEFAULT', rpc_opts
    yield 'DEFAULT', engine_opts
    yield 'DEFAULT', service_opts
    yield 'DEFAULT', event_opts
    yield authentication_group.name, authentication_opts
    yield dispatcher_group.name, dispatcher_opts
    yield healthmgr_group.name, healthmgr_opts
    yield revision_group.name, revision_opts
    yield receiver_group.name, receiver_opts
    yield zaqar_group.name, zaqar_opts
    yield profiler.list_opts()[0]
Exemple #3
0
def list_opts():
    yield None, rpc_opts
    yield None, engine_opts
    yield None, service_opts
    yield paste_deploy_group.name, paste_deploy_opts
    yield auth_password_group.name, auth_password_opts
    yield revision_group.name, revision_opts
    yield volumes_group.name, volumes_opts
    yield noauth_group.name, noauth_opts
    yield profiler.list_opts()[0]
    yield 'clients', default_clients_opts

    for client in ('aodh', 'barbican', 'cinder', 'designate',
                   'glance', 'heat', 'keystone', 'magnum', 'manila', 'mistral',
                   'monasca', 'neutron', 'nova', 'octavia', 'sahara', 'senlin',
                   'swift', 'trove', 'vitrage', 'zaqar'
                   ):
        client_specific_group = 'clients_' + client
        yield client_specific_group, clients_opts

    yield 'clients_heat', heat_client_opts
    yield 'clients_keystone', keystone_client_opts
    yield 'clients_nova', client_http_log_debug_opts
    yield 'clients_cinder', client_http_log_debug_opts
    yield oslo_db_ops.list_opts()[0]
Exemple #4
0
def list_opts():
    # yield None, rpc_opts
    yield None, engine_opts
    yield None, service_opts
    yield paste_deploy_group.name, paste_deploy_opts
    yield auth_password_group.name, auth_password_opts
    yield revision_group.name, revision_opts
    yield profiler.list_opts()[0]
    yield fusionsphere_group, fusionsphere_opts
    yield 'clients', default_clients_opts

    for client in ('barbican', 'ceilometer', 'cinder', 'designate', 'glance',
                   'heat', 'keystone', 'magnum', 'manila', 'mistral',
                   'neutron', 'nova', 'sahara', 'senlin', 'swift', 'trove',
                   'zaqar', 'ces', 'groupwatch', 'scheduler', 'his'
                   ):
        client_specific_group = 'clients_' + client
        yield client_specific_group, clients_opts

    yield 'clients_heat', heat_client_opts
    yield 'clients_keystone', keystone_client_opts
    yield 'clients_nova', client_http_log_debug_opts
    yield 'clients_cinder', client_http_log_debug_opts
    yield 'clients_ces', ces_client_opts
    yield 'clients_groupwatch', groupwatch_client_opts
    yield 'clients_scheduler', sheduler_client_opts
    yield 'clients_his', his_client_opts
Exemple #5
0
    def _fetch_osprofiler_data(cls, connection_str, trace_id):
        from osprofiler.drivers import base
        from osprofiler import opts as osprofiler_opts

        opts.register_opts(osprofiler_opts.list_opts())

        try:
            engine = base.get_driver(connection_str)
        except Exception:
            msg = "Error while fetching OSProfiler results."
            if logging.is_debug():
                LOG.exception(msg)
            else:
                LOG.error(msg)
            return None

        return engine.get_report(trace_id)
Exemple #6
0
    def get_osprofiler_data(cls, data):

        from osprofiler import cmd
        from osprofiler.drivers import base
        from osprofiler import opts as osprofiler_opts

        opts.register_opts(osprofiler_opts.list_opts())

        try:
            engine = base.get_driver(data["data"]["conn_str"])
        except Exception:
            msg = "Error while fetching OSProfiler results."
            if logging.is_debug():
                LOG.exception(msg)
            else:
                LOG.error(msg)
            return None

        data["widget"] = "EmbedChart"
        data["title"] = "{0} : {1}".format(data["title"],
                                           data["data"]["trace_id"][0])

        path = "%s/template.html" % os.path.dirname(cmd.__file__)
        with open(path) as f:
            html_obj = f.read()

        osp_data = engine.get_report(data["data"]["trace_id"][0])
        osp_data = json.dumps(osp_data,
                              indent=4,
                              separators=(",", ": "),
                              default=_datetime_json_serialize)
        data["data"] = html_obj.replace("$DATA", osp_data)
        data["data"] = data["data"].replace("$LOCAL", "false")

        # NOTE(chenxu): self._data will be passed to
        # ["complete_output"]["data"] as a whole string and
        # tag </script> will be parsed incorrectly in javascript string
        # so we turn it to <\/script> and turn it back in javascript.
        data["data"] = data["data"].replace("/script>", "\/script>")

        return {
            "title": data["title"],
            "widget": data["widget"],
            "data": data["data"]
        }
Exemple #7
0
def list_opts():
    yield None, rpc_opts
    yield None, engine_opts
    yield None, service_opts
    yield paste_deploy_group.name, paste_deploy_opts
    yield auth_password_group.name, auth_password_opts
    yield revision_group.name, revision_opts
    yield profiler.list_opts()[0]
    yield 'clients', default_clients_opts

    for client in ('nova', 'swift', 'neutron', 'cinder',
                   'ceilometer', 'keystone', 'heat', 'glance', 'trove',
                   'sahara'):
        client_specific_group = 'clients_' + client
        yield client_specific_group, clients_opts

    yield 'clients_heat', heat_client_opts
    yield 'clients_keystone', keystone_client_opts
    yield 'clients_nova', client_http_log_debug_opts
    yield 'clients_cinder', client_http_log_debug_opts
Exemple #8
0
def list_opts():
    yield None, rpc_opts
    yield None, engine_opts
    yield None, service_opts
    yield paste_deploy_group.name, paste_deploy_opts
    yield auth_password_group.name, auth_password_opts
    yield revision_group.name, revision_opts
    yield volumes_group.name, volumes_opts
    yield noauth_group.name, noauth_opts
    yield profiler.list_opts()[0]
    yield 'clients', default_clients_opts

    for client in ('aodh', 'barbican', 'cinder', 'designate',
                   'glance', 'heat', 'keystone', 'magnum', 'manila', 'mistral',
                   'monasca', 'neutron', 'nova', 'octavia', 'sahara', 'senlin',
                   'swift', 'trove', 'zaqar'
                   ):
        client_specific_group = 'clients_' + client
        yield client_specific_group, clients_opts

    yield 'clients_heat', heat_client_opts
    yield 'clients_keystone', keystone_client_opts
    yield 'clients_nova', client_http_log_debug_opts
    yield 'clients_cinder', client_http_log_debug_opts
Exemple #9
0
             glance.common.rpc.rpc_opts, glance.common.wsgi.bind_opts,
             glance.common.wsgi.eventlet_opts, glance.common.wsgi.socket_opts,
             glance.common.wsgi.wsgi_opts, glance.common.wsgi.store_opts,
             glance.image_cache.drivers.sqlite.sqlite_opts,
             glance.image_cache.image_cache_opts,
             glance.notifier.notifier_opts, glance.scrubber.scrubber_opts))),
    ('image_format', glance.common.config.image_format_opts),
    ('task', glance.common.config.task_opts),
    ('taskflow_executor',
     list(
         itertools.chain(
             glance.async_.taskflow_executor.taskflow_executor_opts,
             glance.async_.flows.convert.convert_task_opts))),
    ('store_type_location_strategy',
     glance.common.location_strategy.store_type.store_type_opts),
    profiler.list_opts()[0],
    ('paste_deploy', glance.common.config.paste_deploy_opts)
]
_scrubber_opts = [
    (None,
     list(
         itertools.chain(glance.common.config.common_opts,
                         glance.scrubber.scrubber_opts,
                         glance.scrubber.scrubber_cmd_opts,
                         glance.scrubber.scrubber_cmd_cli_opts))),
]
_cache_opts = [
    (None,
     list(
         itertools.chain(glance.common.config.common_opts,
                         glance.image_cache.drivers.sqlite.sqlite_opts,
Exemple #10
0
            'grace period in case there is no available executor to handle '
            'the action execution. For example when '
            'first_heartbeat_timeout = 3600, wait 3600 seconds before '
            'closing the action executions that never received a heartbeat.'))
]

coordination_opts = [
    cfg.StrOpt('backend_url',
               help=_('The backend URL to be used for coordination')),
    cfg.FloatOpt(
        'heartbeat_interval',
        default=5.0,
        help=_('Number of seconds between heartbeats for coordination.'))
]

profiler_opts = profiler.list_opts()[0][1]
profiler_opts.append(
    cfg.StrOpt('profiler_log_name',
               default='profiler_trace',
               help=_('Logger name for the osprofiler trace output.')))

keycloak_oidc_opts = [
    cfg.StrOpt(
        'auth_url',
        help=_('Keycloak base url (e.g. https://my.keycloak:8443/auth)')),
    cfg.StrOpt(
        'certfile',
        help=_('Required if identity server requires client certificate')),
    cfg.StrOpt(
        'keyfile',
        help=_('Required if identity server requires client certificate')),
Exemple #11
0
    )
]

coordination_opts = [
    cfg.StrOpt(
        'backend_url',
        help='The backend URL to be used for coordination'
    ),
    cfg.FloatOpt(
        'heartbeat_interval',
        default=5.0,
        help='Number of seconds between heartbeats for coordination.'
    )
]

profiler_opts = profiler.list_opts()[0][1]
profiler_opts.append(
    cfg.StrOpt(
        'profiler_log_name',
        default='profiler_trace',
        help='Logger name for the osprofiler trace output.'
    )
)


keycloak_oidc_opts = [
    cfg.StrOpt(
        'auth_url',
        help='Keycloak base url (e.g. https://my.keycloak:8443/auth)'
    ),
    cfg.StrOpt(
Exemple #12
0
# Zaqar group
zaqar_group = cfg.OptGroup(
    'zaqar', title='Zaqar Options',
    help=_('Configuration options for zaqar trustee.'))

zaqar_opts = (
    ks_loading.get_auth_common_conf_options() +
    ks_loading.get_auth_plugin_conf_options('password'))

cfg.CONF.register_group(zaqar_group)
ks_loading.register_session_conf_options(cfg.CONF, 'zaqar')
ks_loading.register_auth_conf_options(cfg.CONF, 'zaqar')

# OSProfiler
group, opts = profiler.list_opts()[0]
cfg.CONF.register_opts(opts, group=group)


def list_opts():
    """Return a list of oslo.config options available.

    The purpose of this function is to allow tools like the Oslo sample config
    file generator to discover the options exposed to users by this service.
    The returned list includes all oslo.config options which may be registered
    at runtime by the service api/engine.

    Each element of the list is a tuple. The first element is the name of the
    group under which the list of elements in the second element will be
    registered. A group name of None corresponds to the [DEFAULT] group in
    config files.
Exemple #13
0
        glance.image_cache.drivers.sqlite.sqlite_opts,
        glance.image_cache.image_cache_opts,
        glance.notifier.notifier_opts,
        glance.registry.registry_addr_opts,
        glance.registry.client.registry_client_ctx_opts,
        glance.registry.client.registry_client_opts,
        glance.registry.client.v1.api.registry_client_ctx_opts,
        glance.scrubber.scrubber_opts))),
    ('image_format', glance.common.config.image_format_opts),
    ('task', glance.common.config.task_opts),
    ('taskflow_executor', list(itertools.chain(
        glance.async.taskflow_executor.taskflow_executor_opts,
        glance.async.flows.convert.convert_task_opts))),
    ('store_type_location_strategy',
     glance.common.location_strategy.store_type.store_type_opts),
    profiler.list_opts()[0],
    ('paste_deploy', glance.common.config.paste_deploy_opts)
]
_registry_opts = [
    (None, list(itertools.chain(
        glance.api.middleware.context.context_opts,
        glance.common.config.common_opts,
        glance.common.wsgi.bind_opts,
        glance.common.wsgi.socket_opts,
        glance.common.wsgi.wsgi_opts,
        glance.common.wsgi.eventlet_opts))),
    profiler.list_opts()[0],
    ('paste_deploy', glance.common.config.paste_deploy_opts)
]
_scrubber_opts = [
    (None, list(itertools.chain(