Permalink
Browse files

changed default volume type from system to data, and ignore if missing.

This change is done since the volume type is deprecated and is going to be eliminated from the next ovirt version.
  • Loading branch information...
1 parent 903ded9 commit d450764b2601f39f7cde6b5382e6fd3c92b90ab1 @abenari committed Apr 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ovirt/volume.rb
View
@@ -16,7 +16,7 @@ def self.to_xml(storage_domain_id,opts={})
storage_domain_(:id => storage_domain_id)
}
size_(opts[:size] || 8589934592)
- type_(opts[:type] || 'system')
+ type_(opts[:type] || 'data')
bootable_(opts[:bootable] || 'true')
interface_(opts[:interface] || 'virtio')
format_(opts[:format] || 'cow')
@@ -29,7 +29,7 @@ def self.to_xml(storage_domain_id,opts={})
def parse_xml_attributes!(xml)
@storage_domain = (xml/'storage_domains/storage_domain').first[:id]
@size = (xml/'size').first.text
- @disk_type = (xml/'type').first.text
+ @disk_type = ((xml/'type').first.text rescue nil)
@bootable = (xml/'bootable').first.text
@interface = (xml/'interface').first.text
@format = (xml/'format').first.text

0 comments on commit d450764

Please sign in to comment.