Working with Facades

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

You can use zendmd to list the available facades, see their help, see their available methods, and see the help for those methods. See the following zendmd session as an example.

>>> pprint(listFacades())
['device',
 'jobs',
 ...
 'zenpack',
 'zep']
>>> zep_facade = getFacade('zep')
>>> zep_facade.<tab><tab>
...
zep_facade.getDeviceStatusIssues(
zep_facade.getEventSeverities(
zep_facade.getEventSeveritiesByUuid(
zep_facade.getEventSummaries(
zep_facade.getEventSummariesFromArchive(
zep_facade.getEventSummariesGenerator(
zep_facade.getEventSummary(
zep_facade.acknowledgeEventSummaries(        zep_facade.getHeartbeats(
...
>>> help(zep_facade)
Help on ZepFacade in module Products.Zuul.facades.zepfacade object:

…
>>> help(zep_facade.create)
Help on method create in module Products.Zuul.facades.zepfacade:

create(self, summary, severity, device, component=None, mandatory=True, immediate=False, **kwargs) method of Products.Zuul.facades.zepfacade.ZepFacade instance