Class: Dcmgr::Drivers::Hypervisor

Inherits:
Object
  • Object
show all
Defined in:
lib/dcmgr/drivers/hypervisor.rb

Direct Known Subclasses

Kvm, Lxc

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.select_hypervisor(hypervisor) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/dcmgr/drivers/hypervisor.rb', line 20

def self.select_hypervisor(hypervisor)
  case hypervisor
  when "kvm"
    hv = Dcmgr::Drivers::Kvm.new
  when "lxc"
    hv = Dcmgr::Drivers::Lxc.new
  else
    raise "Unknown hypervisor type: #{hypervisor}"
  end
  hv
end

Instance Method Details

#attach_volume_to_guest(hc) ⇒ Object



14
15
# File 'lib/dcmgr/drivers/hypervisor.rb', line 14

def attach_volume_to_guest(hc)
end

#detach_volume_from_guest(hc) ⇒ Object



17
18
# File 'lib/dcmgr/drivers/hypervisor.rb', line 17

def detach_volume_from_guest(hc)
end

#reboot_instance(hc) ⇒ Object



11
12
# File 'lib/dcmgr/drivers/hypervisor.rb', line 11

def reboot_instance(hc)
end

#run_instance(hc) ⇒ Object



5
6
# File 'lib/dcmgr/drivers/hypervisor.rb', line 5

def run_instance(hc)
end

#terminate_instance(hc) ⇒ Object



8
9
# File 'lib/dcmgr/drivers/hypervisor.rb', line 8

def terminate_instance(hc)
end