opennebula 5.8.2 → 5.8.3
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/ldap_auth.rb +3 -1
- data/lib/opennebula/pool.rb +31 -5
- data/lib/vcenter_driver.rb +10 -1
- 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: 59cb571959c796ba8b92646b4a8f9293fb19c252
|
4
|
+
data.tar.gz: 4b7f2bd7fa08c2fd3a36a4d9a534ab05c5d9b2d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8660cd399a412161a278cf77992d8a5a11c7720bad4770dcd197c2608e85177fc345fc6834186a6e33614e160069229d84417bc549990fea43c8c004563d2892
|
7
|
+
data.tar.gz: 2612e7931b904b7806f03e0524c98f5de766ae22b0487a4e6efdaf49fbef5d90299bebb77cab5d64b8d9932bd5d45bcefcd4ad879123915365342024ec9e1488
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula.rb
CHANGED
data/lib/opennebula/ldap_auth.rb
CHANGED
@@ -39,6 +39,7 @@ class OpenNebula::LdapAuth
|
|
39
39
|
:user => nil,
|
40
40
|
:password => nil,
|
41
41
|
:base => nil,
|
42
|
+
:group_base => nil,
|
42
43
|
:auth_method => :simple,
|
43
44
|
:user_field => 'cn',
|
44
45
|
:user_group_field => 'dn',
|
@@ -198,9 +199,10 @@ class OpenNebula::LdapAuth
|
|
198
199
|
end
|
199
200
|
end
|
200
201
|
else
|
202
|
+
group_base = @options[:group_base] ? @options[:group_base] : @options[:base]
|
201
203
|
filter = Net::LDAP::Filter.equals(@options[:group_field], @user[@options[:user_group_field]].first)
|
202
204
|
@ldap.search(
|
203
|
-
:base =>
|
205
|
+
:base => group_base,
|
204
206
|
:attributes => [ "dn" ],
|
205
207
|
:filter => filter
|
206
208
|
) do |entry|
|
data/lib/opennebula/pool.rb
CHANGED
@@ -233,10 +233,12 @@ module OpenNebula
|
|
233
233
|
|
234
234
|
# Gets a hash from a info page from pool
|
235
235
|
# size:: nil => default page size
|
236
|
-
# > 0 => page size
|
236
|
+
# > 0 => page size
|
237
237
|
# current first element of the page
|
238
|
+
# extended true to get extended information
|
239
|
+
# state state of the objects
|
238
240
|
# hash:: return page as a hash
|
239
|
-
def get_page(size, current, extended = false)
|
241
|
+
def get_page(size, current, extended = false, state = -1)
|
240
242
|
rc = nil
|
241
243
|
|
242
244
|
if PAGINATED_POOLS.include?(@pool_name)
|
@@ -249,19 +251,43 @@ module OpenNebula
|
|
249
251
|
end
|
250
252
|
|
251
253
|
size = OpenNebula.pool_page_size if (!size || size == 0)
|
252
|
-
rc = @client.call(method, @user_id, current, -size,
|
254
|
+
rc = @client.call(method, @user_id, current, -size, state)
|
253
255
|
|
254
256
|
initialize_xml(rc, @pool_name)
|
255
257
|
else
|
256
258
|
rc = info
|
257
259
|
end
|
258
260
|
|
259
|
-
return rc
|
261
|
+
return rc
|
262
|
+
end
|
263
|
+
|
264
|
+
# Iterates over pool pages
|
265
|
+
# size:: nil => default page size
|
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)
|
270
|
+
current = 0
|
271
|
+
element = @pool_name.split('_')[0]
|
272
|
+
page = OpenNebula::XMLElement.new
|
273
|
+
|
274
|
+
loop do
|
275
|
+
page.initialize_xml(get_page(size, current, extended, state),
|
276
|
+
@pool_name)
|
277
|
+
|
278
|
+
break if page["//#{element}"].nil?
|
279
|
+
|
280
|
+
page.each("//#{element}") do |obj|
|
281
|
+
yield(obj)
|
282
|
+
end
|
283
|
+
|
284
|
+
current += size unless delete
|
285
|
+
end
|
260
286
|
end
|
261
287
|
|
262
288
|
# Return true if pool is paginated
|
263
289
|
def is_paginated?
|
264
|
-
PAGINATED_POOLS.include?(@pool_name)
|
290
|
+
PAGINATED_POOLS.include?(@pool_name)
|
265
291
|
end
|
266
292
|
end
|
267
293
|
end
|
data/lib/vcenter_driver.rb
CHANGED
@@ -44,7 +44,9 @@ class VCenterConf < Hash
|
|
44
44
|
DEFAULT_CONFIGURATION = {
|
45
45
|
:delete_images => false,
|
46
46
|
:vm_poweron_wait_default => 300,
|
47
|
-
:debug_information => false
|
47
|
+
:debug_information => false,
|
48
|
+
:retries => 3,
|
49
|
+
:retry_interval => 1
|
48
50
|
}
|
49
51
|
|
50
52
|
def initialize
|
@@ -83,6 +85,13 @@ require 'vm_template'
|
|
83
85
|
require 'virtual_machine'
|
84
86
|
require 'network'
|
85
87
|
require 'file_helper'
|
88
|
+
require 'vm_folder'
|
89
|
+
require 'vmm_importer'
|
90
|
+
require 'vm_device'
|
91
|
+
require 'vm_disk'
|
92
|
+
require 'vm_nic'
|
93
|
+
require 'vm_helper'
|
94
|
+
require 'vm_monitor'
|
86
95
|
|
87
96
|
CHECK_REFS = true
|
88
97
|
|
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.8.
|
4
|
+
version: 5.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|