Skip to content

Commit

Permalink
Merge pull request #13346 from camillo-toselli/main
Browse files Browse the repository at this point in the history
Update configure_disks.rb
  • Loading branch information
chrisroberts committed Jul 11, 2024
2 parents 60fe48c + f8ba723 commit 015e050
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/providers/hyperv/cap/configure_disks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ def self.create_disk(machine, disk_config)

LOGGER.info("Attempting to create a new disk file '#{disk_file}' of size '#{disk_config.size}' bytes")

machine.provider.driver.create_disk(disk_file, disk_config.size, disk_provider_config)
machine.provider.driver.create_disk(disk_file, disk_config.size, **disk_provider_config)
end

disk_info = machine.provider.driver.get_disk(disk_file)
disk_metadata = {UUID: disk_info["DiskIdentifier"], Name: disk_config.name, Path: disk_info["Path"]}

machine.provider.driver.attach_disk(disk_file, disk_provider_config)
machine.provider.driver.attach_disk(disk_file, **disk_provider_config)

disk_metadata
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@

it "creates a disk and attaches it to a guest" do
expect(machine).to receive(:data_dir).and_return(data_dir)
expect(driver).to receive(:create_disk).with(disk_file, disk_config.size, {})
expect(driver).to receive(:create_disk).with(disk_file, disk_config.size)
expect(driver).to receive(:get_disk).with(disk_file).and_return(disk)

expect(driver).to receive(:attach_disk).with(disk_file, {})
expect(driver).to receive(:attach_disk).with(disk_file)

subject.create_disk(machine, disk_config)
end
Expand Down

0 comments on commit 015e050

Please sign in to comment.