I need to fetch events from a virtual machine in Groovy. I found this java class that apparently lists events and allows me to filter them but it’s getting too complex and I don’t think this is what I really need. What I’m looking at is a java/groovy version of the CLI call:
$vc_events = Get-VIEvent -Server $vm | where {$_.CreatedTime -gt $lastEventTime -and $_.EventTypeId -like "com.SomepPlugin.event.*"}
My problem with the class I found is that SoapUI, which is where I’m using Groovy, doesn’t like to use imported jars in its groovy script. It always fails to recognize the classes and packages I try to import in the groovy script even if the jar file is in the appropriate extensions folder. I’m going to have to write a Groovy class similar to the one in the link above to make it work and I’d like to keep it simple.
Any help is appreciated.
You can run your PowerCLI command (or even GUI actions) against doublecloud-proxy and it will spit out java for you.