opennebula 6.4.6 → 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 +2 -2
- 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 +3 -3
- 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 +116 -70
- 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 +3 -3
- 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 +4 -4
- 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 +5 -8
- 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 +80 -103
- 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 +4 -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 +4 -10
- data/lib/virtual_wire.rb +2 -2
- 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
data/lib/vi_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 #
|
@@ -140,82 +140,90 @@ module VCenterDriver
|
|
140
140
|
end
|
141
141
|
|
142
142
|
def self.new_from_host(host_id, client = nil)
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
143
|
+
begin
|
144
|
+
client = OpenNebula::Client.new if client.nil?
|
145
|
+
host = OpenNebula::Host.new_with_id(host_id, client)
|
146
|
+
rc = host.info(true)
|
147
|
+
if OpenNebula.is_error?(rc)
|
148
|
+
raise "Could not get host info for \
|
149
|
+
ID: #{host_id} - #{rc.message}"
|
150
|
+
end
|
150
151
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
152
|
+
connection = {
|
153
|
+
:host => host['TEMPLATE/VCENTER_HOST'],
|
154
|
+
:user => host['TEMPLATE/VCENTER_USER'],
|
155
|
+
:rp => host['TEMPLATE/VCENTER_RESOURCE_POOL'],
|
156
|
+
:ccr => host['TEMPLATE/VCENTER_CCR_REF'],
|
157
|
+
:password => host['TEMPLATE/VCENTER_PASSWORD']
|
158
|
+
}
|
158
159
|
|
159
|
-
|
160
|
-
|
160
|
+
vc_port = host['TEMPLATE/VCENTER_PORT']
|
161
|
+
connection[:port] = vc_port unless vc_port.nil?
|
161
162
|
|
162
|
-
|
163
|
+
new(connection, host_id)
|
164
|
+
rescue StandardError => e
|
165
|
+
raise e
|
166
|
+
end
|
163
167
|
end
|
164
168
|
|
165
169
|
def self.new_from_datastore(datastore_id)
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
datastore_id,
|
171
|
-
client
|
172
|
-
)
|
173
|
-
rc = datastore.info
|
174
|
-
if OpenNebula.is_error?(rc)
|
175
|
-
raise "Could not get datastore info \
|
176
|
-
for ID: #{datastore_id} - #{rc.message}"
|
177
|
-
end
|
178
|
-
|
179
|
-
vcenter_id = datastore['TEMPLATE/VCENTER_INSTANCE_ID']
|
180
|
-
|
181
|
-
host_pool = OpenNebula::HostPool.new(client)
|
182
|
-
rc = host_pool.info
|
183
|
-
if OpenNebula.is_error?(rc)
|
184
|
-
raise "Could not get hosts information - #{rc.message}"
|
185
|
-
end
|
186
|
-
|
187
|
-
user = ''
|
188
|
-
password = ''
|
189
|
-
port = 0
|
190
|
-
host_pool.each do |host|
|
191
|
-
vc_instance_id = host['TEMPLATE/VCENTER_INSTANCE_ID']
|
192
|
-
next unless vc_instance_id == vcenter_id
|
193
|
-
|
194
|
-
host_decrypted =
|
195
|
-
OpenNebula::Host
|
170
|
+
begin
|
171
|
+
client = OpenNebula::Client.new
|
172
|
+
datastore =
|
173
|
+
OpenNebula::Datastore
|
196
174
|
.new_with_id(
|
197
|
-
|
175
|
+
datastore_id,
|
198
176
|
client
|
199
177
|
)
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
if password.empty? || user.empty?
|
206
|
-
raise "Error getting \
|
207
|
-
credentials for datastore #{datastore_id}"
|
208
|
-
end
|
178
|
+
rc = datastore.info
|
179
|
+
if OpenNebula.is_error?(rc)
|
180
|
+
raise "Could not get datastore info \
|
181
|
+
for ID: #{datastore_id} - #{rc.message}"
|
182
|
+
end
|
209
183
|
|
210
|
-
|
211
|
-
:host => datastore['TEMPLATE/VCENTER_HOST'],
|
212
|
-
:user => user,
|
213
|
-
:password => password
|
214
|
-
}
|
184
|
+
vcenter_id = datastore['TEMPLATE/VCENTER_INSTANCE_ID']
|
215
185
|
|
216
|
-
|
186
|
+
host_pool = OpenNebula::HostPool.new(client)
|
187
|
+
rc = host_pool.info
|
188
|
+
if OpenNebula.is_error?(rc)
|
189
|
+
raise "Could not get hosts information - #{rc.message}"
|
190
|
+
end
|
217
191
|
|
218
|
-
|
192
|
+
user = ''
|
193
|
+
password = ''
|
194
|
+
port = 0
|
195
|
+
host_pool.each do |host|
|
196
|
+
vc_instance_id = host['TEMPLATE/VCENTER_INSTANCE_ID']
|
197
|
+
next unless vc_instance_id == vcenter_id
|
198
|
+
|
199
|
+
host_decrypted =
|
200
|
+
OpenNebula::Host
|
201
|
+
.new_with_id(
|
202
|
+
host['ID'],
|
203
|
+
client
|
204
|
+
)
|
205
|
+
host_decrypted.info(true)
|
206
|
+
user = host_decrypted['TEMPLATE/VCENTER_USER']
|
207
|
+
password = host_decrypted['TEMPLATE/VCENTER_PASSWORD']
|
208
|
+
port = host_decrypted['TEMPLATE/VCENTER_PORT']
|
209
|
+
end
|
210
|
+
if password.empty? || user.empty?
|
211
|
+
raise "Error getting \
|
212
|
+
credentials for datastore #{datastore_id}"
|
213
|
+
end
|
214
|
+
|
215
|
+
connection = {
|
216
|
+
:host => datastore['TEMPLATE/VCENTER_HOST'],
|
217
|
+
:user => user,
|
218
|
+
:password => password
|
219
|
+
}
|
220
|
+
|
221
|
+
connection[:port] = port unless port.nil?
|
222
|
+
|
223
|
+
new(connection)
|
224
|
+
rescue StandardError => e
|
225
|
+
raise e
|
226
|
+
end
|
219
227
|
end
|
220
228
|
|
221
229
|
def self.decrypt(msg, token)
|
data/lib/vi_helper.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/virtual_machine.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 #
|
@@ -1126,7 +1126,7 @@ end
|
|
1126
1126
|
when OPAQUE_CARD.to_s
|
1127
1127
|
# Select only Opaque Networks
|
1128
1128
|
opaque_networks = @item.network.select do |net|
|
1129
|
-
|
1129
|
+
RbVmomi::VIM::OpaqueNetwork == net.class
|
1130
1130
|
end
|
1131
1131
|
opaque_network = opaque_networks.find do |opn|
|
1132
1132
|
backing.opaqueNetworkId == opn.summary.opaqueNetworkId
|
@@ -1296,7 +1296,7 @@ end
|
|
1296
1296
|
when OPAQUE_CARD.to_s
|
1297
1297
|
# Select only Opaque Networks
|
1298
1298
|
opaque_networks = @item.network.select do |net|
|
1299
|
-
|
1299
|
+
RbVmomi::VIM::OpaqueNetwork == net.class
|
1300
1300
|
end
|
1301
1301
|
opaque_network = opaque_networks.find do |opn|
|
1302
1302
|
nic.backing.opaqueNetworkId ==
|
@@ -2720,7 +2720,7 @@ end
|
|
2720
2720
|
img_name = VCenterDriver::FileHelper.unescape_path(img_name_escaped)
|
2721
2721
|
|
2722
2722
|
vc_disks.each do |d|
|
2723
|
-
key_matches = unmanaged_key && d[:key] == unmanaged_key.to_i
|
2723
|
+
key_matches = (unmanaged_key && d[:key] == unmanaged_key.to_i)
|
2724
2724
|
path_matches = (d[:path_wo_ds] == img_name)
|
2725
2725
|
|
2726
2726
|
if key_matches || path_matches
|
@@ -3302,12 +3302,6 @@ end
|
|
3302
3302
|
@item.MarkAsTemplate
|
3303
3303
|
end
|
3304
3304
|
|
3305
|
-
def mark_as_virtual_machine
|
3306
|
-
@item.MarkAsVirtualMachine(
|
3307
|
-
:pool => cluster['resourcePool']
|
3308
|
-
)
|
3309
|
-
end
|
3310
|
-
|
3311
3305
|
def reset
|
3312
3306
|
@item.ResetVM_Task.wait_for_completion
|
3313
3307
|
end
|
data/lib/virtual_wire.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 #
|
@@ -91,7 +91,7 @@ module NSXDriver
|
|
91
91
|
.get(url)
|
92
92
|
.xpath(NSXConstants::NSXV_LS_XPATH)
|
93
93
|
virtualwires.each do |virtualwire|
|
94
|
-
lsname_arr = name.split(
|
94
|
+
lsname_arr = name.split(/-sid-/)
|
95
95
|
lsname = lsname_arr[-1].split('-', 2)[-1]
|
96
96
|
lsid = lsname_arr[0].split(/vxw-dvs-\w.-/)[-1]
|
97
97
|
if virtualwire.xpath('name').text == lsname &&
|
data/lib/vm_disk.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/vm_folder.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/vm_helper.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/vm_monitor.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/vm_nic.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/vm_template.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 #
|
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.5.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:
|
11
|
+
date: 2022-12-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:
|