opennebula 4.90.0.beta1 → 4.90.10.rc1
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/datastore.rb +2 -1
- data/lib/opennebula/ldap_auth.rb +25 -3
- data/lib/opennebula/virtual_network.rb +2 -1
- data/lib/opennebula.rb +1 -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: c03ee98531e1a62d3b49aaf94ba9095902f47705
|
4
|
+
data.tar.gz: 1e78cdfffd8f093032950c10187c08d9001d5974
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5cdec6a7a768b3c5b909d79cc6a945b8d84e1826940a4faa55a3d1ef7d107e1ec4a5760e9186aa6d824341cca7aef8c3bff7e71c23dcb99dd8d0cf5c240a941
|
7
|
+
data.tar.gz: 21ae1b74c18aec9e508c4e0a570d3159fa6e7b606bf03800643b447a5eea1dc3cb19418ce535fc4e2944fb70d735f88986348dd854e9a775ae57b61d408c29b9
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula/datastore.rb
CHANGED
@@ -85,7 +85,8 @@ module OpenNebula
|
|
85
85
|
# Allocates a new Datastore in OpenNebula
|
86
86
|
#
|
87
87
|
# @param description [String] The template of the Datastore.
|
88
|
-
# @param cluster_id [Integer] Id of the cluster
|
88
|
+
# @param cluster_id [Integer] Id of the cluster. If it is -1,
|
89
|
+
# this datastore won't be added to any cluster.
|
89
90
|
#
|
90
91
|
# @return [Integer, OpenNebula::Error] the new ID in case of
|
91
92
|
# success, error otherwise
|
data/lib/opennebula/ldap_auth.rb
CHANGED
@@ -122,10 +122,13 @@ class OpenNebula::LdapAuth
|
|
122
122
|
|
123
123
|
def find_user(name)
|
124
124
|
begin
|
125
|
-
|
126
|
-
|
125
|
+
filter = "#{@options[:user_field]}=#{escape(name)}"
|
126
|
+
|
127
|
+
result = @ldap.search(
|
128
|
+
:base => @options[:base],
|
127
129
|
:attributes => @options[:attributes],
|
128
|
-
:filter
|
130
|
+
:filter => filter
|
131
|
+
)
|
129
132
|
|
130
133
|
if result && result.first
|
131
134
|
@user = result.first
|
@@ -187,5 +190,24 @@ class OpenNebula::LdapAuth
|
|
187
190
|
groups.delete(false)
|
188
191
|
groups.compact.uniq
|
189
192
|
end
|
193
|
+
|
194
|
+
private
|
195
|
+
|
196
|
+
# The escapes code has been copied from <net-ldap>/lib/net/ldap/filter.rb
|
197
|
+
FILTER_ESCAPES = {
|
198
|
+
"\0" => '00',
|
199
|
+
'*' => '2A',
|
200
|
+
'(' => '28',
|
201
|
+
')' => '29',
|
202
|
+
'\\' => '5C',
|
203
|
+
'?' => '3F',
|
204
|
+
'=' => '3D'
|
205
|
+
}
|
206
|
+
|
207
|
+
FILTER_ESCAPE_RE = Regexp.new("[" + FILTER_ESCAPES.keys.map { |e| Regexp.escape(e) }.join + "]")
|
208
|
+
|
209
|
+
def escape(string)
|
210
|
+
string.gsub(FILTER_ESCAPE_RE) { |char| "\\" + FILTER_ESCAPES[char] }
|
211
|
+
end
|
190
212
|
end
|
191
213
|
|
@@ -76,7 +76,8 @@ module OpenNebula
|
|
76
76
|
# Allocates a new VirtualNetwork in OpenNebula
|
77
77
|
#
|
78
78
|
# @param description [String] The template of the VirtualNetwork.
|
79
|
-
# @param cluster_id [Integer] Id of the cluster
|
79
|
+
# @param cluster_id [Integer] Id of the cluster. If it is -1,
|
80
|
+
# this VirtualNetwork won't be added to any cluster.
|
80
81
|
#
|
81
82
|
# @return [Integer, OpenNebula::Error] the new ID in case of
|
82
83
|
# success, error otherwise
|
data/lib/opennebula.rb
CHANGED
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: 4.90.
|
4
|
+
version: 4.90.10.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|