Skip to content

Instantly share code, notes, and snippets.

@codegold79
Last active October 2, 2020 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codegold79/dac6924ef2ea4545cee701357bb3e1ba to your computer and use it in GitHub Desktop.
Save codegold79/dac6924ef2ea4545cee701357bb3e1ba to your computer and use it in GitHub Desktop.
func eventVmMoRef(event cloudEvent) (types.ManagedObjectReference, error) {
// Fill information in the request into a govmomi type.
moRef := types.ManagedObjectReference{
Type: event.Data.Vm.Vm.Type,
Value: event.Data.Vm.Vm.Value,
}
return moRef, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment