Class: SampleDriver
- Inherits:
-
OpenNebulaDriver
- Object
- ActionManager
- OpenNebulaDriver
- SampleDriver
- Defined in:
- lib/OpenNebulaDriver.rb
Constant Summary
Constants included from DriverExecHelper
Instance Attribute Summary
Attributes inherited from OpenNebulaDriver
#local_scripts_base_path, #local_scripts_path, #remote_scripts_base_path, #remote_scripts_path
Instance Method Summary collapse
-
#initialize ⇒ SampleDriver
constructor
A new instance of SampleDriver.
- #my_sleep(num, timeout) ⇒ Object
Methods inherited from OpenNebulaDriver
#do_action, parse_actions_list, #start_driver
Methods included from DriverExecHelper
#action_command_line, #action_is_local?, #action_script_name, failed?, #get_info_from_execution, #initialize_helper, #log, #log_method, #read_configuration, #send_message
Methods inherited from ActionManager
#cancel_action, #register_action, #start_listener, #trigger_action
Constructor Details
#initialize ⇒ SampleDriver
Returns a new instance of SampleDriver.
226 227 228 229 230 |
# File 'lib/OpenNebulaDriver.rb', line 226 def initialize super(15,true) register_action(:SLEEP,method("my_sleep")) end |
Instance Method Details
#my_sleep(num, timeout) ⇒ Object
232 233 234 235 236 237 238 |
# File 'lib/OpenNebulaDriver.rb', line 232 def my_sleep(num, timeout) log(num,"Sleeping #{timeout} seconds") sleep(timeout.to_i) log(num,"Done with #{num}") ("SLEEP",RESULT[:success],num.to_s) end |