Project

General

Profile

Bug #2796

Foreman hooks not called if event is triggered using API

Added by Rytis Sileika about 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

I have created a plugin that binds to 'create' and 'destroy' events:

      after_filter :external_scripts_host_destroy, :only => [:destroy]
      after_filter :external_scripts_host_create, :only => [:create]

This works fine if I create/destroy hosts using web UI. However when I create a host using API call the plugin is not triggered.

History

#1 Updated by Lukas Zapletal about 6 years ago

  • Category set to API
  • Target version set to 1.3.0

#2 Updated by Ohad Levy about 6 years ago

  • Status changed from New to Rejected
  • Target version deleted (1.3.0)

this is not a bug, if you use controller hooks, you need to add the hooks to the api contollers as well, or add the hook to the model instead.

Also available in: Atom PDF