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.
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
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: logging, db --constraints ^dmz,storage
juju deploy svc --networks=
networks=
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): deploy_ test.go help_topics. go constraints. go constraints_ test.go ts.go tsvalidation_ test.go
A [revision details]
M cmd/juju/deploy.go
M cmd/juju/
M cmd/juju/
M constraints/
M constraints/
M state/constrain
M state/constrain