Foreman hook for discovered_host events?

> Is something like that maybe part of Host Aspects that Lukas mentioned
> above?

We could extend hooks and provide some simple API to fire off our own
events. Then we can implement custom ones.

··· -- Later, Lukas #lzap Zapletal

You can add custom ones today, which would be great if you put them into
Host::Discovered for "interesting" events - perhaps conversion to
Host::Managed, or registration type events triggered by the discovered host?

They're just Rails callbacks, so as simple as:

··· On 13/11/15 13:09, Lukas Zapletal wrote: >> Is something like that maybe part of Host Aspects that Lukas mentioned >> above? > > We could extend hooks and provide some simple API to fire off our own > events. Then we can implement custom ones.


Dominic Cleal
dominic@cleal.org

> You can add custom ones today, which would be great if you put them into
> Host::Discovered for "interesting" events - perhaps conversion to
> Host::Managed, or registration type events triggered by the discovered
> host?
>
> They're just Rails callbacks, so as simple as:
>
> https://github.com/theforeman/foreman/blob/1.10.0-RC2/app/models/host/managed.rb#L35-L37
>
>
Do you, guys, need a feature request for this?

That's a good idea, file it in Discovery and then it might get picked up.

··· On 23/11/15 19:28, 'Konstantin Orekhov' via Foreman users wrote: > > You can add custom ones today, which would be great if you put them > into > Host::Discovered for "interesting" events - perhaps conversion to > Host::Managed, or registration type events triggered by the > discovered host? > > They're just Rails callbacks, so as simple as: > https://github.com/theforeman/foreman/blob/1.10.0-RC2/app/models/host/managed.rb#L35-L37 > > > > > Do you, guys, need a feature request for this?


Dominic Cleal
dominic@cleal.org

> > Do you, guys, need a feature request for this?
>
> That's a good idea, file it in Discovery and then it might get picked up.

http://projects.theforeman.org/issues/12614

Patches welcome!

··· -- Later, Lukas #lzap Zapletal