Anyone know what the vCO equivalent of "Get-View eventManager" would be?
Using Onyx it looks like it translates to:
// ------- RetrieveProperties -------
var specSet = System.getModule("com.vmware.onyx").array(VcPropertyFilterSpec, 1);
specSet[0] = new VcPropertyFilterSpec();
specSet[0].propSet = System.getModule("com.vmware.onyx").array(VcPropertySpec, 1);
specSet[0].propSet[0] = new VcPropertySpec();
specSet[0].propSet[0].type = "EventManager";
specSet[0].propSet[0].all = true;
specSet[0].objectSet = System.getModule("com.vmware.onyx").array(VcObjectSpec, 1);
specSet[0].objectSet[0] = new VcObjectSpec();
specSet[0].objectSet[0].obj = Server.findForType("VC:EventManager", managedObject.vimHost.id + "/EventManager");;
managedObject.retrieveProperties(specSet); // PropertyCollector
But I'm not sure which object "managedObject" refers to in that last line.
Thanks,
Magnus
Hi Magnus,
Actually Onyx shows you the hard way of getting it.
The easiest way to get the eventManager is through the "VC:SdkConnection" object, there is the property of the object called "eventManager". The "VC:SdkConnection" type can be specified as an input parameter of a workflow, or you can get a reference to an object of this type by accessing the sdkConnection property of any vCenter managed object (like VirtualMachine, HostSystem, etc.)
Thanks,
Milko
Hi Magnus,
Actually Onyx shows you the hard way of getting it.
The easiest way to get the eventManager is through the "VC:SdkConnection" object, there is the property of the object called "eventManager". The "VC:SdkConnection" type can be specified as an input parameter of a workflow, or you can get a reference to an object of this type by accessing the sdkConnection property of any vCenter managed object (like VirtualMachine, HostSystem, etc.)
Thanks,
Milko
Thanks, that is much easier