Package Products :: Package ZenModel :: Module ZenPackLoader :: Class ZPTriggerAction
[hide private]
[frames] | no frames]

Class ZPTriggerAction

source code

ZenPackLoader --+
                |
               ZPTriggerAction

Instance Methods [hide private]
 
load(self, pack, app)
Load Notifications and Triggers from an actions.json file
source code
 
_getTriggerGuid(self, facade, name) source code
 
unload(self, pack, app, leaveObjects=False)
Remove things from Zenoss defined in the ZenPack
source code
 
list(self, pack, app)
List the items that would be loaded from the given (unpacked) ZenPack
source code
 
upgrade(self, pack, app)
Run an upgrade on an existing pack
source code
Class Variables [hide private]
  name = "Triggers and Actions"
Method Details [hide private]

load(self, pack, app)

source code 

Load Notifications and Triggers from an actions.json file

Given a JSON-formatted configuration located at {zenpack}/actions/actions.json, create or update triggers and notifications specific to this zenpack. When creating or updating, the object is first checked to see whether or not an object exists with the configured guid for notifications or uuid for triggers. If an object is not found, one will be created. During creation, care is taken with regard to the id - integer suffixes will be appended to try to create a unique id. If we do not find a unique id after 100 tries, an error will occur. When updating an object, care is taken to not change the name as it may have since been altered by the user (or by this loader adding a suffix).

Overrides: ZenPackLoader.load

unload(self, pack, app, leaveObjects=False)

source code 

Remove things from Zenoss defined in the ZenPack

Overrides: ZenPackLoader.unload

list(self, pack, app)

source code 

List the items that would be loaded from the given (unpacked) ZenPack

Overrides: ZenPackLoader.list

upgrade(self, pack, app)

source code 

Run an upgrade on an existing pack

Overrides: ZenPackLoader.upgrade