opennebula 6.8.1 → 6.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd7a4911d467d52eb65d694f92c2312c9a04571a2b846054a5807a2faca70613
4
- data.tar.gz: 71626222b92776cc9f11bdb8ed73f374c034d761161d46e2bd498aacf29e2342
3
+ metadata.gz: 5759fbb07bfb063ffa52b37dab6435776ed9d3fa2e14c686df1920d4012b7242
4
+ data.tar.gz: 602088834190d1305ad873f000bab5afe75858b87ab5c9891d2d869d518bf0bc
5
5
  SHA512:
6
- metadata.gz: 7d6cf2da013b4f85775d31894d1a1400f257e45d631fe55bb35c4a487644cd94589d5ce0446f9fc3b0350167cc082a3378147657ce0944656f2fd658357b1323
7
- data.tar.gz: 84d04dfa148dd4a443050b5ac68fb0b80d8a54979816d753951ebfcbe99f8bb2716ba5c09b029f01431666b042f4bb200d5efcd4abbf1173bdd7ae92318c5975
6
+ metadata.gz: 89b9a4ac5491c5b443d30692cd198bbe4176823df5b81fcc914cbb96be8d72d19b9ca6c4ae3e8c97f8754bd745273888cedfa094a71aae9c366cca75987ed152
7
+ data.tar.gz: 40f49cf1a941abc8f5e4f081393f10ec902229704c6ff24e033753b184007d5eaef8bf8d2c0dbeb255c30985b32e07508a36a1b0a2ab531c4437920dcfb436da
@@ -51,7 +51,7 @@ end
51
51
  module CloudClient
52
52
 
53
53
  # OpenNebula version
54
- VERSION = '6.8.1'
54
+ VERSION = '6.8.2'
55
55
 
56
56
  # #########################################################################
57
57
  # Default location for the authentication file
@@ -461,6 +461,10 @@ module Service
461
461
 
462
462
  req['User-Agent'] = @user_agent
463
463
 
464
+ if !@uri.path.nil?
465
+ req.instance_variable_set(:@path, @uri.path + req.path)
466
+ end
467
+
464
468
  CloudClient.http_start(@uri, @timeout) do |http|
465
469
  http.request(req)
466
470
  end
@@ -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=['none', 'migrate', 'live-migrate', 'shutdown', 'shutdown-hard', 'undeploy',
232
- 'undeploy-hard', 'hold', 'release', 'stop', 'suspend', 'resume', 'boot', 'delete', 'delete-recreate', 'reboot', 'reboot-hard', 'resched', 'unresched', 'poweroff', 'poweroff-hard', 'disk-attach', 'disk-detach', 'nic-attach', 'nic-detach', 'disk-snapshot-create', 'disk-snapshot-delete', 'terminate', 'terminate-hard', 'disk-resize', 'deploy', 'chown', 'chmod', 'updateconf', 'rename', 'resize', 'update', 'snapshot-resize', 'snapshot-delete', 'snapshot-revert', 'disk-saveas', 'disk-snapshot-revert', 'recover', 'retry', 'monitor', 'disk-snapshot-rename', 'alias-attach', 'alias-detach', 'poweroff-migrate', 'poweroff-hard-migrate', 'backup', 'nic-update']
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.rb CHANGED
@@ -79,5 +79,5 @@ require 'opennebula/backupjob_pool'
79
79
  module OpenNebula
80
80
 
81
81
  # OpenNebula version
82
- VERSION = '6.8.1'
82
+ VERSION = '6.8.2'
83
83
  end
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.8.1
4
+ version: 6.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-16 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri