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

Adjust VM code #509

Merged
merged 23 commits into from
Oct 19, 2022
Merged

Adjust VM code #509

merged 23 commits into from
Oct 19, 2022

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Oct 5, 2022

This code has a few tweaks for existing VM code.

  • New function vApp.AddRawVM to support addition of VM from type *types.ReComposeVAppParams instead of functions such as AddNewVMWithComputePolicy, AddNewVMWithStorageProfile, AddNewVM which only accept some field values and need constant improvement.
  • vm.ChangeCPUAndCoreCount which is almost the same as vm.ChangeCPU except that it accepts pointers instead of integers - this gives the option to specify only one of values the other being nil, which is more convenient in some workflows (including terraform-provider-vcd)
  • Type types.RecomposeVAppParamsForEmptyVm had missing PowerOn field which is used to control VM power state on creation

Additional. Apparently we had a long existing inverse action for testing flag GOVCD_IGNORE_CLEANUP_FILE. It would perform cleanup for previous files only if GOVCD_IGNORE_CLEANUP_FILE is set (which is the reverse of its meaning). This PR patches condition check to match name of the flag.

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius changed the title Improve vm Adjust VM code Oct 5, 2022
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius self-assigned this Oct 12, 2022
@Didainius Didainius marked this pull request as ready for review October 12, 2022 07:12
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

LGTM!

I'm just thinking maybe we should add a note about GOVCD_IGNORE_CLEANUP_FILE fix/change to TESTING section of the changelog.

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Just a few nitpicks

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius merged commit 103960d into vmware:main Oct 19, 2022
@Didainius Didainius deleted the improve-vm branch October 19, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants