opennebula 6.2.2 → 6.3.80.pre
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 +4 -4
- data/lib/cloud/CloudClient.rb +1 -1
- data/lib/datastore.rb +1 -1
- data/lib/file_helper.rb +1 -1
- data/lib/opennebula/marketplaceapp_ext.rb +1 -0
- data/lib/opennebula/virtual_machine.rb +22 -1
- data/lib/opennebula.rb +1 -1
- data/lib/vi_helper.rb +6 -1
- data/lib/virtual_machine.rb +5 -3
- data/lib/vm_monitor.rb +4 -0
- data/lib/vm_template.rb +13 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbf5d10fd120f0a5f41abc59d743f38b1080002271e2ecbb131463a0e145cfba
|
4
|
+
data.tar.gz: e3de025f53033170cea9ca52871dd4c0c2ef417d8ca0637b861fe9f495b9d011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d02e4f443085e4e797b09252a9583c7b59255335abcc51a3a50b0f4f82d2007ab17f7fc13df49bfc7214dd92ba68bc07f4282c019807a3237af1cb0675bf07b1
|
7
|
+
data.tar.gz: 86fede32beb5965879433a8808237d17765da216125ef7b312649f6b6707a337fe3783c7cde67aa90cc9feef413c73d69817ff5cb7cee0dec42b3a91f3b5abb9
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/datastore.rb
CHANGED
@@ -561,7 +561,7 @@ module VCenterDriver
|
|
561
561
|
rescue StandardError => e
|
562
562
|
message = "Could not find file. Reason: \"#{e.message}\"."
|
563
563
|
if VCenterDriver::CONFIG[:debug_information]
|
564
|
-
message += ' ' + e.backtrace
|
564
|
+
message += ' ' + e.backtrace.to_s
|
565
565
|
end
|
566
566
|
raise message
|
567
567
|
end
|
data/lib/file_helper.rb
CHANGED
@@ -98,7 +98,7 @@ module VCenterDriver
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def self.get_type(file)
|
101
|
-
type = `file -b --mime-type #{file}`
|
101
|
+
type = `file -P bytes=256 -b --mime-type #{file}`
|
102
102
|
if $?.exitstatus != 0 # rubocop:disable Style/SpecialGlobalVars
|
103
103
|
STDERR.puts "Can not read file #{file}"
|
104
104
|
exit(-1)
|
@@ -186,6 +186,7 @@ module OpenNebula::MarketPlaceAppExt
|
|
186
186
|
# Created an associated VMTemplate if needed
|
187
187
|
#---------------------------------------------------------------
|
188
188
|
if is_vcenter &&
|
189
|
+
!options[:notemplate] &&
|
189
190
|
(!options[:template] || options[:template] == -1)
|
190
191
|
tmpl = create_vcenter_template(ds, options, image)
|
191
192
|
|
@@ -54,7 +54,9 @@ module OpenNebula
|
|
54
54
|
:unlock => "vm.unlock",
|
55
55
|
:schedadd => "vm.schedadd",
|
56
56
|
:scheddelete => "vm.scheddelete",
|
57
|
-
:schedupdate => "vm.schedupdate"
|
57
|
+
:schedupdate => "vm.schedupdate",
|
58
|
+
:attachsg => "vm.attachsg",
|
59
|
+
:detachsg => "vm.detachsg"
|
58
60
|
}
|
59
61
|
|
60
62
|
VM_STATE=%w{INIT PENDING HOLD ACTIVE STOPPED SUSPENDED DONE FAILED
|
@@ -460,6 +462,25 @@ module OpenNebula
|
|
460
462
|
return call(VM_METHODS[:detachnic], @pe_id, nic_id)
|
461
463
|
end
|
462
464
|
|
465
|
+
# Attaches a Security Groupt to a running VM
|
466
|
+
#
|
467
|
+
# @param nic_id [Integer] Id of the NIC, where to attach SG
|
468
|
+
# @param sg_id [Integer] Id of the SG to be attached
|
469
|
+
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
470
|
+
# otherwise
|
471
|
+
def sg_attach(nic_id, sg_id)
|
472
|
+
return call(VM_METHODS[:attachsg], @pe_id, nic_id, sg_id)
|
473
|
+
end
|
474
|
+
|
475
|
+
# Detaches a Security Group from a running VM
|
476
|
+
#
|
477
|
+
# @param sg_id [Integer] Id of the SG to be detached
|
478
|
+
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
479
|
+
# otherwise
|
480
|
+
def sg_detach(nic_id, sg_id)
|
481
|
+
return call(VM_METHODS[:detachsg], @pe_id, nic_id, sg_id)
|
482
|
+
end
|
483
|
+
|
463
484
|
# Sets the re-scheduling flag for the VM
|
464
485
|
def resched
|
465
486
|
action('resched')
|
data/lib/opennebula.rb
CHANGED
data/lib/vi_helper.rb
CHANGED
@@ -97,7 +97,12 @@ module VCenterDriver
|
|
97
97
|
|
98
98
|
def self.one_item(the_class, id, exit_if_fail = true)
|
99
99
|
item = the_class.new_with_id(id, client)
|
100
|
-
rc
|
100
|
+
rc=nil
|
101
|
+
if the_class == OpenNebula::VirtualMachine
|
102
|
+
rc = item.info(true)
|
103
|
+
else
|
104
|
+
rc = item.info
|
105
|
+
end
|
101
106
|
return_if_error(rc, item, exit_if_fail)
|
102
107
|
end
|
103
108
|
|
data/lib/virtual_machine.rb
CHANGED
@@ -1784,6 +1784,8 @@ end
|
|
1784
1784
|
end
|
1785
1785
|
|
1786
1786
|
def extraconfig_context
|
1787
|
+
one_item.info(true)
|
1788
|
+
|
1787
1789
|
context_text = "# Context variables generated by OpenNebula\n"
|
1788
1790
|
one_item.each('TEMPLATE/CONTEXT/*') do |context_element|
|
1789
1791
|
# next if !context_element.text
|
@@ -3076,10 +3078,10 @@ end
|
|
3076
3078
|
@item.ReconfigVM_Task(:spec => vm_config_spec).wait_for_completion
|
3077
3079
|
|
3078
3080
|
devices.each do |device|
|
3079
|
-
|
3081
|
+
valid_device =
|
3082
|
+
device.class == RbVmomi::VIM::VirtualLsiLogicController &&
|
3080
3083
|
device.key == scsi_key
|
3081
|
-
|
3082
|
-
controller = device.deviceInfo.label
|
3084
|
+
controller = device.deviceInfo.label if valid_device
|
3083
3085
|
end
|
3084
3086
|
|
3085
3087
|
controller
|
data/lib/vm_monitor.rb
CHANGED
@@ -275,6 +275,10 @@ module VirtualMachineMonitor
|
|
275
275
|
info_disks.each do |disk|
|
276
276
|
next if disk[1].no_exists?
|
277
277
|
|
278
|
+
# disk[0] contains the disk ID in OpenNebula or the disk path if
|
279
|
+
# there is no corresponding OpenNebula disk
|
280
|
+
# disk[1] contains the vcenter resource corresponding to the VM disk
|
281
|
+
|
278
282
|
# Delete special characters
|
279
283
|
name = disk[0].gsub(/[^0-9A-Za-z]/, '_')
|
280
284
|
|
data/lib/vm_template.rb
CHANGED
@@ -408,13 +408,25 @@ module VCenterDriver
|
|
408
408
|
break
|
409
409
|
end
|
410
410
|
|
411
|
+
# Read configuration for imported images, taking
|
412
|
+
# into account if we are importing a VM Tempalte
|
413
|
+
# or a Wild VM
|
414
|
+
image_persistency = nil
|
415
|
+
if vm?
|
416
|
+
image_persistency = :wild_vm_persistent_images
|
417
|
+
else
|
418
|
+
image_persistency = :vm_template_persistent_images
|
419
|
+
end
|
420
|
+
|
421
|
+
image_persistency = VCenterDriver::CONFIG[image_persistency]
|
422
|
+
|
411
423
|
params = {
|
412
424
|
:disk => disk,
|
413
425
|
:ipool => ipool,
|
414
426
|
:_type => type,
|
415
427
|
:ds_id => datastore_found['ID'],
|
416
428
|
:opts => {
|
417
|
-
:persistent =>
|
429
|
+
:persistent => image_persistency ? 'YES':'NO'
|
418
430
|
},
|
419
431
|
:images => images
|
420
432
|
}
|
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.
|
4
|
+
version: 6.3.80.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -255,9 +255,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
257
|
requirements:
|
258
|
-
- - "
|
258
|
+
- - ">"
|
259
259
|
- !ruby/object:Gem::Version
|
260
|
-
version:
|
260
|
+
version: 1.3.1
|
261
261
|
requirements: []
|
262
262
|
rubygems_version: 3.1.2
|
263
263
|
signing_key:
|