Beispiel #1
0
def get_handle_config(tenant_id):
    # Creates a NoSQLHandleConfig
    get_logger()
    config = NoSQLHandleConfig(endpoint).set_timeout(
        timeout).set_consistency(consistency).set_pool_connections(
        pool_connections).set_pool_maxsize(pool_maxsize).set_retry_handler(
        retry_handler).set_logger(logger).set_table_request_timeout(
        table_request_timeout).set_sec_info_timeout(sec_info_timeout)
    if proxy_host is not None:
        config.set_proxy_host(proxy_host)
    if proxy_port != 0:
        config.set_proxy_port(proxy_port)
    if proxy_username is not None:
        config.set_proxy_username(proxy_username)
    if proxy_password is not None:
        config.set_proxy_password(proxy_password)
    set_access_token_provider(config, tenant_id)
    return config
def get_handle_config(tenant_id):
    # Creates a NoSQLHandleConfig
    get_logger()
    provider = generate_authorization_provider(tenant_id)
    config = NoSQLHandleConfig(endpoint, provider).set_table_request_timeout(
        table_request_timeout).set_timeout(timeout).set_default_compartment(
        tenant_id).set_pool_connections(pool_connections).set_sec_info_timeout(
        sec_info_timeout).set_pool_maxsize(pool_maxsize).set_retry_handler(
        retry_handler).set_consistency(consistency).set_logger(logger)
    if proxy_host is not None:
        config.set_proxy_host(proxy_host)
    if proxy_port != 0:
        config.set_proxy_port(proxy_port)
    if proxy_username is not None:
        config.set_proxy_username(proxy_username)
    if proxy_password is not None:
        config.set_proxy_password(proxy_password)
    if ssl_cipher_suites is not None:
        config.set_ssl_cipher_suites(ssl_cipher_suites)
    if ssl_protocol is not None:
        config.set_ssl_protocol(ssl_protocol)
    if ca_certs is not None:
        config.set_ssl_ca_certs(ca_certs)
    return config