Class: TemplateDriver
Constant Summary
VirtualMachineDriver::ACTION, VirtualMachineDriver::HOST_ARG, VirtualMachineDriver::POLL_ATTRIBUTE, VirtualMachineDriver::VM_STATE
DriverExecHelper::RESULT
Instance Attribute Summary
#local_scripts_base_path, #local_scripts_path, #remote_scripts_base_path, #remote_scripts_path
Instance Method Summary
collapse
-
#cancel(id, host, deploy_id, not_used) ⇒ Object
-
#deploy(id, host, remote_dfile, not_used) ⇒ Object
-
#initialize ⇒ TemplateDriver
constructor
A new instance of TemplateDriver.
-
#migrate(id, host, deploy_id, dest_host) ⇒ Object
-
#poll(id, host, deploy_id, not_used) ⇒ Object
-
#restore(id, host, deploy_id, file) ⇒ Object
-
#save(id, host, deploy_id, file) ⇒ Object
-
#shutdown(id, host, deploy_id, not_used) ⇒ Object
#attach_disk, #attach_nic, #cleanup, #decode, #detach_disk, #detach_nic, #disk_snapshot_create, #local_action, #reboot, #remotes_action, #reset, #resize_disk, #snapshot_create, #snapshot_delete, #snapshot_revert, #update_conf, #update_sg
#do_action, parse_actions_list, #start_driver
#action_command_line, #action_is_local?, #action_script_name, failed?, #get_info_from_execution, #initialize_helper, #log, #log_method, #read_configuration, #send_message
#cancel_action, #register_action, #start_listener, #trigger_action
Constructor Details
332
333
334
335
336
|
# File 'lib/VirtualMachineDriver.rb', line 332
def initialize
super('vmm/dummy',
:concurrency => 15,
:threaded => true)
end
|
Instance Method Details
#cancel(id, host, deploy_id, not_used) ⇒ Object
348
349
350
|
# File 'lib/VirtualMachineDriver.rb', line 348
def cancel(id, host, deploy_id, not_used)
send_message(ACTION[:cancel],RESULT[:success],id)
end
|
#deploy(id, host, remote_dfile, not_used) ⇒ Object
338
339
340
341
342
|
# File 'lib/VirtualMachineDriver.rb', line 338
def deploy(id, host, remote_dfile, not_used)
deploy_id = "-"
send_message(ACTION[:deploy],RESULT[:success],id,deploy_id)
end
|
#migrate(id, host, deploy_id, dest_host) ⇒ Object
360
361
362
|
# File 'lib/VirtualMachineDriver.rb', line 360
def migrate(id, host, deploy_id, dest_host)
send_message(ACTION[:migrate],RESULT[:success],id)
end
|
#poll(id, host, deploy_id, not_used) ⇒ Object
364
365
366
367
368
369
370
371
|
# File 'lib/VirtualMachineDriver.rb', line 364
def poll(id, host, deploy_id, not_used)
monitor_info = "#{POLL_ATTRIBUTE[:state]}=#{VM_STATE[:active]} " \
"#{POLL_ATTRIBUTE[:nettx]}=12345"
send_message(ACTION[:poll],RESULT[:success],id,monitor_info)
end
|
#restore(id, host, deploy_id, file) ⇒ Object
356
357
358
|
# File 'lib/VirtualMachineDriver.rb', line 356
def restore(id, host, deploy_id , file)
send_message(ACTION[:restore],RESULT[:success],id)
end
|
#save(id, host, deploy_id, file) ⇒ Object
352
353
354
|
# File 'lib/VirtualMachineDriver.rb', line 352
def save(id, host, deploy_id, file)
send_message(ACTION[:save],RESULT[:success],id)
end
|
#shutdown(id, host, deploy_id, not_used) ⇒ Object
344
345
346
|
# File 'lib/VirtualMachineDriver.rb', line 344
def shutdown(id, host, deploy_id, not_used)
send_message(ACTION[:shutdown],RESULT[:success],id)
end
|