Class: Lab::Drivers::DynagenDriver
Instance Attribute Summary
Attributes inherited from VmDriver
#credentials, #location, #os, #tools, #vmid
Instance Method Summary
collapse
Methods inherited from VmDriver
#check_file_exists, #copy_from, #copy_to, #create_directory, #create_snapshot, #delete_snapshot, #pause, #register, #reset, #resume, #revert_snapshot, #run_command, #suspend, #unregister
Constructor Details
#initialize(config, dynagen_config) ⇒ DynagenDriver
Returns a new instance of DynagenDriver.
15
16
17
18
19
|
# File 'lib/lab/driver/dynagen_driver.rb', line 15
def initialize(config,dynagen_config)
super(config)
@running = false
@dynagen_platform = filter_command(dynagen_config['dynagen_platform'])
end
|
Instance Method Details
#cleanup ⇒ Object
36
37
38
39
40
|
# File 'lib/lab/driver/dynagen_driver.rb', line 36
def cleanup
`killall dynagen`
`killall dynamips`
@running = false
end
|
#running? ⇒ Boolean
42
43
44
|
# File 'lib/lab/driver/dynagen_driver.rb', line 42
def running?
return @running
end
|
#start ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/lab/driver/dynagen_driver.rb', line 21
def start
system_command("dynamips -H #{@dynagen_platform} &")
system_command("dynagen #{@location}")
@running = true
end
|
#stop ⇒ Object
31
32
33
34
|
# File 'lib/lab/driver/dynagen_driver.rb', line 31
def stop
system_command("killall dynagen")
@running = false
end
|