Open gsnider2195 opened 2 years ago
P.D. - Plugin Developer
To be able to constrain job hooks to more than just the content type and change action.
My plugin can create multiple job hooks that run jobs based on the value of a model field instead of having to create multiple models.
I can assign filter criteria to job hooks and those job hooks will only trigger when the content type, change action and filter criteria match.
Example model:
class SyslogMessage(OrganizationalModel): event_source = models.CharField(max_length=100) event_type = models.CharField(max_length=100) event_id = models.PositiveIntegerField()
Configuration was changed, run configuration compliance check if event_id==111010 run job ComplianceJob
event_id==111010
ComplianceJob
High cpu utilization, alert NOC if event_id==211003 run job EmailNOC
event_id==211003
EmailNOC
Filter field would need to be added to the JobHook model. Could probably be modeled off of DynamicGroup.filter
JobHook
DynamicGroup.filter
None
Relates to #6143
As ...
P.D. - Plugin Developer
I want ...
To be able to constrain job hooks to more than just the content type and change action.
So that ...
My plugin can create multiple job hooks that run jobs based on the value of a model field instead of having to create multiple models.
I know this is done when...
I can assign filter criteria to job hooks and those job hooks will only trigger when the content type, change action and filter criteria match.
Example model:
Configuration was changed, run configuration compliance check if
event_id==111010
run jobComplianceJob
High cpu utilization, alert NOC if
event_id==211003
run jobEmailNOC
Optional - Feature groups this request pertains to.
Database Changes
Filter field would need to be added to the
JobHook
model. Could probably be modeled off ofDynamicGroup.filter
External Dependencies
None