You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Mike Tutkowski <mi...@solidfire.com> on 2015/05/29 07:24:20 UTC

Custom validation of a custom config value

Hi,

If you have a plug-in that adds a custom config value and an admin updates
that config value, is there a way to have custom validation logic invoked?

For example, let's say you want to add a custom config value that's
associated with each and every account (ex. total.miniops). If the admin
changes this value on an account, I'd like to be able to validate that the
change is OK (ex. that you didn't reduce total.miniops to an amount that
puts it under what has already been allocated by users of the account).

Thanks,
Mike

-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Custom validation of a custom config value

Posted by Mike Tutkowski <mi...@solidfire.com>.
Thanks

On Friday, May 29, 2015, Rajani Karuturi <ra...@apache.org> wrote:

> we do not have validation framework for the configs. We only do simple
> validation of datatype check ie) if its boolean, parseBoolean etc.
>
> ~Rajani
>
> On Fri, May 29, 2015 at 10:54 AM, Mike Tutkowski <
> mike.tutkowski@solidfire.com <javascript:;>> wrote:
>
> > Hi,
> >
> > If you have a plug-in that adds a custom config value and an admin
> updates
> > that config value, is there a way to have custom validation logic
> invoked?
> >
> > For example, let's say you want to add a custom config value that's
> > associated with each and every account (ex. total.miniops). If the admin
> > changes this value on an account, I'd like to be able to validate that
> the
> > change is OK (ex. that you didn't reduce total.miniops to an amount that
> > puts it under what has already been allocated by users of the account).
> >
> > Thanks,
> > Mike
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com <javascript:;>
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Custom validation of a custom config value

Posted by Rajani Karuturi <ra...@apache.org>.
we do not have validation framework for the configs. We only do simple
validation of datatype check ie) if its boolean, parseBoolean etc.

~Rajani

On Fri, May 29, 2015 at 10:54 AM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> Hi,
>
> If you have a plug-in that adds a custom config value and an admin updates
> that config value, is there a way to have custom validation logic invoked?
>
> For example, let's say you want to add a custom config value that's
> associated with each and every account (ex. total.miniops). If the admin
> changes this value on an account, I'd like to be able to validate that the
> change is OK (ex. that you didn't reduce total.miniops to an amount that
> puts it under what has already been allocated by users of the account).
>
> Thanks,
> Mike
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>