On Thu, Aug 4, 2011 at 10:03 AM, Iustin Pop <[email protected]> wrote:

> On Thu, Aug 04, 2011 at 02:59:18PM +0100, Andrea Spadaccini wrote:
> > Hi,
> >
> > +  if not re.match("[-a-zA-Z0-9.]+$", args[1]):
> > >
> >
> > Here you could use ganeti.netutils.Hostname._VALID_NAME_RE, that also
> checks
> > for the length of the hostname.
>
> Except that this isn't in the ganeti codebase… :)
>

I could copy and paste :-P But Andrea, thanks, I didn't know that existed. I
don't want to require ganeti to be installed on the transfer OS, which is
usually going to be a stock LiveCD, and is the one that runs this script.
However, I agree that the regex could be checking a lot more than this one
does.

Reply via email to