vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.27k stars 897 forks source link

ISSUE-3337: Fix bug in vcsim - vim.VirtualMachine.snapshot property c… #3381

Closed bardielle closed 4 months ago

bardielle commented 4 months ago

…auses runtime error when not set

Description

This is a hotfix that solving the issue 3337 vcsim: vim.VirtualMachine.snapshot property causes runtime error when not set

Closes: #(3337)

Type of change

I saw that if VirtualMachine.snapshot wasn't set I'm getting the error runtime error: index out of range [0] with length 0

That due to obj.MissingSet is empty

Please mark options that are relevant:

How Has This Been Tested?

Running a create VM request without snapshot against vcsim

Checklist:

vmwclabot commented 4 months ago

@bardielle, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

bardielle commented 4 months ago

@dougm

vmwclabot commented 4 months ago

@bardielle, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot commented 2 months ago

@bardielle, VMware has approved your signed contributor license agreement.