1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-19 21:57:24 +03:00

remove-xen: Fix minor bugs

This commit is contained in:
Ruben S. Montero 2016-04-08 12:51:36 +02:00
parent f45d6b8993
commit 31070aa179
4 changed files with 5 additions and 2 deletions

View File

@ -142,6 +142,7 @@ class VmmAction
ID DEPLOY_ID
TEMPLATE/SECURITY_GROUP_RULE
HISTORY_RECORDS/HISTORY/HOSTNAME
HISTORY_RECORDS/HISTORY/VMMMAD
)
DRIVER_NAMES = {

View File

@ -412,6 +412,8 @@ module KVM
next if source == snap
end
next if File.symlink?(snap)
text = `qemu-img info --output=json #{snap}`
next if !$? || !$?.success?

View File

@ -26,7 +26,7 @@ module VNMNetwork
# to create VMs of the given hyprtvisor
class Nics < Array
def initialize(hypervisor)
@nicClass = HYPERVISORS[hypervisor]
@nicClass = HYPERVISORS[hypervisor] || NicKVM
end
def new_nic

View File

@ -78,7 +78,7 @@ module VNMNetwork
# Gets the Hypervisor VMMMAD from the Template
# @return [String] name of the hypervisor driver
def hypervisor
xpath = 'HISTORY_RECORDS/HISTORY[last()]/VMMMAD'
xpath = 'HISTORY_RECORDS/HISTORY/VMMMAD'
@vm_root.root.elements[xpath].text
end