Code review comment for lp:~axwalk/juju-core/sanity-check-constraints

Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+185015_code.launchpad.net,

Message:
Please take a look.

Description:
all: implements Environ.SanityCheckConstraints

This introduces a new method on environs.Environ,
SanityCheckConstraints. This method will check
if constraints can possibly be met by the environment.
This will be used to check if an environment is
capable of creating an instance with the specified
constraints.

If the method returns nil, that does not necessarily
mean that the constraints are satisfied; if a non-nil
error is returned, then it means that the constraints
are definitely not satisfiable.

The ec2, azure and openstack Environ implementatons
will now disallow creating containers. When the work
to support addressability is done, this needs to be
changed. Currently, maas and local let everything
through.

cmd/juju is updated so that add-machine, and
deploy/add-unit --to call the new SanityCheckConstraints
method.

https://code.launchpad.net/~axwalk/juju-core/sanity-check-constraints/+merge/185015

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/13632046/

Affected files (+166, -25 lines):
   A [revision details]
   M cmd/juju/addmachine.go
   M cmd/juju/addmachine_test.go
   M cmd/juju/addunit_test.go
   M cmd/juju/deploy_test.go
   M environs/interface.go
   M juju/conn.go
   M provider/azure/environ.go
   M provider/azure/environ_test.go
   M provider/dummy/environs.go
   M provider/ec2/ec2.go
   M provider/ec2/local_test.go
   M provider/local/environ.go
   M provider/maas/environ.go
   M provider/openstack/local_test.go
   M provider/openstack/provider.go

« Back to merge proposal