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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b256cdb614bb0023edc036f04ee8042e25e44b97
4
- data.tar.gz: 84b055846759a9388ad7a2237548fd169c84e0c7
3
+ metadata.gz: f58b279afbf33a3a7b1a328b4f4d9ca08a434a8a
4
+ data.tar.gz: 4d16da8ba66d0212c450b706abe60029db91bacb
5
5
  SHA512:
6
- metadata.gz: d5fd4ad8d73fcaee3b0c26cce1bb45ede90a9928c6b81f76b1405a4c711dca35877f469b04cdc7a0780ff636f5dc56b1f42c475377780e4c7d16be7cd637081e
7
- data.tar.gz: d683dab0fa543b85ee8753b663154bab86511846b08df3435c5084feadcff1ecb5c29d6e2ba66b12bf7e0beced5c2b9a816752ede48768a27100205540591fa0
6
+ metadata.gz: ed53aa2554a1b4112851cdaa898f72ba8313412a31980f68ead9dd99324f8c07aad3dd24d5730112706069777642b5d1bda7053a0284bf944b7779ac949a4c5e
7
+ data.tar.gz: ed7c9f250ab0fbe4ea381dbabeb47b9868946a8729b5572d772de016be08d82699a9097523fdea450f049ea21817acc445aac6864f80764540fb608c9b64d65c
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '5.7.85'
53
+ VERSION = '5.7.90'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
data/lib/opennebula.rb CHANGED
@@ -71,5 +71,5 @@ require 'opennebula/vntemplate_pool'
71
71
  module OpenNebula
72
72
 
73
73
  # OpenNebula version
74
- VERSION = '5.7.85'
74
+ VERSION = '5.7.90'
75
75
  end
@@ -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 = disk["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 disk['TYPE'] == 'CDROM'
876
+ if type == 'CDROM'
865
877
  replace << "DISK = [ IMAGE_ID = #{image_id}"
866
- if disk["OPENNEBULA_MANAGED"]
867
- replace << ", OPENNEBULA_MANAGED=#{disk["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
- replace << "DISK = [ IMAGE_ID = #{rc} ]\n"
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.85.pre
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-05 00:00:00.000000000 Z
11
+ date: 2019-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri