Setting mandatory host parameters

Hi,

I'm searching a way to define some mandatory host parameters,
a foreman user can save the host only if these parameters have a
value.

It's like the control when you add a new Common Parameter
(can't be blank and can't be blank or contain trailing white space)

Any advices for doing that ?

I guess I've to modify the foreman code but what parts ?

I think what you may want is Feature #1028: Ability to edit custom fields in the host edit page - Foreman

This is to allow you to add fields that you want entered, not sure if it
would allow to make some of those fields required. Go ahead and update the
bug with that desire if you want.

Regards,
Jake

··· On Wednesday, March 21, 2012 8:45:45 AM UTC-5, Nicolas wrote: > > Hi, > > I'm searching a way to define some mandatory host parameters, > a foreman user can save the host only if these parameters have a > value. > > It's like the control when you add a new Common Parameter > (can't be blank and can't be blank or contain trailing white space) > > Any advices for doing that ? > > I guess I've to modify the foreman code but what parts ? > >

Thanks, I've updated the issue (Feature #1028: Ability to edit custom fields in the host edit page - Foreman)

··· On Mar 21, 6:35 pm, jmccann wrote: > I think what you may want is http://theforeman.org/issues/1028 > > This is to allow you to add fields that you want entered, not sure if it > would allow to make some of those fields required. Go ahead and update the > bug with that desire if you want. > > Regards, > Jake > > > > > > > > On Wednesday, March 21, 2012 8:45:45 AM UTC-5, Nicolas wrote: > > > Hi, > > > I'm searching a way to define some mandatory host parameters, > > a foreman user can save the host only if these parameters have a > > value. > > > It's like the control when you add a new Common Parameter > > (can't be blank and can't be blank or contain trailing white space) > > > Any advices for doing that ? > > > I guess I've to modify the foreman code but what parts ?

> Thanks, I've updated the issue (Feature #1028: Ability to edit custom fields in the host edit page - Foreman)

Thanks, that was the plan all along, a lot of these features are
already covered as part of the smart vars (see puppet classes => edit
=> smart var tab) and we just need to expose them in the host ui too.

Ohad

··· On Thu, Mar 22, 2012 at 11:39 AM, Nicolas wrote: > > On Mar 21, 6:35 pm, jmccann wrote: >> I think what you may want is http://theforeman.org/issues/1028 >> >> This is to allow you to add fields that you want entered, not sure if it >> would allow to make some of those fields required. Go ahead and update the >> bug with that desire if you want. >> >> Regards, >> Jake >> >> >> >> >> >> >> >> On Wednesday, March 21, 2012 8:45:45 AM UTC-5, Nicolas wrote: >> >> > Hi, >> >> > I'm searching a way to define some mandatory host parameters, >> > a foreman user can save the host only if these parameters have a >> > value. >> >> > It's like the control when you add a new Common Parameter >> > (can't be blank and can't be blank or contain trailing white space) >> >> > Any advices for doing that ? >> >> > I guess I've to modify the foreman code but what parts ? > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. >