Skip to content

Commit

Permalink
Merge pull request #276 from borod108/bug/1598747disk_type
Browse files Browse the repository at this point in the history
Fix disk_type attribute
  • Loading branch information
agrare committed Aug 16, 2018
2 parents 5e754c1 + a0002db commit 79344a2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def self.vm_inv_to_disk_hashes(inv, storage_uids)
:location => index.to_s,
:size => (device[:provisioned_size] || device[:size]).to_i,
:size_on_disk => device[:actual_size] ? device[:actual_size].to_i : 0,
:disk_type => device[:sparse] == true ? 'thin' : 'thick',
:disk_type => device[:format] == 'raw' ? 'thick' : 'thin',
:mode => 'persistent',
:bootable => device[:bootable]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def vm_inv_to_disk_hashes(inv, storage_uids)
:location => index.to_s,
:size => device.provisioned_size.to_i,
:size_on_disk => device.actual_size.to_i,
:disk_type => device.sparse == true ? 'thin' : 'thick',
:disk_type => device.format == 'raw' ? 'thick' : 'thin',
:mode => 'persistent',
:bootable => device.try(:bootable)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def hardware_disks(persister_hardware, disks)
:location => index.to_s,
:size => device.provisioned_size.to_i,
:size_on_disk => device.actual_size.to_i,
:disk_type => device.sparse == true ? 'thin' : 'thick',
:disk_type => device.format == 'raw' ? 'thick' : 'thin',
:mode => 'persistent',
:bootable => device.try(:bootable),
:storage => persister.storages.lazy_find(ManageIQ::Providers::Redhat::InfraManager.make_ems_ref(storage_ref))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ def assert_specific_vm_powered_off
:size => 6_442_450_944,
:size_on_disk => 0,
:mode => "persistent",
:disk_type => "thin",
:disk_type => "thick",
:start_connected => true
)
expect(disk.storage).to eq(@storage) ## CHECK MANUALLY
Expand Down Expand Up @@ -777,7 +777,7 @@ def assert_specific_template
:size => 6_442_450_944,
:size_on_disk => 1_838_448_640,
:mode => "persistent",
:disk_type => "thin",
:disk_type => "thick",
:start_connected => true
)
expect(disk.storage).to eq(@storage) ## CHECK MANUALLY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def assert_specific_vm_powered_off
:size => 6_442_450_944,
:size_on_disk => 0,
:mode => "persistent",
:disk_type => "thin",
:disk_type => "thick",
:start_connected => true
)
expect(disk.storage).to eq(@storage) ## CHECK MANUALLY
Expand Down Expand Up @@ -742,7 +742,7 @@ def assert_specific_template
:size => 6_442_450_944,
:size_on_disk => 1_838_448_640,
:mode => "persistent",
:disk_type => "thin",
:disk_type => "thick",
:start_connected => true
)
expect(disk.storage).to eq(@storage) ## CHECK MANUALLY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def assert_vm_rels(vm, hardware, storage)
:present => true,
:start_connected => true,
:auto_detect => nil,
:disk_type => "thin",
:disk_type => "thick",
:storage_id => storage.id,
:backing_id => nil,
:backing_type => nil,
Expand Down

0 comments on commit 79344a2

Please sign in to comment.