On Mon, Jun 29, 2009 at 01:37:41PM +0100, Guido Trotter wrote:
> On Mon, Jun 29, 2009 at 1:29 PM, Iustin Pop<[email protected]> wrote:
> > On Mon, Jun 29, 2009 at 01:12:09PM +0100, Guido Trotter wrote:
> >>
> >> If an ident member of an IdentKeyVal relationship starts with no_ or -,
> >> handle it the same way we do for a key.
> >
> > Uh, I'm confused. A member cannot be false or true, it means a sub-dict 
> > (until
> > now).
> > I don't understand how this will be used:
> >
> 
> This will be used to remove members altogether. Something like
> gnt-cluster -O -debootstrap (or no_debootstrap) removes all options
> for OS debootstrap.
> Since we don't allow members to be removed for hypervisor parameters
> (or disks/nets) the patch also errors out when used with those
> identkeyvals.

Ah OK.

> >> +    self.assertEqual(cikv("no_bar:foo"), ("bar", False))
> >
> > So the 'foo' is just dropped?
> >
> >> +    self.assertEqual(cikv("no_bar:foo=baz"), ("bar", False))
> >
> > And here, foo=baz is just dropped?
> >
> >> +    self.assertEqual(cikv("-foo"), ("foo", None))
> >> +    self.assertEqual(cikv("-foo:a=c"), ("foo", None))
> >
> > Same question here.
> >
> 
> Yes. Actually, now that I think about this, I can change this to
> return an error, rather than dropping them..
> Would that be better?

Yes. Please resend, I'll have some small comments about the error messages.

iustin

Reply via email to