opennebula 6.8.2 → 6.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5759fbb07bfb063ffa52b37dab6435776ed9d3fa2e14c686df1920d4012b7242
4
- data.tar.gz: 602088834190d1305ad873f000bab5afe75858b87ab5c9891d2d869d518bf0bc
3
+ metadata.gz: 8e16a4dc8d312bf0f7363eb17802682cb72bae5fc5ffad65258d520306dfb97c
4
+ data.tar.gz: c9d4605aad6a1d5d2d2600b9b0919994496942789d65c4868b6e40ccb020307e
5
5
  SHA512:
6
- metadata.gz: 89b9a4ac5491c5b443d30692cd198bbe4176823df5b81fcc914cbb96be8d72d19b9ca6c4ae3e8c97f8754bd745273888cedfa094a71aae9c366cca75987ed152
7
- data.tar.gz: 40f49cf1a941abc8f5e4f081393f10ec902229704c6ff24e033753b184007d5eaef8bf8d2c0dbeb255c30985b32e07508a36a1b0a2ab531c4437920dcfb436da
6
+ metadata.gz: 49c4496d1a48dd35a7938f4dd9bf28c1edd75e200f2185d35f853c7db6d2a54fd5df874571248aff294ff4b9bb9b232aef6b752b1002cf3bdb7e337f6c292cd2
7
+ data.tar.gz: 268322ae279f3af5bf9e3681ead11d1553918b767ab20f68ad0c0b8ddfcf5223e1fe565b74baf4f804dac0a8e45b681dedc0454a6580eed7dd1b6328cca23786
@@ -1,4 +1,3 @@
1
- # rubocop:disable Naming/FileName
2
1
  # -------------------------------------------------------------------------- #
3
2
  # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
3
  # #
@@ -216,4 +215,3 @@ module DriverExecHelper
216
215
  end
217
216
 
218
217
  end
219
- # rubocop:enable Naming/FileName
@@ -51,7 +51,7 @@ end
51
51
  module CloudClient
52
52
 
53
53
  # OpenNebula version
54
- VERSION = '6.8.2'
54
+ VERSION = '6.8.3'
55
55
 
56
56
  # #########################################################################
57
57
  # Default location for the authentication file
data/lib/models/role.rb CHANGED
@@ -504,7 +504,7 @@ module OpenNebula
504
504
 
505
505
  break unless OpenNebula.is_error?(rc)
506
506
 
507
- sleep(tries * 0.5)
507
+ sleep(tries)
508
508
  end
509
509
 
510
510
  if tries == 3
@@ -115,11 +115,12 @@ module OpenNebula
115
115
  #
116
116
  # @param description [String] A string containing the template of the Image.
117
117
  # @param ds_id [Integer] the target datastore ID
118
+ # @param no_check_capacity [Boolean] true to skip capacity check. Only for admins.
118
119
  #
119
120
  # @return [nil, OpenNebula::Error] nil in case of success, Error
120
121
  # otherwise
121
- def allocate(description, ds_id, check_capacity=true)
122
- super(IMAGE_METHODS[:allocate],description, ds_id, check_capacity)
122
+ def allocate(description, ds_id, no_check_capacity=false)
123
+ super(IMAGE_METHODS[:allocate],description, ds_id, no_check_capacity)
123
124
  end
124
125
 
125
126
  # Replaces the template contents
@@ -147,7 +147,9 @@ class OpenNebula::LdapAuth
147
147
 
148
148
  [@user.dn,
149
149
  @user[@options[:user_field]].first,
150
- @user[@options[:user_group_field]]]
150
+ @user[@options[:user_group_field]],
151
+ @user['memberof']
152
+ ]
151
153
  else
152
154
  result=@ldap.search(:base => name)
153
155
 
@@ -155,14 +157,21 @@ class OpenNebula::LdapAuth
155
157
  @user = result.first
156
158
  [name,
157
159
  @user[@options[:user_field]].first,
158
- @user[@options[:user_group_field]]]
160
+ @user[@options[:user_group_field]],
161
+ @user['memberof']
162
+ ]
159
163
  else
160
- [nil, nil, nil]
164
+ [nil, nil, nil, nil]
161
165
  end
162
166
  end
163
167
  end
164
168
 
165
- def is_in_group?(user, group)
169
+ def is_in_group?(user, group, memberof)
170
+ if @options[:rfc2307bis]
171
+ # compare case in-sensitive, like LDAP does
172
+ return memberof.map(&:downcase).include?(group.downcase)
173
+ end
174
+
166
175
  username = Net::LDAP::Filter.escape(
167
176
  user.first.force_encoding(Encoding::UTF_8))
168
177
  result=@ldap.search(
@@ -145,7 +145,7 @@ private
145
145
  conf_txt = File.read(conf_file)
146
146
  conf_opt = YAML::load(conf_txt)
147
147
 
148
- @options.merge!(conf_opt) if conf_opt != false
148
+ @options.merge!(conf_opt) if conf_opt
149
149
  end
150
150
  end
151
151
 
data/lib/opennebula.rb CHANGED
@@ -79,5 +79,5 @@ require 'opennebula/backupjob_pool'
79
79
  module OpenNebula
80
80
 
81
81
  # OpenNebula version
82
- VERSION = '6.8.2'
82
+ VERSION = '6.8.3'
83
83
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.2
4
+ version: 6.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: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.16'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "<"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.16'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement