opennebula 6.4.4 → 6.5.80.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ActionManager.rb +1 -1
- data/lib/CommandManager.rb +10 -7
- data/lib/DriverExecHelper.rb +1 -1
- data/lib/OpenNebulaDriver.rb +1 -1
- data/lib/VirtualMachineDriver.rb +28 -14
- data/lib/cloud/CloudClient.rb +3 -3
- data/lib/datacenter.rb +25 -21
- data/lib/datastore.rb +4 -4
- data/lib/distributed_firewall.rb +1 -1
- data/lib/file_helper.rb +2 -2
- data/lib/host.rb +2 -2
- data/lib/logical_port.rb +1 -1
- data/lib/logical_switch.rb +1 -1
- data/lib/memoize.rb +1 -1
- data/lib/models/role.rb +114 -68
- data/lib/models/service.rb +58 -58
- data/lib/models.rb +1 -1
- data/lib/network.rb +1 -1
- data/lib/nsx_client.rb +1 -1
- data/lib/nsx_component.rb +1 -1
- data/lib/nsx_constants.rb +2 -2
- data/lib/nsx_driver.rb +1 -1
- data/lib/nsx_error.rb +1 -1
- data/lib/nsx_rule.rb +1 -1
- data/lib/nsxt_client.rb +1 -1
- data/lib/nsxt_dfw.rb +1 -1
- data/lib/nsxt_logical_port.rb +1 -1
- data/lib/nsxt_rule.rb +1 -1
- data/lib/nsxt_tz.rb +1 -1
- data/lib/nsxv_client.rb +1 -1
- data/lib/nsxv_dfw.rb +1 -1
- data/lib/nsxv_logical_port.rb +1 -1
- data/lib/nsxv_rule.rb +1 -1
- data/lib/nsxv_tz.rb +1 -1
- data/lib/opaque_network.rb +1 -1
- data/lib/opennebula/acl.rb +1 -1
- data/lib/opennebula/acl_pool.rb +1 -1
- data/lib/opennebula/client.rb +1 -1
- data/lib/opennebula/cluster.rb +1 -1
- data/lib/opennebula/cluster_pool.rb +1 -1
- data/lib/opennebula/datastore.rb +4 -3
- data/lib/opennebula/datastore_pool.rb +1 -1
- data/lib/opennebula/document.rb +1 -1
- data/lib/opennebula/document_json.rb +1 -1
- data/lib/opennebula/document_pool.rb +1 -1
- data/lib/opennebula/document_pool_json.rb +1 -1
- data/lib/opennebula/error.rb +1 -1
- data/lib/opennebula/flow/grammar.rb +1 -1
- data/lib/opennebula/flow/service_pool.rb +1 -1
- data/lib/opennebula/flow/service_template.rb +22 -22
- data/lib/opennebula/flow/service_template_ext.rb +1 -1
- data/lib/opennebula/flow/service_template_pool.rb +1 -1
- data/lib/opennebula/flow/validator.rb +1 -1
- data/lib/opennebula/flow.rb +1 -1
- data/lib/opennebula/group.rb +1 -1
- data/lib/opennebula/group_pool.rb +1 -1
- data/lib/opennebula/hook.rb +1 -1
- data/lib/opennebula/hook_log.rb +1 -1
- data/lib/opennebula/hook_pool.rb +1 -1
- data/lib/opennebula/host.rb +1 -1
- data/lib/opennebula/host_pool.rb +1 -1
- data/lib/opennebula/image.rb +33 -23
- data/lib/opennebula/image_pool.rb +1 -1
- data/lib/opennebula/ldap_auth.rb +2 -2
- data/lib/opennebula/ldap_auth_spec.rb +1 -1
- data/lib/opennebula/lockable_ext.rb +1 -1
- data/lib/opennebula/marketplace.rb +1 -1
- data/lib/opennebula/marketplace_pool.rb +1 -1
- data/lib/opennebula/marketplaceapp.rb +1 -1
- data/lib/opennebula/marketplaceapp_ext.rb +4 -4
- data/lib/opennebula/marketplaceapp_pool.rb +1 -1
- data/lib/opennebula/oneflow_client.rb +1 -1
- data/lib/opennebula/pool.rb +1 -1
- data/lib/opennebula/pool_element.rb +1 -1
- data/lib/opennebula/security_group.rb +1 -1
- data/lib/opennebula/security_group_pool.rb +1 -1
- data/lib/opennebula/server_cipher_auth.rb +1 -1
- data/lib/opennebula/server_x509_auth.rb +1 -1
- data/lib/opennebula/ssh_auth.rb +1 -1
- data/lib/opennebula/system.rb +1 -1
- data/lib/opennebula/template.rb +1 -1
- data/lib/opennebula/template_ext.rb +3 -3
- data/lib/opennebula/template_pool.rb +1 -1
- data/lib/opennebula/user.rb +1 -1
- data/lib/opennebula/user_pool.rb +1 -1
- data/lib/opennebula/utils.rb +1 -1
- data/lib/opennebula/vdc.rb +1 -1
- data/lib/opennebula/vdc_pool.rb +1 -1
- data/lib/opennebula/virtual_machine.rb +31 -3
- data/lib/opennebula/virtual_machine_ext.rb +12 -217
- data/lib/opennebula/virtual_machine_pool.rb +1 -1
- data/lib/opennebula/virtual_network.rb +33 -4
- data/lib/opennebula/virtual_network_pool.rb +1 -1
- data/lib/opennebula/virtual_router.rb +1 -1
- data/lib/opennebula/virtual_router_pool.rb +1 -1
- data/lib/opennebula/vm_group.rb +1 -1
- data/lib/opennebula/vm_group_pool.rb +1 -1
- data/lib/opennebula/vntemplate.rb +1 -1
- data/lib/opennebula/vntemplate_pool.rb +1 -1
- data/lib/opennebula/wait_ext.rb +1 -1
- data/lib/opennebula/x509_auth.rb +1 -1
- data/lib/opennebula/xml_element.rb +1 -1
- data/lib/opennebula/xml_pool.rb +1 -1
- data/lib/opennebula/xml_utils.rb +1 -1
- data/lib/opennebula/zone.rb +1 -1
- data/lib/opennebula/zone_pool.rb +1 -1
- data/lib/opennebula.rb +2 -2
- data/lib/rest_client.rb +18 -14
- data/lib/scripts_common.rb +1 -1
- data/lib/transport_zone.rb +1 -1
- data/lib/vcenter_driver.rb +1 -1
- data/lib/vcenter_importer.rb +1 -1
- data/lib/vi_client.rb +73 -65
- data/lib/vi_helper.rb +1 -1
- data/lib/virtual_machine.rb +3 -9
- data/lib/virtual_wire.rb +1 -1
- data/lib/vm_disk.rb +1 -1
- data/lib/vm_folder.rb +1 -1
- data/lib/vm_helper.rb +1 -1
- data/lib/vm_monitor.rb +1 -1
- data/lib/vm_nic.rb +1 -1
- data/lib/vm_template.rb +1 -1
- metadata +4 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -47,16 +47,17 @@ module OpenNebula::VirtualMachineExt
|
|
47
47
|
# @return [Integer, OpenNebula::Error] the new Template ID in case
|
48
48
|
# of success, error otherwise
|
49
49
|
#-------------------------------------------------------------------
|
50
|
-
REMOVE_VNET_ATTRS = [
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
REMOVE_IMAGE_ATTRS = [
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
REMOVE_VNET_ATTRS = %w[AR_ID BRIDGE CLUSTER_ID IP MAC TARGET NIC_ID
|
51
|
+
NETWORK_ID VN_MAD SECURITY_GROUPS VLAN_ID
|
52
|
+
BRIDGE_TYPE]
|
53
|
+
|
54
|
+
REMOVE_IMAGE_ATTRS = %w[DEV_PREFIX SOURCE ORIGINAL_SIZE SIZE
|
55
|
+
DISK_SNAPSHOT_TOTAL_SIZE DRIVER IMAGE_STATE
|
56
|
+
SAVE CLONE READONLY PERSISTENT TARGET
|
57
|
+
ALLOW_ORPHANS CLONE_TARGET CLUSTER_ID
|
58
|
+
DATASTORE DATASTORE_ID DISK_ID DISK_TYPE
|
59
|
+
IMAGE_ID IMAGE IMAGE_UNAME IMAGE_UID
|
60
|
+
LN_TARGET TM_MAD TYPE OPENNEBULA_MANAGED]
|
60
61
|
|
61
62
|
def save_as_template(name, desc, opts = {})
|
62
63
|
opts = {
|
@@ -285,160 +286,6 @@ module OpenNebula::VirtualMachineExt
|
|
285
286
|
raise
|
286
287
|
end
|
287
288
|
|
288
|
-
#-------------------------------------------------------------------
|
289
|
-
# Backups a VM. TODO Add final description
|
290
|
-
# @param keep [Bool]
|
291
|
-
# @param logger[Logger]
|
292
|
-
# @param binfo[Hash] Oneshot
|
293
|
-
#-------------------------------------------------------------------
|
294
|
-
def backup(keep = false, logger = nil, binfo = nil)
|
295
|
-
# --------------------------------------------------------------
|
296
|
-
# Check backup consistency
|
297
|
-
# --------------------------------------------------------------
|
298
|
-
rc = info
|
299
|
-
|
300
|
-
raise rc.message if OpenNebula.is_error?(rc)
|
301
|
-
|
302
|
-
binfo.merge!(backup_info) do |_key, old_val, new_val|
|
303
|
-
new_val.nil? ? old_val : new_val
|
304
|
-
end
|
305
|
-
|
306
|
-
raise 'No backup information' if binfo.nil?
|
307
|
-
|
308
|
-
raise 'No frequency defined' unless valid?(binfo[:freq])
|
309
|
-
|
310
|
-
raise 'No marketplace defined' unless valid?(binfo[:market])
|
311
|
-
|
312
|
-
return if Time.now.to_i - binfo[:last].to_i < binfo[:freq].to_i
|
313
|
-
|
314
|
-
# --------------------------------------------------------------
|
315
|
-
# Save VM as new template
|
316
|
-
# --------------------------------------------------------------
|
317
|
-
logger.info 'Saving VM as template' if logger
|
318
|
-
|
319
|
-
tid = save_as_template(
|
320
|
-
binfo[:name], '', :poweroff => true, :logger => logger
|
321
|
-
)
|
322
|
-
|
323
|
-
tmp = OpenNebula::Template.new_with_id(tid, @client)
|
324
|
-
rc = tmp.info
|
325
|
-
|
326
|
-
raise rc.message if OpenNebula.is_error?(rc)
|
327
|
-
|
328
|
-
# --------------------------------------------------------------
|
329
|
-
# Import template into Marketplace & update VM info
|
330
|
-
# --------------------------------------------------------------
|
331
|
-
logger.info "Importing template #{tmp.id} to marketplace "\
|
332
|
-
"#{binfo[:market]}" if logger
|
333
|
-
|
334
|
-
tmp.extend(OpenNebula::TemplateExt)
|
335
|
-
|
336
|
-
rc, ids = tmp.mp_import(binfo[:market], true, binfo[:name],
|
337
|
-
:wait => true, :logger => logger)
|
338
|
-
|
339
|
-
raise rc.message if OpenNebula.is_error?(rc)
|
340
|
-
|
341
|
-
logger.info "Imported app ids: #{ids.join(',')}" if logger
|
342
|
-
|
343
|
-
rc = update(backup_attr(binfo, ids), true)
|
344
|
-
|
345
|
-
if OpenNebula.is_error?(rc)
|
346
|
-
raise 'Could not update the backup reference: ' \
|
347
|
-
" #{rc.message}. New backup ids are #{ids.join(',')}."
|
348
|
-
end
|
349
|
-
|
350
|
-
# --------------------------------------------------------------
|
351
|
-
# Cleanup
|
352
|
-
# --------------------------------------------------------------
|
353
|
-
backup_cleanup(keep, logger, binfo, tmp)
|
354
|
-
rescue Error, StandardError => e
|
355
|
-
backup_cleanup(keep, logger, binfo, tmp)
|
356
|
-
|
357
|
-
logger.fatal(e.inspect) if logger
|
358
|
-
|
359
|
-
raise
|
360
|
-
end
|
361
|
-
|
362
|
-
#-------------------------------------------------------------------
|
363
|
-
# Restores VM information from previous backup
|
364
|
-
#
|
365
|
-
# @param datastore [Integer] Datastore ID to import app backup
|
366
|
-
# @param logger [Logger] Logger instance to print debug info
|
367
|
-
#
|
368
|
-
# @return [Integer] VM ID
|
369
|
-
#-------------------------------------------------------------------
|
370
|
-
def restore(datastore, logger = nil)
|
371
|
-
rc = info
|
372
|
-
|
373
|
-
if OpenNebula.is_error?(rc)
|
374
|
-
raise "Error getting VM: #{rc.message}"
|
375
|
-
end
|
376
|
-
|
377
|
-
logger.info 'Reading backup information' if logger
|
378
|
-
|
379
|
-
backup_ids = backup_info[:apps]
|
380
|
-
|
381
|
-
# highest (=last) of the app ids is the template id
|
382
|
-
app_id = backup_ids.last
|
383
|
-
|
384
|
-
app = OpenNebula::MarketPlaceApp.new_with_id(app_id, @client)
|
385
|
-
rc = app.info
|
386
|
-
|
387
|
-
if OpenNebula.is_error?(rc)
|
388
|
-
raise "Can not find appliance #{app_id}: #{rc.message}."
|
389
|
-
end
|
390
|
-
|
391
|
-
if logger
|
392
|
-
logger.info "Restoring VM #{self['ID']} from " \
|
393
|
-
"saved appliance #{app_id}"
|
394
|
-
end
|
395
|
-
|
396
|
-
app.extend(OpenNebula::MarketPlaceAppExt)
|
397
|
-
|
398
|
-
exp = app.export(:dsid => Integer(datastore),
|
399
|
-
:name => "#{self['NAME']} - RESTORED")
|
400
|
-
|
401
|
-
if OpenNebula.is_error?(exp)
|
402
|
-
raise "Can not restore app: #{exp.message}."
|
403
|
-
end
|
404
|
-
|
405
|
-
# Check possible errors when exporting apps
|
406
|
-
exp[:image].each do |image|
|
407
|
-
next unless OpenNebula.is_error?(image)
|
408
|
-
|
409
|
-
raise "Error restoring image: #{image.message}."
|
410
|
-
end
|
411
|
-
|
412
|
-
template = exp[:vmtemplate].first
|
413
|
-
|
414
|
-
if OpenNebula.is_error?(template)
|
415
|
-
raise "Error restoring template: #{template.message}."
|
416
|
-
end
|
417
|
-
|
418
|
-
if logger
|
419
|
-
logger.info(
|
420
|
-
"Backup restored, VM template: #{exp[:vmtemplate]}, " \
|
421
|
-
"images: #{exp[:image]}"
|
422
|
-
)
|
423
|
-
|
424
|
-
logger.info(
|
425
|
-
"Instantiating the template #{exp[:vmtemplate]}"
|
426
|
-
)
|
427
|
-
end
|
428
|
-
|
429
|
-
tmpl = OpenNebula::Template.new_with_id(template, @client)
|
430
|
-
rc = tmpl.instantiate
|
431
|
-
|
432
|
-
if OpenNebula.is_error?(rc)
|
433
|
-
raise "Can not instantiate the template: #{rc.message}."
|
434
|
-
end
|
435
|
-
|
436
|
-
rc
|
437
|
-
rescue Error, StandardError => e
|
438
|
-
logger.fatal(e.inspect) if logger
|
439
|
-
raise
|
440
|
-
end
|
441
|
-
|
442
289
|
####################################################################
|
443
290
|
# Private extended interface
|
444
291
|
####################################################################
|
@@ -456,58 +303,6 @@ module OpenNebula::VirtualMachineExt
|
|
456
303
|
!att.nil?
|
457
304
|
end
|
458
305
|
|
459
|
-
#-------------------------------------------------------------------
|
460
|
-
# Get backup information from the VM
|
461
|
-
#-------------------------------------------------------------------
|
462
|
-
def backup_info
|
463
|
-
base = '//USER_TEMPLATE/BACKUP'
|
464
|
-
binfo = {}
|
465
|
-
|
466
|
-
app_ids = self["#{base}/MARKETPLACE_APP_IDS"] || ''
|
467
|
-
|
468
|
-
binfo[:name] = "#{self['NAME']} - BACKUP " \
|
469
|
-
" - #{Time.now.strftime('%Y%m%d_%k%M')}"
|
470
|
-
|
471
|
-
binfo[:freq] = self["#{base}/FREQUENCY_SECONDS"]
|
472
|
-
binfo[:last] = self["#{base}/LAST_BACKUP_TIME"]
|
473
|
-
binfo[:market] = Integer(self["#{base}/MARKETPLACE_ID"])
|
474
|
-
binfo[:apps] = app_ids.split(',')
|
475
|
-
|
476
|
-
binfo
|
477
|
-
rescue StandardError
|
478
|
-
binfo
|
479
|
-
end
|
480
|
-
|
481
|
-
#-------------------------------------------------------------------
|
482
|
-
# Generate backup information string
|
483
|
-
#-------------------------------------------------------------------
|
484
|
-
def backup_attr(binfo, ids)
|
485
|
-
'BACKUP=[' \
|
486
|
-
" MARKETPLACE_APP_IDS = \"#{ids.join(',')}\"," \
|
487
|
-
" FREQUENCY_SECONDS = \"#{binfo[:freq]}\"," \
|
488
|
-
" LAST_BACKUP_TIME = \"#{Time.now.to_i}\"," \
|
489
|
-
" MARKETPLACE_ID = \"#{binfo[:market]}\" ]"
|
490
|
-
end
|
491
|
-
|
492
|
-
#-------------------------------------------------------------------
|
493
|
-
# Cleanup backup leftovers in case of failure
|
494
|
-
#-------------------------------------------------------------------
|
495
|
-
def backup_cleanup(keep, logger, binfo, template)
|
496
|
-
if template
|
497
|
-
logger.info "Deleting template #{template.id}" if logger
|
498
|
-
|
499
|
-
template.delete(true)
|
500
|
-
end
|
501
|
-
|
502
|
-
binfo[:apps].each do |id|
|
503
|
-
logger.info "Deleting appliance #{id}" if logger
|
504
|
-
|
505
|
-
papp = OpenNebula::MarketPlaceApp.new_with_id(id, @client)
|
506
|
-
|
507
|
-
papp.delete
|
508
|
-
end if !keep && binfo[:apps]
|
509
|
-
end
|
510
|
-
|
511
306
|
end
|
512
307
|
end
|
513
308
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -44,7 +44,7 @@ module OpenNebula
|
|
44
44
|
:recover => "vn.recover"
|
45
45
|
}
|
46
46
|
|
47
|
-
VN_STATES=%w{INIT READY LOCK_CREATE LOCK_DELETE DONE ERROR}
|
47
|
+
VN_STATES=%w{INIT READY LOCK_CREATE LOCK_DELETE DONE ERROR UPDATE_FAILURE}
|
48
48
|
|
49
49
|
SHORT_VN_STATES={
|
50
50
|
"INIT" => "init",
|
@@ -52,7 +52,8 @@ module OpenNebula
|
|
52
52
|
"LOCK_CREATE" => "lock",
|
53
53
|
"LOCK_DELETE" => "lock",
|
54
54
|
"DONE" => "done",
|
55
|
-
"ERROR" => "err"
|
55
|
+
"ERROR" => "err",
|
56
|
+
"UPDATE_FAILURE"=> "fail"
|
56
57
|
}
|
57
58
|
|
58
59
|
# Creates a VirtualNetwork description with just its identifier
|
@@ -326,7 +327,7 @@ module OpenNebula
|
|
326
327
|
# Recovers an stuck Virtual Network
|
327
328
|
#
|
328
329
|
# @param result [Integer] Recover with failure (0), success (1),
|
329
|
-
# delete (2)
|
330
|
+
# delete (2), retry (3)
|
330
331
|
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
331
332
|
# otherwise
|
332
333
|
def recover(result)
|
@@ -377,6 +378,34 @@ module OpenNebula
|
|
377
378
|
SHORT_VN_STATES[state_str]
|
378
379
|
end
|
379
380
|
|
381
|
+
# Returns three arrays with the numeric VM IDs for VMs updated,
|
382
|
+
# outdated (include updating) and error
|
383
|
+
def vm_ids
|
384
|
+
updated = Array.new
|
385
|
+
|
386
|
+
self.each('UPDATED_VMS/ID') do |id|
|
387
|
+
updated << id.text.to_i
|
388
|
+
end
|
389
|
+
|
390
|
+
outdated = Array.new
|
391
|
+
|
392
|
+
self.each('OUTDATED_VMS/ID') do |id|
|
393
|
+
outdated << id.text.to_i
|
394
|
+
end
|
395
|
+
|
396
|
+
self.each('UPDATING_VMS/ID') do |id|
|
397
|
+
outdated << id.text.to_i
|
398
|
+
end
|
399
|
+
|
400
|
+
error = Array.new
|
401
|
+
|
402
|
+
self.each('ERROR_VMS/ID') do |id|
|
403
|
+
error << id.text.to_i
|
404
|
+
end
|
405
|
+
|
406
|
+
[updated, outdated, error]
|
407
|
+
end
|
408
|
+
|
380
409
|
private
|
381
410
|
def set_publish(published)
|
382
411
|
group_u = published ? 1 : 0
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/vm_group.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/wait_ext.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/x509_auth.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/xml_pool.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/xml_utils.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/zone.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula/zone_pool.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/opennebula.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -77,5 +77,5 @@ require 'opennebula/flow'
|
|
77
77
|
module OpenNebula
|
78
78
|
|
79
79
|
# OpenNebula version
|
80
|
-
VERSION = '6.
|
80
|
+
VERSION = '6.5.80'
|
81
81
|
end
|
data/lib/rest_client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -69,21 +69,25 @@ module VCenterDriver
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def self.new_from_host(host_id)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
72
|
+
begin
|
73
|
+
client = OpenNebula::Client.new
|
74
|
+
host = OpenNebula::Host.new_with_id(host_id, client)
|
75
|
+
rc = host.info(true)
|
76
|
+
if OpenNebula.is_error?(rc)
|
77
|
+
raise "Could not get host info for ID: \
|
78
|
+
#{host_id} - #{rc.message}"
|
79
|
+
end
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
81
|
+
connection = {
|
82
|
+
:hostname => host['TEMPLATE/VCENTER_HOST'],
|
83
|
+
:username => host['TEMPLATE/VCENTER_USER'],
|
84
|
+
:password => host['TEMPLATE/VCENTER_PASSWORD']
|
85
|
+
}
|
85
86
|
|
86
|
-
|
87
|
+
new(connection)
|
88
|
+
rescue StandardError => e
|
89
|
+
raise e
|
90
|
+
end
|
87
91
|
end
|
88
92
|
|
89
93
|
def get_or_create_tag(
|
data/lib/scripts_common.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/transport_zone.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/vcenter_driver.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ---------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/vcenter_importer.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|