mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-27 03:21:29 +03:00
bug-4088: Fix pagination parser in Ruby OX
This commit is contained in:
parent
41eb861c23
commit
f7f3b54543
@ -202,8 +202,9 @@ module OpenNebula
|
||||
|
||||
a_array=parser.parse(a)
|
||||
|
||||
array += a_array
|
||||
array += a_array
|
||||
current += size
|
||||
|
||||
break if !a || a_array.length<size
|
||||
end
|
||||
|
||||
|
@ -47,14 +47,18 @@ module OpenNebula
|
||||
attr_accessor :pool
|
||||
|
||||
def initialize (pool_name, elem_name)
|
||||
@current = 0
|
||||
@levels = [{}]
|
||||
@pool = Array.new
|
||||
clear
|
||||
|
||||
@pool_name = pool_name
|
||||
@elem_name = elem_name
|
||||
end
|
||||
|
||||
def clear
|
||||
@current = 0
|
||||
@levels = [{}]
|
||||
@pool = Array.new
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
return if name == @pool_name
|
||||
@value = nil
|
||||
@ -98,7 +102,7 @@ module OpenNebula
|
||||
end
|
||||
|
||||
def parse(str)
|
||||
@pool_sax.pool.clear
|
||||
@pool_sax.clear
|
||||
sax_parse(str)
|
||||
@pool_sax.pool
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user