incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lalancette <clala...@redhat.com>
Subject Re: [PATCH] Rationalize names.
Date Fri, 03 Jun 2011 14:13:10 GMT
On 06/03/11 - 03:58:24PM, Michal Fojtik wrote:
> On Jun 3, 2011, at 3:37 PM, Chris Lalancette wrote:
> 
> > The different deltacloud drivers were all handling names a
> > bit differently.  This series rationalizes the drivers so
> > that:
> > 
> > 1)  If a name is provided by the user (opts[:name]), we
> > use that to start with
> > 2)  If a name is not provided, then we generate one
> > 3)  We then check that the name conforms to the rules for
> > the cloud backend.  If the name does not conform, we throw
> > an error
> 
> Actually I think it would be better to handle constrains in more
> abstract way.
> 
> I'm thinking about using 'param' method in Rabbit DSL to provide
> additional support for parameter validation like length / format.
> Then it should be easy to advertise that by whatever method we will
> choose.
> Also different drivers should override these values to fit backend
> requirements.
> Once this will be done the checking you made for name length will be
> duplicated.

We certainly could do it that way, though it seems like overkill to me.  The
restrictions on the name are very backend specific, so it makes sense to me
that the checking on them go in the individual drivers.

-- 
Chris Lalancette

Mime
View raw message