VMware Cloud Community
PrakTechWorld
Contributor
Contributor

using WaitForUpdate method of PropertyCollector to get any notification

Hi All,

I was trying to get any notification on any change in any cluster properties in a vCenter.

In particular I want to get any notification  from VCenter in case

1. Hosts are moved in between the clusters.

2. Hosts are added or removed from the hosts.

3. And some more cluster properties.

To acheive this, I was trying to use the WaitForUpdates method of PropertyCollector class from SDK, but not able to get any demo code.

It will be very useful if some one guide me on how to use the WaitForUpdates method.

I have gone through the PropertyCollector document but not getting any clue.

Please help  me on this?


Thank You

0 Kudos
3 Replies
dvatov
VMware Employee
VMware Employee

Check these workflows - you can use them as sample. They are not calling waitForUpdate but build a filter spec, so you only need to implement the parsing of the UpdateSet.

0 Kudos
PrakTechWorld
Contributor
Contributor

Hi Davtov,

First of all thank you for your response.

The file you shared is cosists of only XML files or some text file, which I am not able to understand.

it will be really helpful, if you can share any java test file which i can use as my sample code to achieve my goals.

Thank You once again.

0 Kudos
dvatov
VMware Employee
VMware Employee

These files are exports of 2 workflows. You can import them from workflows tab.

0 Kudos