[katello-devel] A couple of recent changes in the codebase

Tom McKay thomasmckay at redhat.com
Fri Feb 1 12:32:28 UTC 2013



----- Original Message -----
> From: "Marek Hulan" <mhulan at redhat.com>
> To: katello-devel at redhat.com
> Sent: Friday, February 1, 2013 7:16:46 AM
> Subject: Re: [katello-devel] A couple of recent changes in the codebase
> 
> > - A large number of validators have been moved into lib/validators.
> > It
> > could be argued that a few of those are not Katello-specific, but
> > the
> > bulk of them are. Any code that describes peculiarities of Katello
> > domain belongs to app/model. Unless you are writing something non
> > Katello-specific (ask yourself if the code could be packaged as a
> > gem),
> > it does not belong in lib/.
> 
> Hi,
> 
> this validators moving to one place was my commit. I see your point
> and I
> agree that some validators are Katello specific so lib/ is not 100%
> right place
> for them. However my main motivation was to get all validators to one
> place.
> Validators are not models so I think they should not be in
> app/models. Maybe
> we could move them to app/validators or if you'd like
> app/models/validators
> but second option would conflict with namespacing conventions... Also
> separating some validators to lib/ and some to app/ seems to me like
> a useless
> obstacle for the future. No one wants to think about whether this
> validator is
> Katello specific or not.
> 
> So to make long story short, it's not so important for me where
> validators
> will be placed but I'd really like to have them all in one directory.
> 
> Comments anyone?
> --
> Marek
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
> 

I appreciate a common place for validators, especially given our recent struggles with user name and org name validation differences between front and back end tools. It will be good to know that a system name validator could be consistent across the functional areas. Having them all in one place will also immediately point out where conflicts are.




More information about the katello-devel mailing list