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

Fixes #26321 - Only allow hwuuid for VMware hypervisors #194

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

chris1984
Copy link
Member

@chris1984 chris1984 commented May 1, 2024

What are the changes introduced in this pull request?

  • Added a model validation to prevent hwuuid being saved with a non esx hypervisor_type
  • Added some JQuery logic to remove and add the hwuuid from the hypervisor_id dropdown based on the hypervisor_type
  • Added a unit test for the model validation change

What are the testing steps for this pull request?

  • Check out PR
  • Create a config and select the hypervisor type as VMware and make sure hwuuid is in the hypervisor_id dropdown
  • Change the dropdown to anything except VMware and make sure hwuuid is removed from the hypervisor_id dropdown
  • Try with hammer to make a config and pass in hwuuid hypervisor-id with a non esx hypervisor type and see if the validation fails with the error I added

Copy link
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Looking good to me, saw the hammer error:

Could not create the Virt Who configuration:
  Hypervisor hwuuid is only supported for ESX hypervisor type

The UI doesn't include the hwuuid type for non ESX hosts.

Just one formatting thing:

Co-authored-by: Ian Ballou <ianballou67@gmail.com>
Copy link
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Looks good!

@chris1984 chris1984 merged commit bd2ecdc into master May 16, 2024
35 checks passed
@chris1984 chris1984 deleted the hwuuid branch May 16, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants