On 27/08/13 11:50, Andrew Wilkins wrote:
> On Tue, Aug 27, 2013 at 8:44 AM, Tim Penhey <tim.pen...@canonical.com
> <mailto:tim.pen...@canonical.com>> wrote:
> 
>     Perhaps we should have a sanity-check type callback into the provider
>     with the constraints at the time we want to add a machine.  This would
>     give the null provider the early fail mechanism, and could also allow
>     other providers to error if people as asking for constraints that really
>     don't make sense.
> 
> 
> I'm sort of thinking out aloud here: maybe this could used for checking
> environment-specific constraints too? Some kind of
> "VerifyMachineConstraints" method that will ensure your add-machine/--to
> constraints are valid for the current provider/environment. In this case
> constraints may be nil, but the null provider would just always return
> false.

This is exactly what I'm thinking as well, but I had forgotten about the
provider specific constraints.

It does raise the question of what should happen if a provider specific
constraint is passed to a provider that can't handle it.  My suggestion
is we fail.

Tim

-- 
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