Using -1 as "Unlimited"

Greetings,

For host collections and activation keys we use a value of -1 for the content host limit to represent the idea of unlimited content hosts. I think this is confusing to the API users and greatly complicates the UI, causing edge cases (see Bug #6078: -1 should not be used to represent "unlimited" for activation keys and host collections - Katello - Foreman and Bug #5163: System group limit of -1 is accepted - Katello - Foreman).

I would like to propose that we stop using -1 to mean "Unlimited" and instead just use an "unlimited" boolean on the relevant object. If the boolean is true than the content host limit is ignored, otherwise it represents the content host limit. This is what I've had to do in the UI anyway to fix these issues.

Thoughts?

Thanks,
Walden

i am in favor of this proposal. +1

··· ----- Original Message ----- > Greetings, > > For host collections and activation keys we use a value of -1 for the content > host limit to represent the idea of unlimited content hosts. I think this > is confusing to the API users and greatly complicates the UI, causing edge > cases (see http://projects.theforeman.org/issues/6078 and > http://projects.theforeman.org/issues/5163). > > I would like to propose that we stop using -1 to mean "Unlimited" and instead > just use an "unlimited" boolean on the relevant object. If the boolean is > true than the content host limit is ignored, otherwise it represents the > content host limit. This is what I've had to do in the UI anyway to fix > these issues. > > Thoughts? > > Thanks, > Walden > > -- > 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. >

  • adam price

Good with me. Don't forget to also change the apipie and hammer commands.

··· ----- Original Message ----- > Greetings, > > For host collections and activation keys we use a value of -1 for the content > host limit to represent the idea of unlimited content hosts. I think this > is confusing to the API users and greatly complicates the UI, causing edge > cases (see http://projects.theforeman.org/issues/6078 and > http://projects.theforeman.org/issues/5163). > > I would like to propose that we stop using -1 to mean "Unlimited" and instead > just use an "unlimited" boolean on the relevant object. If the boolean is > true than the content host limit is ignored, otherwise it represents the > content host limit. This is what I've had to do in the UI anyway to fix > these issues. > > Thoughts? > > Thanks, > Walden > > -- > 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. >

some

··· On 06/17/2014 01:42 PM, Adam Price wrote: > ----- Original Message ----- >> Greetings, >> >> For host collections and activation keys we use a value of -1 for the content >> host limit to represent the idea of unlimited content hosts. I think this >> is confusing to the API users and greatly complicates the UI, causing edge >> cases (see http://projects.theforeman.org/issues/6078 and >> http://projects.theforeman.org/issues/5163). >> >> I would like to propose that we stop using -1 to mean "Unlimited" and instead >> just use an "unlimited" boolean on the relevant object. If the boolean is >> true than the content host limit is ignored, otherwise it represents the >> content host limit. This is what I've had to do in the UI anyway to fix >> these issues. >> >> Thoughts? >> >> Thanks, >> Walden >> >> -- >> 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. >> > > i am in favor of this proposal. +1 > > some of this data passes back into candlepin, which uses -1 to mean unlimited. So i am fine with the UI changes, but the backend engine may not be able to change.

– bk

Last call for comments, I am going to start working on this this week.

Thanks,
Walden

··· ----- Original Message ----- From: "Tom McKay" To: foreman-dev@googlegroups.com Sent: Tuesday, June 17, 2014 2:51:14 PM Subject: Re: [foreman-dev] Using -1 as "Unlimited"

----- Original Message -----

Greetings,

For host collections and activation keys we use a value of -1 for the content
host limit to represent the idea of unlimited content hosts. I think this
is confusing to the API users and greatly complicates the UI, causing edge
cases (see Bug #6078: -1 should not be used to represent "unlimited" for activation keys and host collections - Katello - Foreman and
Bug #5163: System group limit of -1 is accepted - Katello - Foreman).

I would like to propose that we stop using -1 to mean “Unlimited” and instead
just use an “unlimited” boolean on the relevant object. If the boolean is
true than the content host limit is ignored, otherwise it represents the
content host limit. This is what I’ve had to do in the UI anyway to fix
these issues.

Thoughts?

Thanks,
Walden


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.

Good with me. Don’t forget to also change the apipie and hammer commands.


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.

+1, proceed

··· On 06/23/2014 01:30 PM, Walden Raines wrote: > Last call for comments, I am going to start working on this this week. > > Thanks, > Walden >