incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Main <>
Subject Re: 'Name' usage in deltacloud drivers
Date Wed, 15 Dec 2010 20:14:40 GMT
On Wed, 2010-12-15 at 13:18 -0500, Mohammed Morsi wrote:
> On 12/14/2010 02:01 PM, Ian Main wrote:
> > On Tue, 2010-12-14 at 10:32 -0800, David Lutterkort wrote:
> >> On Mon, 2010-12-06 at 20:10 -0800, Ian Main wrote:
> >>> Either way we are going to require changes to the API.  Probably the
> >>> easiest is to just support a notion of the maximum instance name
> >>> length for a given provider.
> >> How would the following work for you:
> >>
> >>    <link rel="instances" href="...">
> >>      <feature name="user-name">
> >>        <constraint name="length" value="20"/>
> >>        <constraint name="pattern" value="[crazy regexp in some yet-to-be-specified
> >>      </feature>
> >>    </link>
> >>
> >> In other words, we tell the client (a) that the cloud supports
> >> user-supplied names for instances (b) what the maximum length is and (c)
> >> the regexp pattern that the name must match (or would it more be more
> >> helpful to indicate that through words like 'hostname' or 'alphanum' ?)
> > Yeah I'd be inclined to think 'hostname' or 'alphanum' would be better.
> > The client here is written in C++ so to apply the regexp I'd have to
> > drag in another library into condor and do the match to ensure
> > conformity.  Even then I'm not sure how you'd use that information
> > (match/no match) to modify the name to conform.  It would probably be
> > better just to say "if alphanum then sanitize_alphanum()".
> Would it be smart to automaticallly sanetize the names without 
> consulting the user first? What if they go to start several instances 
> all with the same name except for one character which is invalid and 
> automatically removed?

I am going to prepend a UUID to the name and chop it to the max length.
Some clouds then will only have part of a UUID for a name but it will
still very likely be unique.

The only downside is it will be harder for the user to map between the
instances in the WUI and the instances in the native interface, but it
is a reasonable trade off imo.


>    -Mo

View raw message