opennebula 6.10.2 → 6.10.4

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: 05521e61ef3a50f232f6c0374ad78c1fa45cb8a4b643491590129a79296ae7a1
4
- data.tar.gz: a9bc63b7e4b714de8c4de4c0f1928911dc47b9425b8d701fc33fa80c782e1ec7
3
+ metadata.gz: d9475a084c23ce56f737cf7fe6c6ed309de66fe08ef05fbc22a705da9747bc89
4
+ data.tar.gz: 3b6ed49152eab2767f67d5a9733e0ede39b6a8903563a3de9d8170ab92f9cdf6
5
5
  SHA512:
6
- metadata.gz: f193bf2093a1b44197f0a0230d27cf9c05dffd46d5d945db93d3028ff58bae9a36fda41e2bd8cd3503ea5d468aee665d1c54ed10fe336b2c32cd4cb801dff8a9
7
- data.tar.gz: 1e125fca63ab7aa69fe51e29008c3b44495ff80caf330d5763c81ab904fea70ee27ab9f51204b57a441f8793265961076fa0e3ea8232b5acf31feece55fff5cf
6
+ metadata.gz: f60a33c17f5d751bf2877ddc216182cb471db64feb9b7a4f56c3e13b0506b74e5b1a7964813e2bfeb29dc899bdea65a677b84b47b3fa4aff23b5738060fe37e9
7
+ data.tar.gz: 2d93c3c523aa5287790e19571f95e64106bc52e1f5b63a525bc4211c7249500900c51a658c05071bf13dcf921179c90f6dff160b67ddacd040d3a119825c39d6
@@ -51,7 +51,7 @@ end
51
51
  module CloudClient
52
52
 
53
53
  # OpenNebula version
54
- VERSION = '6.10.2'
54
+ VERSION = '6.10.4'
55
55
 
56
56
  # #########################################################################
57
57
  # Default location for the authentication file
@@ -51,12 +51,13 @@ module OpenNebula::VirtualMachineExt
51
51
  'NETWORK_ID', 'VN_MAD', 'SECURITY_GROUPS', 'VLAN_ID',
52
52
  'BRIDGE_TYPE']
53
53
 
54
- REMOVE_IMAGE_ATTRS = ['DEV_PREFIX', 'SOURCE', 'ORIGINAL_SIZE', 'SIZE',
55
- 'DISK_SNAPSHOT_TOTAL_SIZE', 'DRIVER', 'IMAGE_STATE', 'SAVE',
54
+ REMOVE_IMAGE_ATTRS = ['DEV_PREFIX', 'SOURCE', 'DRIVER', 'FORMAT', 'ORIGINAL_SIZE',
55
+ 'DISK_SNAPSHOT_TOTAL_SIZE', 'IMAGE_STATE', 'SAVE',
56
56
  'CLONE', 'READONLY', 'PERSISTENT', 'TARGET', 'ALLOW_ORPHANS',
57
57
  'CLONE_TARGET', 'CLUSTER_ID', 'DATASTORE', 'DATASTORE_ID',
58
58
  'DISK_ID', 'DISK_TYPE', 'IMAGE_ID', 'IMAGE', 'IMAGE_UNAME',
59
- 'IMAGE_UID', 'LN_TARGET', 'TM_MAD', 'TYPE', 'OPENNEBULA_MANAGED']
59
+ 'IMAGE_UID', 'LN_TARGET', 'TM_MAD', 'TM_MAD_SYSTEM',
60
+ 'OPENNEBULA_MANAGED']
60
61
 
61
62
  def save_as_template(name, desc, opts = {})
62
63
  opts = {
@@ -171,17 +172,17 @@ module OpenNebula::VirtualMachineExt
171
172
  if !valid?(image_id)
172
173
  logger.info 'Adding volatile disk' if logger
173
174
 
174
- disk_str = template_like_str(
175
- 'TEMPLATE',
176
- true,
177
- "DISK [ DISK_ID = #{disk_id} ]"
178
- )
175
+ disk_str = disk.template_like_str('.').tr("\n", ",\n")
179
176
 
180
- replace << "#{disk_str}\n"
177
+ replace << "DISK = [ #{disk_str} ]\n"
181
178
 
182
179
  next
183
180
  end
184
181
 
182
+ # SIZE, TYPE is important for volatile disk, remove them now
183
+ disk.delete_element('SIZE')
184
+ disk.delete_element('TYPE')
185
+
185
186
  # CDROM disk, copy definition
186
187
  if type == 'CDROM'
187
188
  logger.info 'Adding CDROM disk' if logger
@@ -272,7 +273,7 @@ module OpenNebula::VirtualMachineExt
272
273
  # --------------------------------------------------------------
273
274
  # Rollback. Delete the template and the images created
274
275
  # --------------------------------------------------------------
275
- if ntid
276
+ if ntid && !OpenNebula.is_error?(ntid)
276
277
  ntmpl = OpenNebula::Template.new_with_id(ntid, @client)
277
278
  ntmpl.delete
278
279
  end
@@ -294,6 +294,8 @@ module OpenNebula
294
294
  end
295
295
 
296
296
  # Returns elements in text form
297
+ # Known bug: For some older versions of REXML, the xpath expression
298
+ # returns more nodes than expected
297
299
  # root_element:: _String_ base element
298
300
  # indent:: _Boolean_ indents the resulting string, default true
299
301
  # xpath_exp:: _String_ filter elements with a XPath
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.10.2'
82
+ VERSION = '6.10.4'
83
83
  end
@@ -3423,7 +3423,6 @@ end
3423
3423
 
3424
3424
  src_id = pool["/HOST_POOL/HOST[NAME='#{src_host}']/ID"].to_i
3425
3425
 
3426
- return if src_id == 0
3427
3426
 
3428
3427
  dst_id = pool["/HOST_POOL/HOST[NAME='#{dst_host}']/ID"].to_i
3429
3428
 
data/lib/vm_template.rb CHANGED
@@ -707,7 +707,7 @@ module VCenterDriver
707
707
  next unless ip.family == start_ip.family &&
708
708
  ip.family == end_ip.family
709
709
 
710
- next unless ip >= start_ip && ip <= end_ip
710
+ next unless ip.between?(start_ip, end_ip)
711
711
 
712
712
  ipv4 = ip.to_s if ip.ipv4?
713
713
  ipv6 = ip.to_s if ip.ipv6?
@@ -1041,10 +1041,8 @@ module VCenterDriver
1041
1041
  :template_id=> vm_id
1042
1042
  }
1043
1043
 
1044
- if nic[:pg_type] ==
1045
- VCenterDriver::Network::NETWORK_TYPE_NSXV ||
1046
- nic[:pg_type] ==
1047
- VCenterDriver::Network::NETWORK_TYPE_NSXT
1044
+ if [VCenterDriver::Network::NETWORK_TYPE_NSXV,
1045
+ VCenterDriver::Network::NETWORK_TYPE_NSXT].include?(nic[:pg_type])
1048
1046
  import_opts[:nsx_id] = config[:nsx_id]
1049
1047
  import_opts[:nsx_vni] = config[:nsx_vni]
1050
1048
  import_opts[:nsx_tz_id] = config[:nsx_tz_id]
@@ -1498,7 +1496,7 @@ module VCenterDriver
1498
1496
  .map {|elem| elem.hex }
1499
1497
  .map do |elem|
1500
1498
  int, dec = elem.divmod(1)
1501
- bin = int.to_s(2).to_s
1499
+ bin = int.to_s(2)
1502
1500
 
1503
1501
  while dec > 0
1504
1502
  int, dec = (dec * 2).divmod(1)
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: 6.10.2
4
+ version: 6.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-17 00:00:00.000000000 Z
11
+ date: 2025-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri