Beispiel #1
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': conf[group].interface,
                                       'region_name': conf[group].region_name})
Beispiel #2
0
def get_gnocchiclient(conf, timeout_override=False):
    group = conf.dispatcher_gnocchi.auth_section
    timeout = (None if (not conf.dispatcher_gnocchi.request_timeout or
                        timeout_override)
               else conf.dispatcher_gnocchi.request_timeout)
    session = keystone_client.get_session(conf, group=group, timeout=timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    return client.Client('1', session,
                         interface=conf[group].interface,
                         region_name=conf[group].region_name,
                         adapter_options={'connect_retries': 3})
Beispiel #3
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    interface = conf[group].interface
    region_name = conf[group].region_name
    gnocchi_url = session.get_endpoint(service_type='metric',
                                       service_name='gnocchi',
                                       interface=interface,
                                       region_name=region_name)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': interface,
                                       'region_name': region_name,
                                       'endpoint_override': gnocchi_url})
Beispiel #4
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    interface = conf[group].interface
    region_name = conf[group].region_name
    gnocchi_url = session.get_endpoint(service_type='metric',
                                       service_name='gnocchi',
                                       interface=interface,
                                       region_name=region_name)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': interface,
                                       'region_name': region_name,
                                       'endpoint_override': gnocchi_url})