14 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
sophia
f4640e49ff Ensure provider specific config gets transformed into common form 2020-10-06 16:27:20 -05:00
Jeff Bonhag
de461fa47c
Fix a couple of tests
Use subject instead of invalid_subject because the validation assertions
test the subject double.

This also adds an additional check when validating the `size` attribute
because it is only required for disks of type `:disk`.
2020-07-09 15:33:19 -04:00
Jeff Bonhag
e21fb59380
DVD attachments should never be primary 2020-07-09 15:07:48 -04:00
Jeff Bonhag
c52eb1b44c
Feature: ISO attachment for VirtualBox
This builds on the existing disk functionality, and adds some special
IDE controller-related flavor.

Considerations for IDE controllers:
- Primary/secondary attachments, so that each port can have two devices
  attached
- Adding the ability to address a specific controller name for disk
  attachment

This also prevents a user from attaching multiple instances of the same
ISO file, because VirtualBox will assign each of these the same UUID
which makes disconnection difficult. However, if multiple copies of the
ISO are attached to different devices, removing the DVD config will
cause the duplicate devices to be removed.

We may want to consider additional work to make the storage controllers
truly generic.
2020-07-09 15:07:27 -04:00
Brian Cain
b36db04b3d
Validate and get default disk extensions for provider
This commit updates the hyperv and virtualbox provider caps to validate
and also return the default disk extension.
2020-06-30 14:23:34 -07:00
Brian Cain
66fe2e2854
Ensure size param is set for a disk 2020-06-30 14:23:34 -07:00
Brian Cain
cf063c6e38
Update validation to look for if provider_config is empty not nil 2020-06-30 14:22:41 -07:00
Brian Cain
fe7705e694
Update how disk_ext default is set
Prior to this commit, the default value of disk_ext was set in the
finalize! method, and was really only valid for the virtualbox provider.
This commit updates that by moving the step into the validate function,
which has access to the machines provider.
2020-06-30 14:22:41 -07:00
Brian Cain
c179b2fb22
Include updated unit tests for disk ext update 2020-02-12 13:51:59 -08:00
Brian Cain
a457dee8b0
Set default disk to non-primary 2019-11-22 14:40:23 -08:00
Brian Cain
f01c90e676
Rename rspec test name 2019-11-22 14:40:23 -08:00
Brian Cain
87366cf4f3
Add basic disk config unit tests 2019-11-22 14:40:23 -08:00