opennebula 4.14.0 → 4.14.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/ldap_auth.rb +3 -2
- data/lib/opennebula/pool.rb +2 -1
- data/lib/opennebula/virtual_machine.rb +7 -1
- data/lib/opennebula/xml_utils.rb +8 -4
- 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: 372e1bd2c013e6a41256485e418b1a8607154f70
|
4
|
+
data.tar.gz: bbd11156ee05c99ad8707fab2a4e65b7675485f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d96afc12bec6bb369dc1d677e547c63e117181e51a64d2134cbfd648de07a8177f5eed36ad1f5c3e2fa1783df4c2fe8d25a5971c1c79eb673a2014d902d5179
|
7
|
+
data.tar.gz: ba4735722fdc2b3e2d0930f4779a8c4ad49348934f3a0268c15b1b1a3edac8a61461649adf4b22921a59805bbbf71458f11214e6b80ebd6fd06a2ea8e470babe
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula.rb
CHANGED
data/lib/opennebula/ldap_auth.rb
CHANGED
@@ -140,7 +140,8 @@ class OpenNebula::LdapAuth
|
|
140
140
|
[nil, nil]
|
141
141
|
end
|
142
142
|
end
|
143
|
-
rescue
|
143
|
+
rescue Exception => e
|
144
|
+
STDERR.puts e.message
|
144
145
|
[nil, nil]
|
145
146
|
end
|
146
147
|
end
|
@@ -148,7 +149,7 @@ class OpenNebula::LdapAuth
|
|
148
149
|
def is_in_group?(user, group)
|
149
150
|
result=@ldap.search(
|
150
151
|
:base => group,
|
151
|
-
:attributes => @options[:group_field],
|
152
|
+
:attributes => [@options[:group_field]],
|
152
153
|
:filter => "(#{@options[:group_field]}=#{user.first})")
|
153
154
|
|
154
155
|
if result && result.first
|
data/lib/opennebula/pool.rb
CHANGED
@@ -712,10 +712,12 @@ module OpenNebula
|
|
712
712
|
# of the current disks. The VM capacity and NICs are also preserved
|
713
713
|
#
|
714
714
|
# @param name [String] Name for the new Template
|
715
|
+
# @param name [true,false,nil] Optional, true to make the saved images
|
716
|
+
# persistent, false make them non-persistent
|
715
717
|
#
|
716
718
|
# @return [Integer, OpenNebula::Error] the new Template ID in case of
|
717
719
|
# success, error otherwise
|
718
|
-
def save_as_template(name)
|
720
|
+
def save_as_template(name, persistent=nil)
|
719
721
|
img_ids = []
|
720
722
|
new_tid = nil
|
721
723
|
|
@@ -797,6 +799,10 @@ module OpenNebula
|
|
797
799
|
|
798
800
|
raise if OpenNebula.is_error?(rc)
|
799
801
|
|
802
|
+
if persistent == true
|
803
|
+
OpenNebula::Image.new_with_id(rc.to_i, @client).persistent()
|
804
|
+
end
|
805
|
+
|
800
806
|
img_ids << rc.to_i
|
801
807
|
|
802
808
|
replace << "DISK = [ IMAGE_ID = #{rc} ]\n"
|
data/lib/opennebula/xml_utils.rb
CHANGED
@@ -47,14 +47,18 @@ module OpenNebula
|
|
47
47
|
attr_accessor :pool
|
48
48
|
|
49
49
|
def initialize (pool_name, elem_name)
|
50
|
-
|
51
|
-
@levels = [{}]
|
52
|
-
@pool = Array.new
|
50
|
+
clear
|
53
51
|
|
54
52
|
@pool_name = pool_name
|
55
53
|
@elem_name = elem_name
|
56
54
|
end
|
57
55
|
|
56
|
+
def clear
|
57
|
+
@current = 0
|
58
|
+
@levels = [{}]
|
59
|
+
@pool = Array.new
|
60
|
+
end
|
61
|
+
|
58
62
|
def start_element(name, attrs = [])
|
59
63
|
return if name == @pool_name
|
60
64
|
@value = nil
|
@@ -98,7 +102,7 @@ module OpenNebula
|
|
98
102
|
end
|
99
103
|
|
100
104
|
def parse(str)
|
101
|
-
@pool_sax.
|
105
|
+
@pool_sax.clear
|
102
106
|
sax_parse(str)
|
103
107
|
@pool_sax.pool
|
104
108
|
end
|
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.14.
|
4
|
+
version: 4.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|