Revision d5b107df
Added by Ohad Levy over 12 years ago
- ID d5b107dfce6398b2bb36de0043d0d4bc07aefc9a
app/models/orchestration/libvirt.rb | ||
---|---|---|
end
|
||
|
||
def queue_libvirt_destroy
|
||
return unless libvirt? and errors.empty?
|
||
return unless errors.empty?
|
||
return unless libvirt? or (hostgroup and hostgroup.hypervisor?)
|
||
@hypervisor ||= hostgroup.hypervisor.connect
|
||
@guest ||= Virt::Guest.find(name) rescue nil
|
||
return if @guest.nil?
|
||
queue.create(:name => "Removing libvirt instance #{self}", :priority => 1,
|
||
:action => [self, :delLibvirt])
|
||
queue.create(:name => "Removing libvirt Storage #{self}", :priority => 2,
|
Also available in: Unified diff
fixes #1162 - delete guest when deleting the host in foreman