Method: OpenNebulaDriver#initialize

Defined in:
lib/OpenNebulaDriver.rb

#initialize(directory, options = {}) ⇒ OpenNebulaDriver

Initialize OpenNebulaDriver object

Parameters:

  • directory (String)

    path inside the remotes directory where the scripts are located

  • options (Hash) (defaults to: {})

    named options to change the object’s behaviour

Options Hash (options):

  • :concurrency (Number) — default: 10

    max number of threads

  • :threaded (Boolean) — default: true

    enables or disables threads

  • :retries (Number) — default: 0

    number of retries to copy scripts to the remote host

  • :local_actions (Hash) — default: {}

    hash with the actions executed locally and the name of the script if it differs from the default one. This hash can be constructed using parse_actions_list



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/OpenNebulaDriver.rb', line 51

def initialize(directory, options={})
    @options={
        :concurrency => 10,
        :threaded    => true,
        :retries     => 0,
        :local_actions => {},
        :timeout     => nil
    }.merge!(options)

    super(@options[:concurrency], @options[:threaded])

    @retries = @options[:retries]
    @timeout = @options[:timeout]

    #Set default values
    initialize_helper(directory, @options)

    register_action(:INIT, method("init"))
end