|
Introduce instance.Placement
This change introduces a new Placement
structure in the instance package that
encapsulates machine-id, container, and
(new) environment-specific placement
directives.
The add-machine subcommand is modified
to pass this new Placement structure
through the AddMachine client API, which
calls a new state method AddMachineWithPlacement.
Machine-id and container placement do the
same thing as before, while new environment-
specific placement structures are stored in
state. A new state policy is added to allow
an Environ to validate placement.
The provisioner API and worker are updated
to pass Placement through to StartInstance.
Follow-ups to come:
- update MAAS provider to pick maas-name out
the Placement.
- update ec2, OpenStack (and MAAS?) to pick
out availbility-zone from Placement.
- update add-unit and deploy subcommands to
use Placement; this will involve modifications
to state unit assignment to choose existing
matching machines (e.g. for maas-name).
https://code.launchpad.net/~axwalk/juju-core/addmachine-placement/+merge/214761
(do not edit description out of merge proposal)
Total comments: 50
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+685 lines, -219 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/addmachine.go
|
View
|
1
2
3
4
5
|
4 chunks |
+50 lines, -36 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/addmachine_test.go
|
View
|
1
2
3
4
5
|
1 chunk |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
environs/broker.go
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
environs/jujutest/livetests.go
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
A |
instance/placement.go
|
View
|
1
2
3
4
5
|
1 chunk |
+85 lines, -0 lines |
0 comments
|
Download
|
 |
A |
instance/placement_test.go
|
View
|
1
2
3
4
5
|
1 chunk |
+76 lines, -0 lines |
0 comments
|
Download
|
 |
M |
names/machine.go
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
names/machine_test.go
|
View
|
1
2
|
4 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
provider/azure/environ.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/azure/instancetype_test.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
provider/common/policies.go
|
View
|
1
2
3
|
2 chunks |
+0 lines, -15 lines |
0 comments
|
Download
|
 |
M |
provider/dummy/environs.go
|
View
|
1
2
3
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/ec2/ec2.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/ec2/local_test.go
|
View
|
1
2
3
|
1 chunk |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
provider/joyent/environ.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/local/environ.go
|
View
|
1
2
3
|
2 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/maas/environ.go
|
View
|
1
2
3
|
2 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/manual/environ.go
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
provider/openstack/local_test.go
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
provider/openstack/provider.go
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/addmachine.go
|
View
|
1
2
3
|
4 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/api/client.go
|
View
|
1
2
3
|
1 chunk |
+14 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/api/params/internal.go
|
View
|
1
2
3
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/api/params/params.go
|
View
|
1
2
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/api/provisioner/machine.go
|
View
|
1
2
|
3 chunks |
+8 lines, -32 lines |
0 comments
|
Download
|
 |
M |
state/api/provisioner/provisioner_test.go
|
View
|
1
2
3
|
1 chunk |
+29 lines, -43 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/client/client.go
|
View
|
1
2
3
|
3 chunks |
+42 lines, -9 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/client/client_test.go
|
View
|
1
2
3
|
3 chunks |
+62 lines, -16 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/provisioner/provisioner.go
|
View
|
1
2
3
|
1 chunk |
+43 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/provisioner/provisioner_test.go
|
View
|
1
2
3
|
1 chunk |
+81 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/machine.go
|
View
|
1
2
3
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/policy.go
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
state/prechecker_test.go
|
View
|
1
2
3
|
7 chunks |
+22 lines, -13 lines |
0 comments
|
Download
|
 |
M |
worker/provisioner/provisioner_task.go
|
View
|
1
2
3
4
5
6
|
5 chunks |
+42 lines, -20 lines |
0 comments
|
Download
|
Total messages: 14
|