|
Add ec2 preflighting; made orchestra constraint checking more effective
Providers can now register validation functions on their ConstraintSets, to
allow for more sophisticated checking than can be handled with the tools
otherwise available. Constraints are preflighted at unit-add and machine-add
time; these are the only constraints that directly translate to actual
machine specifications, and therefore the only ones that need to be
preflighted. (Environment and service constraints can vary independently and
changes to either can affect the service's viability; until someone tries to
deploy a unit that definitely cannot be deployed, IMO, it's premature to
preflight and complain.)
The EC2 provider actually makes use of the preflight mechanism; the
orchestra changes (disallowing direct use of acquired-mgmt-class/available-
mgmt-class) -- which were the original driver for this story -- have no
reason to be preflight-time changes and are implemented as normal
constraints.
https://code.launchpad.net/~fwereade/juju/preflight-constraints-redux/+merge/100869
(do not edit description out of merge proposal)
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+308 lines, -48 lines) |
Patch |
|
A |
[revision details]
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
juju/errors.py
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
juju/machine/constraints.py
|
View
|
|
4 chunks |
+33 lines, -2 lines |
0 comments
|
Download
|
|
M |
juju/machine/tests/test_constraints.py
|
View
|
|
2 chunks |
+37 lines, -16 lines |
0 comments
|
Download
|
|
M |
juju/providers/common/base.py
|
View
|
|
2 chunks |
+14 lines, -1 line |
0 comments
|
Download
|
|
M |
juju/providers/dummy.py
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
juju/providers/ec2/__init__.py
|
View
|
|
3 chunks |
+20 lines, -2 lines |
0 comments
|
Download
|
|
M |
juju/providers/ec2/tests/test_provider.py
|
View
|
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
|
M |
juju/providers/ec2/tests/test_utils.py
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
juju/providers/ec2/utils.py
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
juju/providers/orchestra/__init__.py
|
View
|
|
3 chunks |
+23 lines, -4 lines |
0 comments
|
Download
|
|
M |
juju/providers/orchestra/tests/test_provider.py
|
View
|
|
3 chunks |
+29 lines, -2 lines |
0 comments
|
Download
|
|
M |
juju/state/environment.py
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
juju/state/machine.py
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
juju/state/service.py
|
View
|
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
juju/state/tests/test_environment.py
|
View
|
|
1 chunk |
+53 lines, -4 lines |
0 comments
|
Download
|
|
M |
juju/state/tests/test_machine.py
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
juju/state/tests/test_service.py
|
View
|
|
3 chunks |
+47 lines, -1 line |
0 comments
|
Download
|
|
M |
juju/tests/test_errors.py
|
View
|
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
Total messages: 1
|