Working with Facades

From Zenoss Wiki
Revision as of 22:44, 7 December 2012 by Daniel Robbins (Talk | contribs)$7

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
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