Skip to content

Commit b5f9b0f

Browse files
committed
Drop boot_index -1
1 parent d3da5e7 commit b5f9b0f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/models/manageiq/providers/openstack/cloud_manager/provision/volume_attachment.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ def create_requested_volumes(requested_volumes)
1010
volume_attrs[:imageRef] = source.ems_ref # Set the image reference for booting
1111
volume_attrs[:bootable] = true
1212
volume_attrs[:boot_index] = 0
13-
else # Subsequent volumes will be assigned to vdb, vdc, etc.
14-
volume_attrs[:boot_index] = -1
1513
end
1614
end
1715

spec/models/manageiq/providers/openstack/cloud_manager/provision/volume_attachment_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
context "with multiple requested volumes" do
4444
let(:task_volumes) { [{:name => "custom_volume_1", :size => 2}, {:name => "custom_volume_2", :size => 4}] }
4545

46-
it "sets other volumes as boot_index -1" do
46+
it "only sets boot_index for first volumes" do
4747
expected_volume_1 = {:name => "custom_volume_1", :size => 2, :uuid => volume.id, :source_type => "volume",
4848
:destination_type => "volume", :boot_index => 0, :bootable => true, :imageRef => template.ems_ref}
4949
expected_volume_2 = {:name => "custom_volume_2", :size => 4, :uuid => volume.id, :source_type => "volume",
50-
:destination_type => "volume", :boot_index => -1}
50+
:destination_type => "volume"}
5151

5252
expect(task.create_requested_volumes(task.options[:volumes])).to eq([expected_volume_1, expected_volume_2])
5353
end

0 commit comments

Comments
 (0)