opennebula 6.8.1 → 6.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/DriverExecHelper.rb +0 -2
- data/lib/cloud/CloudClient.rb +1 -1
- data/lib/models/role.rb +1 -1
- data/lib/opennebula/image.rb +3 -2
- data/lib/opennebula/ldap_auth.rb +13 -4
- data/lib/opennebula/oneflow_client.rb +4 -0
- data/lib/opennebula/virtual_machine.rb +83 -3
- data/lib/opennebula/x509_auth.rb +1 -1
- data/lib/opennebula.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e16a4dc8d312bf0f7363eb17802682cb72bae5fc5ffad65258d520306dfb97c
|
4
|
+
data.tar.gz: c9d4605aad6a1d5d2d2600b9b0919994496942789d65c4868b6e40ccb020307e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c4496d1a48dd35a7938f4dd9bf28c1edd75e200f2185d35f853c7db6d2a54fd5df874571248aff294ff4b9bb9b232aef6b752b1002cf3bdb7e337f6c292cd2
|
7
|
+
data.tar.gz: 268322ae279f3af5bf9e3681ead11d1553918b767ab20f68ad0c0b8ddfcf5223e1fe565b74baf4f804dac0a8e45b681dedc0454a6580eed7dd1b6328cca23786
|
data/lib/DriverExecHelper.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# rubocop:disable Naming/FileName
|
2
1
|
# -------------------------------------------------------------------------- #
|
3
2
|
# Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
|
4
3
|
# #
|
@@ -216,4 +215,3 @@ module DriverExecHelper
|
|
216
215
|
end
|
217
216
|
|
218
217
|
end
|
219
|
-
# rubocop:enable Naming/FileName
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/models/role.rb
CHANGED
data/lib/opennebula/image.rb
CHANGED
@@ -115,11 +115,12 @@ module OpenNebula
|
|
115
115
|
#
|
116
116
|
# @param description [String] A string containing the template of the Image.
|
117
117
|
# @param ds_id [Integer] the target datastore ID
|
118
|
+
# @param no_check_capacity [Boolean] true to skip capacity check. Only for admins.
|
118
119
|
#
|
119
120
|
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
120
121
|
# otherwise
|
121
|
-
def allocate(description, ds_id,
|
122
|
-
super(IMAGE_METHODS[:allocate],description, ds_id,
|
122
|
+
def allocate(description, ds_id, no_check_capacity=false)
|
123
|
+
super(IMAGE_METHODS[:allocate],description, ds_id, no_check_capacity)
|
123
124
|
end
|
124
125
|
|
125
126
|
# Replaces the template contents
|
data/lib/opennebula/ldap_auth.rb
CHANGED
@@ -147,7 +147,9 @@ class OpenNebula::LdapAuth
|
|
147
147
|
|
148
148
|
[@user.dn,
|
149
149
|
@user[@options[:user_field]].first,
|
150
|
-
@user[@options[:user_group_field]]
|
150
|
+
@user[@options[:user_group_field]],
|
151
|
+
@user['memberof']
|
152
|
+
]
|
151
153
|
else
|
152
154
|
result=@ldap.search(:base => name)
|
153
155
|
|
@@ -155,14 +157,21 @@ class OpenNebula::LdapAuth
|
|
155
157
|
@user = result.first
|
156
158
|
[name,
|
157
159
|
@user[@options[:user_field]].first,
|
158
|
-
@user[@options[:user_group_field]]
|
160
|
+
@user[@options[:user_group_field]],
|
161
|
+
@user['memberof']
|
162
|
+
]
|
159
163
|
else
|
160
|
-
[nil, nil, nil]
|
164
|
+
[nil, nil, nil, nil]
|
161
165
|
end
|
162
166
|
end
|
163
167
|
end
|
164
168
|
|
165
|
-
def is_in_group?(user, group)
|
169
|
+
def is_in_group?(user, group, memberof)
|
170
|
+
if @options[:rfc2307bis]
|
171
|
+
# compare case in-sensitive, like LDAP does
|
172
|
+
return memberof.map(&:downcase).include?(group.downcase)
|
173
|
+
end
|
174
|
+
|
166
175
|
username = Net::LDAP::Filter.escape(
|
167
176
|
user.first.force_encoding(Encoding::UTF_8))
|
168
177
|
result=@ldap.search(
|
@@ -61,7 +61,9 @@ module OpenNebula
|
|
61
61
|
:detachsg => 'vm.detachsg',
|
62
62
|
:backup => 'vm.backup',
|
63
63
|
:updatenic => 'vm.updatenic',
|
64
|
-
:backupcancel => 'vm.backupcancel'
|
64
|
+
:backupcancel => 'vm.backupcancel',
|
65
|
+
:attachpci => 'vm.attachpci',
|
66
|
+
:detachpci => 'vm.detachpci'
|
65
67
|
}
|
66
68
|
|
67
69
|
VM_STATE=['INIT', 'PENDING', 'HOLD', 'ACTIVE', 'STOPPED', 'SUSPENDED', 'DONE', 'FAILED',
|
@@ -228,8 +230,68 @@ module OpenNebula
|
|
228
230
|
'BACKUP_POWEROFF' => 'back'
|
229
231
|
}
|
230
232
|
|
231
|
-
HISTORY_ACTION=[
|
232
|
-
|
233
|
+
HISTORY_ACTION=[
|
234
|
+
'none',
|
235
|
+
'migrate',
|
236
|
+
'live-migrate',
|
237
|
+
'shutdown',
|
238
|
+
'shutdown-hard',
|
239
|
+
'undeploy',
|
240
|
+
'undeploy-hard',
|
241
|
+
'hold',
|
242
|
+
'release',
|
243
|
+
'stop',
|
244
|
+
'suspend',
|
245
|
+
'resume',
|
246
|
+
'boot',
|
247
|
+
'delete',
|
248
|
+
'delete-recreate',
|
249
|
+
'reboot',
|
250
|
+
'reboot-hard',
|
251
|
+
'resched',
|
252
|
+
'unresched',
|
253
|
+
'poweroff',
|
254
|
+
'poweroff-hard',
|
255
|
+
'disk-attach',
|
256
|
+
'disk-detach',
|
257
|
+
'nic-attach',
|
258
|
+
'nic-detach',
|
259
|
+
'disk-snapshot-create',
|
260
|
+
'disk-snapshot-delete',
|
261
|
+
'terminate',
|
262
|
+
'terminate-hard',
|
263
|
+
'disk-resize',
|
264
|
+
'deploy',
|
265
|
+
'chown',
|
266
|
+
'chmod',
|
267
|
+
'updateconf',
|
268
|
+
'rename',
|
269
|
+
'resize',
|
270
|
+
'update',
|
271
|
+
'snapshot-resize',
|
272
|
+
'snapshot-delete',
|
273
|
+
'snapshot-revert',
|
274
|
+
'disk-saveas',
|
275
|
+
'disk-snapshot-revert',
|
276
|
+
'recover',
|
277
|
+
'retry',
|
278
|
+
'monitor',
|
279
|
+
'disk-snapshot-rename',
|
280
|
+
'alias-attach',
|
281
|
+
'alias-detach',
|
282
|
+
'poweroff-migrate',
|
283
|
+
'poweroff-hard-migrate',
|
284
|
+
'backup',
|
285
|
+
'nic-update',
|
286
|
+
'backup-cancel',
|
287
|
+
'sched-add',
|
288
|
+
'sched-update',
|
289
|
+
'sched-delete',
|
290
|
+
'sg-attach',
|
291
|
+
'sg-detach',
|
292
|
+
'pci-attach',
|
293
|
+
'pci-detach'
|
294
|
+
]
|
233
295
|
|
234
296
|
EXTERNAL_IP_ATTRS = [
|
235
297
|
'GUEST_IP',
|
@@ -811,6 +873,24 @@ module OpenNebula
|
|
811
873
|
@client.call(VM_METHODS[:backupcancel], @pe_id)
|
812
874
|
end
|
813
875
|
|
876
|
+
# Attaches a PCI to a VM
|
877
|
+
#
|
878
|
+
# @param pci [String] Template containing a PCI element
|
879
|
+
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
880
|
+
# otherwise
|
881
|
+
def pci_attach(pci)
|
882
|
+
call(VM_METHODS[:attachpci], @pe_id, pci)
|
883
|
+
end
|
884
|
+
|
885
|
+
# Detaches a PCI from a VM
|
886
|
+
#
|
887
|
+
# @param pci_id [Integer] Id of the PCI to be detached
|
888
|
+
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
889
|
+
# otherwise
|
890
|
+
def pci_detach(pci_id)
|
891
|
+
call(VM_METHODS[:detachpci], @pe_id, pci_id)
|
892
|
+
end
|
893
|
+
|
814
894
|
########################################################################
|
815
895
|
# Helpers to get VirtualMachine information
|
816
896
|
########################################################################
|
data/lib/opennebula/x509_auth.rb
CHANGED
data/lib/opennebula.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opennebula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.8.
|
4
|
+
version: 6.8.3
|
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: 2024-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "<"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.16'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "<"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.16'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|