Description:
state: add nonced provisioning support
Next step in nonced provisioning; adding support
in state: machine.SetInstanceId() renamed to
SetProvisioned(), taking instance id and nonce.
It allows you change it only once, so some tests
that assumed too much had to be changed (e.g.
changing instance id several times just to
trigger a machine change). Also CheckProvisioned()
is added to machine, taking a nonce and returning
bool, error; true is returned only when the
instance id is set and the nonce matches.
In the upcoming CL we'll bring everything
together - PA generating an unique nonce,
and checking it.
Affected files:
A [revision details]
M cmd/juju/ssh_test.go
M cmd/juju/status_test.go
M state/apiserver/api_test.go
M state/machine.go
M state/machine_test.go
M state/megawatcher_internal_test.go
M state/state.go
M state/state_test.go
M state/unit_test.go
M worker/deployer/deployer_test.go
M worker/firewaller/firewaller_test.go
M worker/provisioner/provisioner.go
M worker/uniter/filter_test.go
M worker/uniter/uniter_test.go
Reviewers: mp+157853_ code.launchpad. net,
Message:
Please take a look.
Description:
state: add nonced provisioning support
Next step in nonced provisioning; adding support SetInstanceId( ) renamed to
in state: machine.
SetProvisioned(), taking instance id and nonce.
It allows you change it only once, so some tests
that assumed too much had to be changed (e.g.
changing instance id several times just to
trigger a machine change). Also CheckProvisioned()
is added to machine, taking a nonce and returning
bool, error; true is returned only when the
instance id is set and the nonce matches.
In the upcoming CL we'll bring everything
together - PA generating an unique nonce,
and checking it.
https:/ /code.launchpad .net/~dimitern/ juju-core/ 027-state- supports- nonced- provisioning/ +merge/ 157853
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8561044/
Affected files: ssh_test. go status_ test.go /api_test. go test.go er_internal_ test.go deployer/ deployer_ test.go firewaller/ firewaller_ test.go provisioner/ provisioner. go uniter/ filter_ test.go uniter/ uniter_ test.go
A [revision details]
M cmd/juju/
M cmd/juju/
M state/apiserver
M state/machine.go
M state/machine_
M state/megawatch
M state/state.go
M state/state_test.go
M state/unit_test.go
M worker/
M worker/
M worker/
M worker/
M worker/