On Wed, Sep 11, 2013 at 7:01 AM, Tim Penhey <tim.pen...@canonical.com>wrote:

> > I don't see a big gain in having the bool before the list. You can
> > treat an empty list as false, and only allow "LXC" for phase one,
> > and then you don't have to implement 2 APIs.
>
> The problem here is that there are two fundamentally different things:
>
> 1) Is the provider capable of providing addressing for containers at all.
>

I think this is another one for Environ.SanityCheckConstraints, which came
up in discussion about failing early in the null provider. This method will
return nil if the constraints are impossible to satisfy in the environment,
and nil if it's possible (but not necessarily certain) to satisfy them.

deploy/add-unit can parse the ContainerType out of --to and inject it into
a constraints.Value; add-machine already pulls ContainerType out of its
optional arg. They just need to pass the constraints.Value to
SanityCheckConstraints, and Bob's your uncle.

I'm going to have a go at this, if nobody objects or can point out a
problem.

Cheers,
Andrew
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to