mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Feature #1490: Fix bug in VM_QUOTA element
This commit is contained in:
parent
77f7613cd2
commit
25e73de020
@ -1061,6 +1061,8 @@ module OneDBFsck
|
||||
doc.root.each_element("VM_QUOTA/VM") { |e| vm_elem = e }
|
||||
|
||||
if vm_elem.nil?
|
||||
doc.root.delete_element("VM_QUOTA")
|
||||
|
||||
vm_quota = doc.root.add_element("VM_QUOTA")
|
||||
vm_elem = vm_quota.add_element("VM")
|
||||
|
||||
@ -1096,6 +1098,11 @@ module OneDBFsck
|
||||
end
|
||||
}
|
||||
|
||||
if ( cpu_used == 0.0 && mem_used == 0 && vms_used == 0 )
|
||||
doc.root.delete_element("VM_QUOTA")
|
||||
doc.root.add_element("VM_QUOTA")
|
||||
end
|
||||
|
||||
|
||||
# VNet quotas
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user