Class: WinRM::ConnectionOpts

Inherits:
Hash
  • Object
show all
Defined in:
lib/winrm/connection_opts.rb

Overview

WinRM connection options, provides defaults and validation.

Constant Summary collapse

DEFAULT_OPERATION_TIMEOUT =
60
DEFAULT_RECEIVE_TIMEOUT =
DEFAULT_OPERATION_TIMEOUT + 10
DEFAULT_MAX_ENV_SIZE =
153600
DEFAULT_LOCALE =
'en-US'.freeze
DEFAULT_RETRY_DELAY =
10
DEFAULT_RETRY_LIMIT =
3
DEFAULT_USER_AGENT =
'Ruby WinRM Client'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_with_defaults(overrides) ⇒ Object



29
30
31
32
33
34
# File 'lib/winrm/connection_opts.rb', line 29

def create_with_defaults(overrides)
  config = default.merge(overrides)
  config = ensure_receive_timeout_is_greater_than_operation_timeout(config)
  config.validate
  config
end

Instance Method Details

#validateObject



60
61
62
63
# File 'lib/winrm/connection_opts.rb', line 60

def validate
  validate_required_fields
  validate_data_types
end