mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Fixing zero element pool listing
git-svn-id: http://svn.opennebula.org/one/trunk@812 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
1 parent
6e7574753d
commit
e32ecf7727
2 files changed
+15
-10
No files matched your search
@@ -9,12 +9,15 @@ class VirtualMachinePoolOCCI < VirtualMachinePool
|
||||
pool_hash=Crack::XML.parse(to_xml)
|
||||
occi_xml = "<COMPUTES>"
|
||||
|
||||
vmlist=[pool_hash['VM_POOL']['VM']].flatten
|
||||
if pool_hash['VM_POOL'] != nil
|
||||
vmlist=[pool_hash['VM_POOL']['VM']].flatten
|
||||
|
||||
vmlist.each{|vm|
|
||||
occi_xml+='<COMPUTE ' + 'href="' +
|
||||
base_url + '/compute/' + vm['ID'].strip + '"/>'
|
||||
}
|
||||
end
|
||||
|
||||
vmlist.each{|vm|
|
||||
occi_xml+='<COMPUTE ' + 'href="' +
|
||||
base_url + '/compute/' + vm['ID'].strip + '"/>'
|
||||
}
|
||||
occi_xml += "</COMPUTES>"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,12 +9,14 @@ class VirtualNetworkPoolOCCI < VirtualNetworkPool
|
||||
network_pool_hash=Crack::XML.parse(to_xml)
|
||||
occi_xml = "<NETWORK>"
|
||||
|
||||
vnlist=[pool_hash['VNET_POOL']['VNET']].flatten
|
||||
if network_pool_hash['VM_POOL'] != nil
|
||||
vnlist=[network_pool_hash['VNET_POOL']['VNET']].flatten
|
||||
|
||||
vnlist.each{|network|
|
||||
occi_xml+='<NIC ' + 'href="' +
|
||||
base_url + '/network/' + network['ID'].strip + '"/>'
|
||||
}
|
||||
vnlist.each{|network|
|
||||
occi_xml+='<NIC ' + 'href="' +
|
||||
base_url + '/network/' + network['ID'].strip + '"/>'
|
||||
}
|
||||
end
|
||||
|
||||
occi_xml += "</NETWORK>"
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user