Is there a policy on updating provisioning templates

So I would like to update the subscription_manager snippet in katello to deal with atomic (https://github.com/Katello/katello/blob/master/db/seeds.d/103-provisioning_templates.rb#L26). However since its a locker snippet I am not going to be able to do this without disabling the validation ->(https://github.com/theforeman/foreman/blob/develop/app/models/template.rb#L44) … Was wondering what should be done if we need to change locked templates.

Partha

> From: "Partha Aji" <paji@redhat.com>
> To: foreman-dev@googlegroups.com
> Sent: Tuesday, March 8, 2016 5:52:31 PM
> Subject: [foreman-dev] Is there a policy on updating provisioning templates
>
>
>
> So I would like to update the subscription_manager snippet in katello to deal
> with atomic
> (https://github.com/Katello/katello/blob/master/db/seeds.d/103-provisioning_templates.rb#L26).
> However since its a locker snippet I am not going to be able to do this
> without disabling the validation
> ->(https://github.com/theforeman/foreman/blob/develop/app/models/template.rb#L44)
> … Was wondering what should be done if we need to change locked templates.

This validation isn't checked in rake, so you can update it in a migration. Although
does this code always update it [1]? I would guess it doesn't unless we were to call save
on the existing template?

[1] https://github.com/Katello/katello/blob/master/db/seeds.d/103-provisioning_templates.rb#L23

··· ----- Original Message -----

Partha


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

>
>
>
>> From: "Partha Aji" <paji@redhat.com>
>> To: foreman-dev@googlegroups.com
>> Sent: Tuesday, March 8, 2016 5:52:31 PM
>> Subject: [foreman-dev] Is there a policy on updating provisioning templates
>>
>>
>>
>> So I would like to update the subscription_manager snippet in katello to deal
>> with atomic
>> (https://github.com/Katello/katello/blob/master/db/seeds.d/103-provisioning_templates.rb#L26).
>> However since its a locker snippet I am not going to be able to do this
>> without disabling the validation
>> ->(https://github.com/theforeman/foreman/blob/develop/app/models/template.rb#L44)
>> … Was wondering what should be done if we need to change locked templates.
>
> This validation isn't checked in rake, so you can update it in a migration. Although
> does this code always update it [1]? I would guess it doesn't unless we were to call save
> on the existing template?
>

It doesn't update… Its a first_or_create so returns the first or creates with provided data. I wonder if I should change the file to always update… So that Katello template if needed can be updated in the furure.

··· > On Mar 8, 2016, at 6:33 PM, Stephen Benjamin wrote: > ----- Original Message -----

[1] https://github.com/Katello/katello/blob/master/db/seeds.d/103-provisioning_templates.rb#L23

Partha


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


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