opennebula 6.10.1 → 6.10.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: d584a32fed229118ffbe16f0f785ff25d85ae6dba699deafb78997536a4011c8
4
- data.tar.gz: bc2e5bf010746e436295c48bae487f54ff3c39b2faae24f90a6ab22742abcdd3
3
+ metadata.gz: c9f38674fbfb0bc1c85d57a9216bff2e3929490a256b4bef2edbed00d04d737f
4
+ data.tar.gz: 1b813fee4f173f921da960533764ed60ce88630f4d8e3a9665ed492b67c934e7
5
5
  SHA512:
6
- metadata.gz: 93e03cb9d4a0638107a0a349fdcc0541bf639b47262a8e4ba87b55b12dfc8dbad534080034bd0d621a57a962dfd0a7fc1bc58e986400bc7bc4c368854abc8f7e
7
- data.tar.gz: c3bdb91b12d32e8c828aa30db8d4475829c28502017703acdc54478a136e7f82b5f1511f5fde245a042e6360e027c65effca4eab9b64d0a187ad94eab6181dc9
6
+ metadata.gz: bfdfc7cef8b97086f8a35495232f6ff3e7e842a04e3a443974aa5d14b5b2bbb253cf55933805db39db759321195ddce72e391d2d04206d37b0263387cce45c74
7
+ data.tar.gz: 7ca0f4c7f8dc8f517cabeca31af482799a7caab968336e2d1ccd8fc8096dcab7ff606ee6b78a045b93539fc4a0ef771fb1ad1b33d89956ac154f875fbfce6d7f
@@ -67,9 +67,7 @@ module DriverExecHelper
67
67
  # @param [String, nil] default_name alternative name for the script
68
68
  # @param [String, ''] directory to append to the scripts path for actions
69
69
  # @return [String] command line needed to execute the action
70
- def action_command_line(action, parameters,
71
- default_name = nil, directory = '')
72
-
70
+ def action_command_line(action, parameters, default_name = nil, directory = '')
73
71
  if action.is_a?(String) && action[0] == '/'
74
72
  return action + ' ' + parameters if parameters
75
73
 
@@ -110,9 +108,7 @@ module DriverExecHelper
110
108
  #
111
109
  # Sends a message to the OpenNebula core through stdout
112
110
  # rubocop:disable Metrics/ParameterLists
113
- def send_message(action = '-', result = RESULT[:failure],
114
- id = '-', info = '-')
115
-
111
+ def send_message(action = '-', result = RESULT[:failure], id = '-', info = '-')
116
112
  @send_mutex.synchronize do
117
113
  STDOUT.puts "#{action} #{result} #{id} #{info}"
118
114
  STDOUT.flush
@@ -51,7 +51,7 @@ end
51
51
  module CloudClient
52
52
 
53
53
  # OpenNebula version
54
- VERSION = '6.10.1'
54
+ VERSION = '6.10.3'
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.1'
82
+ VERSION = '6.10.3'
83
83
  end
data/lib/rest_client.rb CHANGED
@@ -86,13 +86,7 @@ module VCenterDriver
86
86
  new(connection)
87
87
  end
88
88
 
89
- def get_or_create_tag(
90
- api_client,
91
- category_id,
92
- tag_name,
93
- tag_description
94
- )
95
-
89
+ def get_or_create_tag(api_client, category_id, tag_name, tag_description)
96
90
  tag_api = VSphereAutomation::CIS::TaggingTagApi.new(api_client)
97
91
  tag = tag_api.list.value.find do |id|
98
92
  c = tag_api.get(id).value
data/lib/vi_client.rb CHANGED
@@ -239,8 +239,8 @@ module VCenterDriver
239
239
  begin
240
240
  orig_stderr = $stderr.clone
241
241
  orig_stdout = $stdout.clone
242
- $stderr.reopen File.new('/dev/null', 'w')
243
- $stdout.reopen File.new('/dev/null', 'w')
242
+ $stderr.reopen File.new(File::NULL, 'w')
243
+ $stdout.reopen File.new(File::NULL, 'w')
244
244
  retval = yield
245
245
  rescue StandardError => e
246
246
  $stdout.reopen orig_stdout
@@ -256,7 +256,7 @@ module VCenterDriver
256
256
  def self.in_stderr_silence
257
257
  begin
258
258
  orig_stderr = $stderr.clone
259
- $stderr.reopen File.new('/dev/null', 'w')
259
+ $stderr.reopen File.new(File::NULL, 'w')
260
260
  retval = yield
261
261
  rescue StandardError => e
262
262
  $stderr.reopen orig_stderr
data/lib/vm_template.rb CHANGED
@@ -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]
@@ -1117,12 +1115,7 @@ module VCenterDriver
1117
1115
  one_vn
1118
1116
  end
1119
1117
 
1120
- def import_vcenter_nics(
1121
- opts,
1122
- vm_id = nil,
1123
- dc_name = nil
1124
- )
1125
-
1118
+ def import_vcenter_nics(opts, vm_id = nil, dc_name = nil)
1126
1119
  vi_client = opts[:vi_client]
1127
1120
  vc_uuid = opts[:vc_uuid]
1128
1121
  npool = opts[:npool]
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.1
4
+ version: 6.10.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-11-06 00:00:00.000000000 Z
11
+ date: 2025-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri