|
Support instance type constraints
A new constraint, "instance-type" is supported
for EC2 and Openstack providers. For all other
providers, a warning is logged and the constraint
is ignored.
To support this, a new state policy is introduced:
ConstraintsValidator. This is invoked at the time a
new machine is added, or a unit is added to a service.
It checks that any instance type exists and for ec2
that the architecture is valid. If it errors, nothing
is written to state.
EC2 and Opentack have different ways of combining
env and deployment constraints. eg for EC2, root disk
is specified separately to instance type but for
Openstack is part of the instance type.
https://code.launchpad.net/~wallyworld/juju-core/instance-type-constraint/+merge/214165
(do not edit description out of merge proposal)
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+785 lines, -69 lines) |
Patch |
|
A |
[revision details]
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
constraints/constraints.go
|
View
|
1
|
8 chunks |
+64 lines, -1 line |
3 comments
|
Download
|
|
M |
constraints/constraints_test.go
|
View
|
1
|
5 chunks |
+119 lines, -9 lines |
0 comments
|
Download
|
|
M |
environs/instances/image.go
|
View
|
|
2 chunks |
+25 lines, -8 lines |
0 comments
|
Download
|
|
M |
environs/interface.go
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
environs/jujutest/livetests.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
environs/statepolicy.go
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/azure/environ.go
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/azure/environ_test.go
|
View
|
1
|
2 chunks |
+23 lines, -0 lines |
1 comment
|
Download
|
|
A |
provider/common/constraints.go
|
View
|
1
|
1 chunk |
+25 lines, -0 lines |
1 comment
|
Download
|
|
A |
provider/common/constraints_test.go
|
View
|
1
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/common/policies.go
|
View
|
1
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
provider/dummy/environs.go
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/ec2/ec2.go
|
View
|
1
|
1 chunk |
+39 lines, -0 lines |
1 comment
|
Download
|
|
M |
provider/ec2/image.go
|
View
|
1
|
3 chunks |
+27 lines, -1 line |
0 comments
|
Download
|
|
M |
provider/ec2/image_test.go
|
View
|
1
|
6 chunks |
+34 lines, -2 lines |
2 comments
|
Download
|
|
M |
provider/ec2/local_test.go
|
View
|
1
|
3 chunks |
+45 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/joyent/environ_instance.go
|
View
|
1
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/joyent/local_test.go
|
View
|
1
|
3 chunks |
+24 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/local/environ.go
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/local/environ_test.go
|
View
|
1
|
3 chunks |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/maas/environ.go
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/maas/environ_test.go
|
View
|
1
|
2 chunks |
+30 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/manual/environ.go
|
View
|
1
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
provider/openstack/export_test.go
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/openstack/image.go
|
View
|
1
|
2 chunks |
+21 lines, -0 lines |
1 comment
|
Download
|
|
M |
provider/openstack/local_test.go
|
View
|
1
|
3 chunks |
+70 lines, -0 lines |
0 comments
|
Download
|
|
M |
provider/openstack/provider.go
|
View
|
1
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
|
M |
state/addmachine.go
|
View
|
1
|
5 chunks |
+19 lines, -19 lines |
1 comment
|
Download
|
|
M |
state/conn_test.go
|
View
|
1
|
2 chunks |
+11 lines, -3 lines |
0 comments
|
Download
|
|
M |
state/policy.go
|
View
|
1
|
3 chunks |
+48 lines, -10 lines |
1 comment
|
Download
|
|
M |
state/prechecker_test.go
|
View
|
1
|
2 chunks |
+4 lines, -10 lines |
0 comments
|
Download
|
|
M |
state/service.go
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
1 comment
|
Download
|
|
M |
state/state_test.go
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 4
|