Ejemplo n.º 1
0
def get_handle_config(tenant_id):
    config = NoSQLHandleConfig(
        endpoint, generate_authorization_provider(
            tenant_id)).set_default_compartment(tenant_id)
    if ca_certs is not None:
        config.set_ssl_ca_certs(ca_certs)
    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