Code review comment for lp:~dimitern/juju-core/460-network-constraints

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Reviewers: mp+221390_code.launchpad.net,

Message:
Please take a look.

Description:
various: Introduce networks constraints

Following the removal of --exclude-networks argument
from juju deploy, now we're introducting a complete
way to specify networks with constraints:

--constraints networks=net1,net2,^net3,^net4

Means "find a machine with net1 and net2 networks,
but not with net3 or net4 networks".

Changes are in 3 places: constraints package, state
(for saving/loading) and cmd/juju/deploy for the CLI.

Now, to specify networks to include/exclude on deploy:
juju deploy svc --networks=logging,db --constraints
networks=^dmz,storage

Means: "deploy svc on machines with logging, db, and storage
networks, but not with dmz network".

Only the those, specified with --networks will be enabled
on the machine, once the networker worker is done. The ones
specified with constraints are used as a filter for instance
selection.

https://code.launchpad.net/~dimitern/juju-core/460-network-constraints/+merge/221390

(do not edit description out of merge proposal)

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

Affected files (+271, -131 lines):
   A [revision details]
   M cmd/juju/deploy.go
   M cmd/juju/deploy_test.go
   M cmd/juju/help_topics.go
   M constraints/constraints.go
   M constraints/constraints_test.go
   M state/constraints.go
   M state/constraintsvalidation_test.go

« Back to merge proposal