Discussion:
Query Zope for list of Device and Event Classes
kenhen93
2011-11-15 17:05:32 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Query Zope for list of Device and Event Classes"

To view the discussion, visit: http://community.zenoss.org/message/62639#62639

--------------------------------------------------------------
Hi,

I have been researching Zenoss zope and Zope in general and can't seem to find a good answer.

I need to be able to constantly query (daily) device classes and event classes and export in some form like a flat file.

I would imagine this can be done in zendmd but I am not that savvy with dmd right now.

I also read on a zope web site how you can query via a URL. This would actually be a great but it seems like this will not work with Zenoss zope.

Can anyone help?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62639#62639]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kenhen93
2011-11-16 13:49:25 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Re: Query Zope for list of Device and Event Classes"

To view the discussion, visit: http://community.zenoss.org/message/62628#62628

--------------------------------------------------------------
I was able to create a small python script at

http://zenoss-vip.domain:8080/zport/dmd/Devices/manage http://zenoss-vip.domain:8080/zport/dmd/Devices/manage

return [ d.id for d in context.getSubOrganizers() ]

This shows all of the device classes but not in any kind of heirachy.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62628#62628]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kenhen93
2011-11-16 19:23:30 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Re: Query Zope for list of Device and Event Classes"

To view the discussion, visit: http://community.zenoss.org/message/62649#62649

--------------------------------------------------------------
I think I figured it out

return [ d for d in context.getOrganizerNames() ]

This page was very helpful

http://docs.huihoo.com/zenoss/api/2.1/public/ZenModel.Organizer.Organizer-class.html#getOrganizerNames http://docs.huihoo.com/zenoss/api/2.1/public/ZenModel.Organizer.Organizer-class.html#getOrganizerNames

as it names many of the zendmd methods with arguments
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62649#62649]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...