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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_with_defaults(overrides) ⇒ Object


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

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


58
59
60
61
# File 'lib/winrm/connection_opts.rb', line 58

def validate
  validate_required_fields
  validate_data_types
end