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 support for precision clock device #367

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

xtalkme
Copy link
Contributor

@xtalkme xtalkme commented Feb 26, 2024

These changes allow you to define a VirtualPrecisionClock device.

Reference

Closes #354

Tests

From @tenthirtyam

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 go get

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 took 3.0s go mod tidy

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 go fmt builder/vsphere/driver/vm.go 

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 go fmt builder/vsphere/driver/vm_test.go 

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 go fmt builder/vsphere/common/step_hardware.go 

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 go fmt builder/vsphere/common/step_hardware_test.go 

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 make generate
2024/02/26 14:26:48 Copying "docs" to ".docs/"
2024/02/26 14:26:48 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 took 41.1s make build

packer-plugin-vsphere on  pr/367 [⇕$!] via 🐹 v1.22.0 make test
?       github.com/hashicorp/packer-plugin-vsphere      [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/testing       [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/examples/driver      [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/version      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone        8.858s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common       4.369s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/driver       15.168s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso  6.187s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor   20.340s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere       12.214s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template      14.876s

@xtalkme xtalkme requested a review from a team as a code owner February 26, 2024 15:17
@hashicorp-cla
Copy link

hashicorp-cla commented Feb 26, 2024

CLA assistant check
All committers have signed the CLA.

@tenthirtyam tenthirtyam changed the title feat: add support for VirtualPrecisionClock feat: add support for precision clock device Feb 26, 2024
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.

Suggested changes provided. Additinally, the following privledges would also need to be noted in the documentation.

  • Virtual Machine.Configuration: Add or remove device
  • Virtual machine.Configuration: Modify device settings

@tenthirtyam tenthirtyam marked this pull request as draft February 26, 2024 16:00
@tenthirtyam tenthirtyam self-requested a review February 26, 2024 19:09
@tenthirtyam tenthirtyam force-pushed the add_virtual_precision_clock branch 2 times, most recently from 8c91c17 to ca29ee1 Compare February 26, 2024 19:38
@tenthirtyam tenthirtyam marked this pull request as ready for review February 26, 2024 19:38
@tenthirtyam
Copy link
Collaborator

I've corrected the CI issues, updated the description, and squashed the commits.

Results attached in the Tests section.

@tenthirtyam tenthirtyam force-pushed the add_virtual_precision_clock branch from f63791d to aac9560 Compare February 26, 2024 19:47
Add support for adding a precision clock device to a virtual machine during the image build.

Co-Authored-By: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam force-pushed the add_virtual_precision_clock branch from e9a65bd to 169fe48 Compare February 26, 2024 19:51
@tenthirtyam tenthirtyam self-requested a review February 26, 2024 19:52
@tenthirtyam tenthirtyam dismissed their stale review February 26, 2024 19:53

Review again.

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.

LGTM! Reviewed and updated as applicable.

@xtalkme
Copy link
Contributor Author

xtalkme commented Feb 26, 2024

This MR started like i sorta knew what i was doing. That escalated quickly...
Thanks for your help!

@tenthirtyam
Copy link
Collaborator

Nah, great job in adding the capability. This contribution is most welcome. In fact, there is a need to do the same in the Terraform provider, too. :)

Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for the contribution @xtalkme

@tenthirtyam as always thanks for the review and pushing this change forward. 💙

@nywilken nywilken merged commit cb91e45 into hashicorp:main Feb 27, 2024
12 checks passed
@tenthirtyam tenthirtyam added this to the v1.2.5 milestone Mar 6, 2024
@hashicorp hashicorp locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for adding a precision clock device
4 participants