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

fix: add memory_reservation_locked_to_max property to r/vsphere_virtual_macine schema for sr-iov #2093

Conversation

vasilsatanasov
Copy link
Contributor

@vasilsatanasov vasilsatanasov commented Dec 14, 2023

Description

The memory_reservation_locked_to_max property was missing from vsphere_virtual_macine schema (both data and resource). The property of the VM was automatically set to false if memory and memory_reservation properties have different values.

With this commit the property can be set to true explicitly and it will be applied only if memory and memory_reservation properties have same values. If the memory_reservation_locked_to_max is not explicitly set to true the original behaviour is preserved.

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:

API server listening at: 127.0.0.1:60172
=== RUN   TestAccDataSourceVSphereVirtualMachine_basic
--- PASS: TestAccDataSourceVSphereVirtualMachine_basic (71.99s)
PASS

Debugger finished with the exit code 0

=== RUN   TestAccResourceVSphereVirtualMachine_createMemoryReservationLockedToMax
--- PASS: TestAccResourceVSphereVirtualMachine_createMemoryReservationLockedToMax (112.44s)
PASS

Debugger finished with the exit code 0

...

Release Note

Release note for CHANGELOG:

Added support for memory_reservation_locked_to_max property for virtual machine

References

Closes #2091

vsphere_virtual_macine schema

Fixes hashicorp#2091
The  memory_reservation_locked_to_max property was missing from
vsphere_virtual_macine schema (both data and resource). The property of
the VM was automaticaly set to false if memory and memory_reservation
properties have different values. With this commit the property can be
set to true explicitly and it will be applied only if  memory and
memory_reservation properties have same values. If the
memory_reservation_locked_to_max is not explicitly set to true the
original behavior is preserved.

Signed-off-by: Vasil Atanasov <vasila@vmware.com>
@vasilsatanasov vasilsatanasov requested a review from a team as a code owner December 14, 2023 15:05
@tenthirtyam tenthirtyam changed the title [feat sr-iov] Adding memory_reservation_locked_to_max property to vsphere_virtual_macine schema feat: add memory_reservation_locked_to_max property to r/vsphere_virtual_macine schema for sr-iov Dec 14, 2023
@tenthirtyam tenthirtyam changed the title feat: add memory_reservation_locked_to_max property to r/vsphere_virtual_macine schema for sr-iov fix: add memory_reservation_locked_to_max property to r/vsphere_virtual_macine schema for sr-iov Dec 14, 2023
@tenthirtyam tenthirtyam added bug Type: Bug area/vm Area: Virtual Machines area/networking Area: Networking labels Dec 14, 2023
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

@tenthirtyam tenthirtyam added this to the v2.7.0 milestone Dec 14, 2023
@tenthirtyam tenthirtyam merged commit 9aac934 into hashicorp:main Jan 8, 2024
4 checks passed
Copy link

github-actions bot commented Feb 8, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/networking Area: Networking area/vm Area: Virtual Machines bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for memory_reservation_locked_to_max property for r/vsphere_virtual_machine
3 participants