Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add usb controller #2280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

burnsjared0415
Copy link
Collaborator

Description

Add the ability to add usb controller on build and modification of virtual machine.

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

Running tool: /usr/local/bin/go test -timeout 30s -run ^TestAccResourceVSphereVirtualMachine_basic$ github.com/hashicorp/terraform-provider-vsphere/vsphere

ok  	github.com/hashicorp/terraform-provider-vsphere/vsphere	0.885s
$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Closes #620

@burnsjared0415 burnsjared0415 added this to the v2.10.0 milestone Oct 9, 2024
@burnsjared0415 burnsjared0415 self-assigned this Oct 9, 2024
@github-actions github-actions bot added documentation Type: Documentation provider Type: Provider needs-review Status: Pull Request Needs Review labels Oct 9, 2024
@burnsjared0415 burnsjared0415 force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch from 1420065 to 2ca7685 Compare October 9, 2024 18:42
CHANGELOG.md Outdated Show resolved Hide resolved
@burnsjared0415 burnsjared0415 force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch 2 times, most recently from 647a6a0 to 6feba9c Compare October 9, 2024 19:35
@burnsjared0415 burnsjared0415 added the enhancement Type: Enhancement label Oct 10, 2024
@tenthirtyam tenthirtyam marked this pull request as ready for review October 10, 2024 17:18
@tenthirtyam tenthirtyam requested a review from a team as a code owner October 10, 2024 17:18
@tenthirtyam tenthirtyam self-requested a review October 11, 2024 18:01
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some thoughts on supporting only a single USB controller for each supported version based on the configuration maximums in v7 and v8.

@tenthirtyam tenthirtyam changed the title feat:r/vsphere_virtual_machine add usb controller feat: add usb controller Oct 11, 2024
@tenthirtyam tenthirtyam modified the milestones: v2.10.0, On Deck, v.2.11.0 Oct 16, 2024
@burnsjared0415 burnsjared0415 force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch 2 times, most recently from 86290f9 to 95782f5 Compare October 30, 2024 20:23
@tenthirtyam tenthirtyam force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch from 95782f5 to 2be836d Compare October 31, 2024 17:04
@tenthirtyam tenthirtyam force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch from 2be836d to 2156d69 Compare November 2, 2024 08:22
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
vsphere/resource_vsphere_virtual_machine.go Outdated Show resolved Hide resolved
@burnsjared0415 burnsjared0415 force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch from 2156d69 to 911cae3 Compare November 8, 2024 15:26
Add the ability to add usb controller on build and modification of virtual machine.

Signed-off-by: Jared Burns <[email protected]>
@tenthirtyam tenthirtyam force-pushed the feat-r/vsphere_virtual_machine-add-usb-controller branch from 911cae3 to db44d5d Compare November 12, 2024 14:54
Comment on lines +921 to +925
}

default:
return fmt.Errorf("unsupported USB version: %s", usbVersion)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
default:
return fmt.Errorf("unsupported USB version: %s", usbVersion)
}
}
default:
return fmt.Errorf("unsupported USB version: %s", usbVersion)
}

return fmt.Errorf("error fetching virtual machine properties: %s", err)
}

// Check for existing USB controllers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Check for existing USB controllers
// Check for existing USB controllers.

return fmt.Errorf("usb_controller is empty")
}

// Initialize controller presence flags
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Initialize controller presence flags
// Initialize controller presence flags.

Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits, but otherwise looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Type: Documentation enhancement Type: Enhancement needs-review Status: Pull Request Needs Review provider Type: Provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for USB controllers
2 participants