2011-02-08 07:26:18 +00:00
|
|
|
require 'vm_driver'
|
|
|
|
|
|
|
|
##
|
|
|
|
## $Id$
|
|
|
|
##
|
2011-02-16 02:15:24 +00:00
|
|
|
|
2011-02-08 07:26:18 +00:00
|
|
|
module Lab
|
|
|
|
module Drivers
|
|
|
|
class AmazonDriver < VmDriver
|
|
|
|
|
|
|
|
include Lab::Amazon_Controller
|
|
|
|
|
|
|
|
|
|
|
|
attr_accessor :type
|
|
|
|
attr_accessor :location
|
|
|
|
|
|
|
|
def initialize(location, key, secret_key)
|
|
|
|
if !File.exist?(location)
|
|
|
|
raise ArgumentError,"Couldn't find: " + location
|
|
|
|
end
|
|
|
|
|
|
|
|
@access_key = key
|
|
|
|
@secret_access_key = secret_key
|
|
|
|
@location = filter_input(location)
|
2011-02-16 02:15:24 +00:00
|
|
|
@type = "amazon"
|
2011-02-08 07:26:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def register
|
|
|
|
end
|
|
|
|
|
|
|
|
def unregister
|
|
|
|
end
|
|
|
|
|
|
|
|
def start
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def stop
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def suspend
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def pause
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def reset
|
|
|
|
end
|
|
|
|
|
2011-02-11 15:04:33 +00:00
|
|
|
def create_snapshot(name)
|
2011-02-08 07:26:18 +00:00
|
|
|
end
|
|
|
|
|
2011-02-11 15:04:33 +00:00
|
|
|
def revert_snapshot(name)
|
2011-02-08 07:26:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def delete_snapshot(name)
|
|
|
|
end
|
|
|
|
|
|
|
|
def run_command(command, arguments, user, pass)
|
|
|
|
end
|
|
|
|
|
|
|
|
def copy_from(user, pass, from, to)
|
|
|
|
end
|
|
|
|
|
|
|
|
def copy_to(user, pass, from, to)
|
|
|
|
end
|
|
|
|
|
|
|
|
def check_file_exists(user, pass, file)
|
|
|
|
end
|
|
|
|
|
|
|
|
def create_directory(user, pass, directory)
|
|
|
|
end
|
|
|
|
|
|
|
|
def cleanup
|
|
|
|
end
|
|
|
|
|
|
|
|
def running?
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|