Created
October 2, 2020 02:26
-
-
Save codegold79/75dd14456ac0be0d9b42ad6c8590d20c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func (c *vsClient) moVirtualMachine(ctx context.Context, mor types.ManagedObjectReference) (mo.VirtualMachine, error) { | |
| var moVM mo.VirtualMachine | |
| pc := property.DefaultCollector(c.govmomi.Client) | |
| err := pc.Retrieve(ctx, []types.ManagedObjectReference{mor}, []string{}, &moVM) | |
| if err != nil { | |
| return mo.VirtualMachine{}, err | |
| } | |
| return moVM, nil | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment