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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 571c88d280c84277e9b6ac8640ce0510dc3efc61
4
- data.tar.gz: c67709be23fecabe24634098cba9629b17c52e19
3
+ metadata.gz: 372e1bd2c013e6a41256485e418b1a8607154f70
4
+ data.tar.gz: bbd11156ee05c99ad8707fab2a4e65b7675485f8
5
5
  SHA512:
6
- metadata.gz: 7399f1ea6896a2f5d5a7ffb5ca48af8a5ebc00feda600f12084235616664cec85c2fb56035565cea4e5fb6b4299f995da70575c24f1fb925b557c34de9acfc22
7
- data.tar.gz: 7b942acb8d9b270389f48011ee98dcc44b3c39c274414d7970fa37f5861f7095e35e5d6e0e96c7258f205a321240d3ce4760b6eb836db26729613a401663a2a1
6
+ metadata.gz: 4d96afc12bec6bb369dc1d677e547c63e117181e51a64d2134cbfd648de07a8177f5eed36ad1f5c3e2fa1783df4c2fe8d25a5971c1c79eb673a2014d902d5179
7
+ data.tar.gz: ba4735722fdc2b3e2d0930f4779a8c4ad49348934f3a0268c15b1b1a3edac8a61461649adf4b22921a59805bbbf71458f11214e6b80ebd6fd06a2ea8e470babe
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '4.14.0'
53
+ VERSION = '4.14.2'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
@@ -60,5 +60,5 @@ require 'opennebula/system'
60
60
  module OpenNebula
61
61
 
62
62
  # OpenNebula version
63
- VERSION = '4.14.0'
63
+ VERSION = '4.14.2'
64
64
  end
@@ -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
@@ -202,8 +202,9 @@ module OpenNebula
202
202
 
203
203
  a_array=parser.parse(a)
204
204
 
205
- array += a_array
205
+ array += a_array
206
206
  current += size
207
+
207
208
  break if !a || a_array.length<size
208
209
  end
209
210
 
@@ -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"
@@ -47,14 +47,18 @@ module OpenNebula
47
47
  attr_accessor :pool
48
48
 
49
49
  def initialize (pool_name, elem_name)
50
- @current = 0
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.pool.clear
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.0
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-09-28 00:00:00.000000000 Z
11
+ date: 2015-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri