opennebula 5.10.1 → 5.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud/CloudClient.rb +1 -1
- data/lib/opennebula.rb +1 -1
- data/lib/opennebula/pool.rb +33 -8
- data/lib/opennebula/virtual_machine_pool.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 227d8b4be52afd391e76b2401c00f4a129389f76
|
4
|
+
data.tar.gz: b3c5dbcc764c1dbc05367e0289034f65a0bc59a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c344017ee0270ccb63cf0fc1f1c074730c3761311218bb27fd5075888be7cd012858ad517b88c3f7e427a92b857df91d9dd1c08e9fc2d62989e1594bba498a1
|
7
|
+
data.tar.gz: 92229d0d5d414d295a85a8cbed31d70afd2a3d48d90a8f90813e474a959a791265da519d3a68bf16c7cf9f8d244519fb9208e4beb4547c51afdb0f115e069c2b
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula.rb
CHANGED
data/lib/opennebula/pool.rb
CHANGED
@@ -261,27 +261,52 @@ module OpenNebula
|
|
261
261
|
return rc
|
262
262
|
end
|
263
263
|
|
264
|
-
# Iterates over pool
|
265
|
-
|
266
|
-
# > 0 => page size
|
267
|
-
# state state of objects
|
268
|
-
# delete true to take always the first page
|
269
|
-
def each_page(size, state = -1, extended = false, delete = false)
|
264
|
+
# Iterates over pool page
|
265
|
+
def loop_page(size, state, extended)
|
270
266
|
current = 0
|
271
267
|
element = @pool_name.split('_')[0]
|
272
268
|
page = OpenNebula::XMLElement.new
|
273
269
|
|
274
270
|
loop do
|
275
|
-
page.initialize_xml(get_page(size,
|
271
|
+
page.initialize_xml(get_page(size,
|
272
|
+
current,
|
273
|
+
extended,
|
274
|
+
state),
|
276
275
|
@pool_name)
|
277
276
|
|
278
277
|
break if page["//#{element}"].nil?
|
279
278
|
|
279
|
+
current += yield(element, page)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Iterates over pool pages
|
284
|
+
# size:: nil => default page size
|
285
|
+
# > 0 => page size
|
286
|
+
# state state of objects
|
287
|
+
def each_page(size, state = -1, extended = false)
|
288
|
+
loop_page(size, state, extended) do |element, page|
|
280
289
|
page.each("//#{element}") do |obj|
|
281
290
|
yield(obj)
|
282
291
|
end
|
283
292
|
|
284
|
-
|
293
|
+
size
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Iterates over pool pages to delete them
|
298
|
+
# size:: nil => default page size
|
299
|
+
# > 0 => page size
|
300
|
+
# state state of objects
|
301
|
+
def each_page_delete(size, state = -1, extended = false)
|
302
|
+
loop_page(size, state, extended) do |element, page|
|
303
|
+
no_deleted = 0
|
304
|
+
|
305
|
+
page.each("//#{element}") do |obj|
|
306
|
+
no_deleted += 1 if !yield(obj)
|
307
|
+
end
|
308
|
+
|
309
|
+
no_deleted
|
285
310
|
end
|
286
311
|
end
|
287
312
|
|
@@ -50,6 +50,13 @@ module OpenNebula
|
|
50
50
|
@user_id = user_id
|
51
51
|
end
|
52
52
|
|
53
|
+
# Get info extended VM
|
54
|
+
def get_hash_extended
|
55
|
+
rc = info_search(:extended => true)
|
56
|
+
return rc if OpenNebula.is_error?(rc)
|
57
|
+
to_hash
|
58
|
+
end
|
59
|
+
|
53
60
|
# Default Factory Method for the Pools
|
54
61
|
def factory(element_xml)
|
55
62
|
OpenNebula::VirtualMachine.new(element_xml,@client)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opennebula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.10.
|
4
|
+
version: 5.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|