opennebula 6.8.3 → 6.9.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/cloud/CloudClient.rb +1 -1
- data/lib/models/role.rb +5 -1
- data/lib/models/service.rb +12 -22
- data/lib/opennebula/flow/service_template.rb +1 -1
- data/lib/opennebula/marketplaceapp_ext.rb +0 -5
- data/lib/opennebula/virtual_machine.rb +16 -4
- data/lib/opennebula.rb +1 -1
- data/lib/scripts_common.rb +0 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cf888b9c95db4f557149408182752fb7de455cd59b3f5300b2401dcb9291852
|
4
|
+
data.tar.gz: 02fa72864a8859c132397c2a7d08e5dd831ff5be9743da486f0d782ae8e166b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa192365155396fe0719ef58c97ca01b94f06f0f6bd8d8fb8c87f70b69f85d7cc3b4abe1d2d4c39c63a5419d67351b25d1f0bfa6caf0bce3f09c76e720afa2f1
|
7
|
+
data.tar.gz: cc2141821c1dc205c592f2e7d8f9200ab1b963713b83580350b22f9c551fe3ba7d8cbd670fb174b6211c83529ed064ce6bcf4356a2e1a6c47ef815d8bc17a6ba
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/models/role.rb
CHANGED
@@ -839,7 +839,11 @@ module OpenNebula
|
|
839
839
|
|
840
840
|
rc = deploy
|
841
841
|
|
842
|
-
|
842
|
+
unless rc[0]
|
843
|
+
return [false, "Error deploying nodes for role `#{name}`"]
|
844
|
+
end
|
845
|
+
|
846
|
+
deployed_nodes.concat(rc[0])
|
843
847
|
|
844
848
|
deployed_nodes
|
845
849
|
end
|
data/lib/models/service.rb
CHANGED
@@ -298,7 +298,7 @@ module OpenNebula
|
|
298
298
|
|
299
299
|
@body['networks_values'].each do |vnet|
|
300
300
|
vnet.each do |_, net|
|
301
|
-
next if net.
|
301
|
+
next if net.key?('id') && !deploy
|
302
302
|
|
303
303
|
ret << net['id'].to_i
|
304
304
|
end
|
@@ -635,24 +635,21 @@ module OpenNebula
|
|
635
635
|
end
|
636
636
|
|
637
637
|
def deploy_networks(deploy = true)
|
638
|
-
if deploy
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
638
|
+
body = if deploy
|
639
|
+
JSON.parse(self['TEMPLATE/BODY'])
|
640
|
+
else
|
641
|
+
@body
|
642
|
+
end
|
643
643
|
|
644
644
|
return if body['networks_values'].nil?
|
645
645
|
|
646
646
|
body['networks_values'].each do |vnet|
|
647
647
|
vnet.each do |name, net|
|
648
|
-
|
648
|
+
next if net.key?('id')
|
649
649
|
|
650
|
-
|
651
|
-
when 'id'
|
652
|
-
next
|
653
|
-
when 'template_id'
|
650
|
+
if net.key?('template_id')
|
654
651
|
rc = create_vnet(name, net)
|
655
|
-
|
652
|
+
elsif net.key?('reserve_from')
|
656
653
|
rc = reserve(name, net)
|
657
654
|
end
|
658
655
|
|
@@ -678,18 +675,14 @@ module OpenNebula
|
|
678
675
|
|
679
676
|
vnets.each do |vnet|
|
680
677
|
vnet.each do |_, net|
|
681
|
-
key
|
682
|
-
|
683
|
-
next unless ['template_id', 'reserve_from'].include?(key)
|
678
|
+
next unless net.key?('template_id') || net.key?('reserve_from')
|
684
679
|
|
685
680
|
rc = OpenNebula::VirtualNetwork.new_with_id(
|
686
681
|
net['id'],
|
687
682
|
@client
|
688
683
|
).delete
|
689
684
|
|
690
|
-
|
691
|
-
|
692
|
-
vnets_failed << net['id']
|
685
|
+
vnets_failed << net['id'] if OpenNebula.is_error?(rc)
|
693
686
|
end
|
694
687
|
end
|
695
688
|
|
@@ -798,10 +791,7 @@ module OpenNebula
|
|
798
791
|
|
799
792
|
next if net.nil?
|
800
793
|
|
801
|
-
role['vm_template_contents'].gsub!(
|
802
|
-
'$'+key[0],
|
803
|
-
net[net.keys[0]]['id'].to_s
|
804
|
-
)
|
794
|
+
role['vm_template_contents'].gsub!("$#{key[0]}", net[key[0]]['id'].to_s)
|
805
795
|
end
|
806
796
|
end
|
807
797
|
end
|
@@ -93,7 +93,6 @@ module OpenNebula::MarketPlaceAppExt
|
|
93
93
|
# Exports an OpenNebula Image from this marketplace app
|
94
94
|
# @param options to export the image
|
95
95
|
# :vmtemplate_name [String] name of new image and template
|
96
|
-
# :url_args [String] optional URL arguments
|
97
96
|
# :dsid [String] Datastore id to create the image
|
98
97
|
# :f_dsid [String] Files Datastore id
|
99
98
|
# :notemplate [Bool] if true do not create vm_template (if any)
|
@@ -126,10 +125,6 @@ module OpenNebula::MarketPlaceAppExt
|
|
126
125
|
FROM_APP = "#{self['ID']}"
|
127
126
|
EOT
|
128
127
|
|
129
|
-
if options[:url_args]
|
130
|
-
tmpl << "URL_ARGS=\"#{options[:url_args]}\"\n"
|
131
|
-
end
|
132
|
-
|
133
128
|
#---------------------------------------------------------------
|
134
129
|
# Kernel or context images stored in a files datastore
|
135
130
|
#---------------------------------------------------------------
|
@@ -63,7 +63,8 @@ module OpenNebula
|
|
63
63
|
:updatenic => 'vm.updatenic',
|
64
64
|
:backupcancel => 'vm.backupcancel',
|
65
65
|
:attachpci => 'vm.attachpci',
|
66
|
-
:detachpci => 'vm.detachpci'
|
66
|
+
:detachpci => 'vm.detachpci',
|
67
|
+
:restore => 'vm.restore'
|
67
68
|
}
|
68
69
|
|
69
70
|
VM_STATE=['INIT', 'PENDING', 'HOLD', 'ACTIVE', 'STOPPED', 'SUSPENDED', 'DONE', 'FAILED',
|
@@ -140,7 +141,8 @@ module OpenNebula
|
|
140
141
|
'HOTPLUG_SAVEAS_UNDEPLOYED',
|
141
142
|
'HOTPLUG_SAVEAS_STOPPED',
|
142
143
|
'BACKUP',
|
143
|
-
'BACKUP_POWEROFF'
|
144
|
+
'BACKUP_POWEROFF',
|
145
|
+
'RESTORE'
|
144
146
|
]
|
145
147
|
|
146
148
|
SHORT_VM_STATES={
|
@@ -227,7 +229,8 @@ module OpenNebula
|
|
227
229
|
'HOTPLUG_SAVEAS_UNDEPLOYED' => 'hotp',
|
228
230
|
'HOTPLUG_SAVEAS_STOPPED' => 'hotp',
|
229
231
|
'BACKUP' => 'back',
|
230
|
-
'BACKUP_POWEROFF' => 'back'
|
232
|
+
'BACKUP_POWEROFF' => 'back',
|
233
|
+
'RESTORE' => 'rest'
|
231
234
|
}
|
232
235
|
|
233
236
|
HISTORY_ACTION=[
|
@@ -290,7 +293,8 @@ module OpenNebula
|
|
290
293
|
'sg-attach',
|
291
294
|
'sg-detach',
|
292
295
|
'pci-attach',
|
293
|
-
'pci-detach'
|
296
|
+
'pci-detach',
|
297
|
+
'restore'
|
294
298
|
]
|
295
299
|
|
296
300
|
EXTERNAL_IP_ATTRS = [
|
@@ -891,6 +895,14 @@ module OpenNebula
|
|
891
895
|
call(VM_METHODS[:detachpci], @pe_id, pci_id)
|
892
896
|
end
|
893
897
|
|
898
|
+
# Restore the VM from backup Image
|
899
|
+
#
|
900
|
+
# @return [nil, OpenNebula::Error] nil in case of sucess, Error
|
901
|
+
# otherwise.
|
902
|
+
def restore(img_id, inc_id, disk_id)
|
903
|
+
@client.call(VM_METHODS[:restore], @pe_id, img_id, inc_id, disk_id)
|
904
|
+
end
|
905
|
+
|
894
906
|
########################################################################
|
895
907
|
# Helpers to get VirtualMachine information
|
896
908
|
########################################################################
|
data/lib/opennebula.rb
CHANGED
data/lib/scripts_common.rb
CHANGED
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.9.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: 2024-
|
11
|
+
date: 2024-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -258,11 +258,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
260
|
requirements:
|
261
|
-
- - "
|
261
|
+
- - ">"
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
263
|
+
version: 1.3.1
|
264
264
|
requirements: []
|
265
|
-
rubygems_version: 3.
|
265
|
+
rubygems_version: 3.3.5
|
266
266
|
signing_key:
|
267
267
|
specification_version: 4
|
268
268
|
summary: OpenNebula Client API
|