Beispiel #1
0
def create_configuration(**kwargs):
    # type: (**Any) -> Configuration
    config = Configuration(**kwargs)
    config.headers_policy = StorageHeadersPolicy(**kwargs)
    config.user_agent_policy = StorageUserAgentPolicy(**kwargs)
    config.retry_policy = kwargs.get('retry_policy') or ExponentialRetry(
        **kwargs)
    config.redirect_policy = RedirectPolicy(**kwargs)
    config.logging_policy = StorageLoggingPolicy(**kwargs)
    config.proxy_policy = ProxyPolicy(**kwargs)
    config.blob_settings = StorageBlobSettings(**kwargs)
    return config
Beispiel #2
0
def create_configuration(**kwargs):
    # type: (**Any) -> Configuration
    if 'connection_timeout' not in kwargs:
        kwargs['connection_timeout'] = DEFAULT_SOCKET_TIMEOUT
    config = Configuration(**kwargs)
    config.headers_policy = StorageHeadersPolicy(**kwargs)
    config.user_agent_policy = StorageUserAgentPolicy(**kwargs)
    config.retry_policy = kwargs.get('retry_policy') or ExponentialRetry(
        **kwargs)
    config.redirect_policy = RedirectPolicy(**kwargs)
    config.logging_policy = StorageLoggingPolicy(**kwargs)
    config.proxy_policy = ProxyPolicy(**kwargs)
    config.blob_settings = StorageBlobSettings(**kwargs)
    return config