vmware/pyvmomi-community-samples

Listening for vsphere events using Pyvmomi

Open

#641 geöffnet am 12. Mai 2020

Auf GitHub ansehen
 (10 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (914 Forks)batch import
help wanted

Repository-Metriken

Stars
 (972 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hello, I am writing some prototypes where in my code gets called when a specific event happens. I looked at some sample code in https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/relocate_events.py. This seems to be querying for some specific events that has happened in the past.

What i am looking for is for my function to be called asynchronously when certain events of interest occurs in the future. Or the events can be put in the queue that my module defines.

'govmomi' seems to have something similar as in: err = eventManager.Events(ctx, refs, 10, false, false, handleEvent)

Is there a way to achieve this using pyvmomi?

Thanks, KP

Contributor Guide