[omniORB] CosNotifyChannelAdmin ClientType in Python

Joe Bronkema joseph.d.bronkema@lmco.com
Tue May 6 16:34:02 2003


I'm trying to use the Notification service from Python, and ran into a 
little snag.  It could be a misunderstanding on my part of how CORBA 
enums are supposed to work in Python, or maybe a bug.  I'm sure someone 
on the list can tell me which.

I have successfully created a channel and obtained the default supplier 
admin.  My next step is to get a proxy consumer, which I try to do as 
follows:

(proxyConsumer, proxyId) =  SupplierAdmin.obtain_notification_push_consumer(
    CosNotifyChannelAdmin.ClientType.STRUCTURED_EVENT)

This produces an error:
AttributeError: Enum instance has no attribute 'STRUCTURED_EVENT'.

dir(CosNotifyChannelAdmin.ClientType) confirms there's no such 
attribute.  There's an _items member which displays as (ANY_EVENT, 
STRUCTURED_EVENT, SEQUENCE_EVENT), though.

Should ClientType have STRUCTURED_EVENT as an attribute?
How should I make the call to get a proxy consumer?

While I'm at it, does anyone have some Python examples for using the 
notification service?