opennebula 5.7.85.pre → 5.7.90.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/opennebula.rb +1 -1
- data/lib/opennebula/virtual_machine.rb +24 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f58b279afbf33a3a7b1a328b4f4d9ca08a434a8a
|
4
|
+
data.tar.gz: 4d16da8ba66d0212c450b706abe60029db91bacb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed53aa2554a1b4112851cdaa898f72ba8313412a31980f68ead9dd99324f8c07aad3dd24d5730112706069777642b5d1bda7053a0284bf944b7779ac949a4c5e
|
7
|
+
data.tar.gz: ed7c9f250ab0fbe4ea381dbabeb47b9868946a8729b5572d772de016be08d82699a9097523fdea450f049ea21817acc445aac6864f80764540fb608c9b64d65c
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula.rb
CHANGED
@@ -782,6 +782,12 @@ module OpenNebula
|
|
782
782
|
REMOVE_VNET_ATTRS = %w{AR_ID BRIDGE CLUSTER_ID IP MAC TARGET NIC_ID
|
783
783
|
NETWORK_ID VN_MAD SECURITY_GROUPS VLAN_ID}
|
784
784
|
|
785
|
+
REMOVE_IMAGE_ATTRS = %w{DEV_PREFIX SOURCE ORIGINAL_SIZE SIZE
|
786
|
+
DISK_SNAPSHOT_TOTAL_SIZE DRIVER IMAGE_STATE SAVE CLONE READONLY
|
787
|
+
PERSISTENT TARGET ALLOW_ORPHANS CLONE_TARGET CLUSTER_ID DATASTORE
|
788
|
+
DATASTORE_ID DISK_ID DISK_TYPE IMAGE_ID IMAGE IMAGE_UNAME IMAGE_UID
|
789
|
+
LN_TARGET TM_MAD TYPE OPENNEBULA_MANAGED}
|
790
|
+
|
785
791
|
def save_as_template(name,description, persistent=nil)
|
786
792
|
img_ids = []
|
787
793
|
new_tid = nil
|
@@ -858,13 +864,19 @@ module OpenNebula
|
|
858
864
|
raise
|
859
865
|
end
|
860
866
|
|
861
|
-
image_id
|
867
|
+
image_id = disk["IMAGE_ID"]
|
868
|
+
opennebula_managed = disk["OPENNEBULA_MANAGED"]
|
869
|
+
type = disk["TYPE"]
|
870
|
+
|
871
|
+
REMOVE_IMAGE_ATTRS.each do |attr|
|
872
|
+
disk.delete_element(attr)
|
873
|
+
end
|
862
874
|
|
863
875
|
if !image_id.nil? && !image_id.empty?
|
864
|
-
if
|
876
|
+
if type == 'CDROM'
|
865
877
|
replace << "DISK = [ IMAGE_ID = #{image_id}"
|
866
|
-
if
|
867
|
-
replace << ", OPENNEBULA_MANAGED=#{
|
878
|
+
if opennebula_managed
|
879
|
+
replace << ", OPENNEBULA_MANAGED=#{opennebula_managed}"
|
868
880
|
end
|
869
881
|
replace << " ]\n"
|
870
882
|
else
|
@@ -878,7 +890,14 @@ module OpenNebula
|
|
878
890
|
|
879
891
|
img_ids << rc.to_i
|
880
892
|
|
881
|
-
|
893
|
+
disk_template = disk.template_like_str(".").tr("\n", ",\n")
|
894
|
+
|
895
|
+
if disk_template.empty?
|
896
|
+
replace << "DISK = [ IMAGE_ID = #{rc} ] \n"
|
897
|
+
else
|
898
|
+
replace << "DISK = [ IMAGE_ID = #{rc}, " <<
|
899
|
+
disk_template << " ] \n"
|
900
|
+
end
|
882
901
|
end
|
883
902
|
else
|
884
903
|
# Volatile disks cannot be saved, so the definition is copied
|
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: 5.7.
|
4
|
+
version: 5.7.90.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|