as a workaround I use the 'comment' attribute of the host object for my
purposes instead, which is included in the json. But it would be
interesting to know why the json output is missing data, even when using
the 'before_destroy' hook.

On Tue, May 23, 2017 at 3:48 PM, Adam Winberg <adam.winb...@gmail.com>
wrote:

> good point! I tried using the 'before_destroy' event but the 'parameters'
> array was still empty. I get other output though, such as
> 'all_puppetclasses' and 'all_parameters'.
>
> On Tue, May 23, 2017 at 3:38 PM, Dominic Cleal <domi...@cleal.org> wrote:
>
>> On 23/05/17 14:35, AdamW wrote:
>> > Running 1.15 with foreman_hooks, and the json output to my hooks is
>> > different between a 'create' and 'destroy' event. In the 'destroy' event
>> > I am missing host parameters from the json output, but I can't find the
>> > reason for this in the code.
>> >
>> > Anybody here know why this is?
>>
>> They have probably been deleted at the point "destroy" is called.
>> Internally in Foreman this uses the "after_destroy" event.
>>
>> You could try using the "before_destroy" event instead.
>>
>> --
>> Dominic Cleal
>> domi...@cleal.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Foreman users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to foreman-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to foreman-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/foreman-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to