Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

Defining Custom Events in vCenter for a plugin

$
0
0

Hi,

I've already asked about this, but I guess my question got lost or was too complicated - so I'll try again.

We have a WebClient plugin, which is installed and registered on the vCenter, and we want to

define custom events for it.

 

During the registration, I define the following:

 

ExtensionEventTypeInfo.eventID="com.acme.myplugin.event.1234"

ExtensionEventTypeInfo.eventTypeSchema="<EventType><eventTypeID>com.acme.myplugin.event.1234</eventTypeID><description>my description</description><arguments><argument><name>var1</name><type>string</type></argument></arguments></EventType>

 

I can see this definition in the MOB, but I would like to define other properties as well, for example

the values which are set in EventDescriptionEventDetail, like

category = "info"

fullFormat = "This is a test event, and was sent with the value: {var1}"

description = "This is the description of the test event 1234";

 

So that when I send

a custom event like this:

KeyAnyValue kav1 = new KeyAnyValue();

kav1.setKey("com.acme.myplugin.event.1234.var1");

kav1.setValue("testValue");

EventEx vcEvent = new EventEx();

vcEvent.setEventTypeID("com.acme.myplugin.event.1234");

vcEvent.setChainId(0);

vcEvent.setKey(0);

vcEvent.setUserName(userName);

vcEvent.setCreatedTime(xmlValue);

vcEvent.getArguments().add(kav1);

 

_vimport.postEvent(eventManagerMOR, vcEvent, null);

 

I would hope (but it doesn't work) to see an Event in the Event Manager

having the Category of "info" , and the formatted String;

"This was a test event, and was sent with the value: testValue"

 

 

-- So to make it short, my question is, where  and how can I define the missing EventDescriptionEventDetail information?

I would like to be able to define it when registering the rest of the event information at installation time.

Is this possible?

 

please Help!

Cathy


Viewing all articles
Browse latest Browse all 1860

Latest Images

Trending Articles



Latest Images