Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1137)

Issue 5647055: Started Machine integration into the state package (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by TheMue
Modified:
12 years, 1 month ago
Reviewers:
mp+92111
Visibility:
Public.

Description

A first raw Machine type has been added to add the Machine related methods to unit. Additionally all Machine related methods in topology have been added. Beside this major topic Unit has been extended by few further methods. https://code.launchpad.net/~themue/juju/go-state-first-machine-integration/+merge/92111 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 70

Patch Set 2 : Started Machine integration into the state package #

Total comments: 8

Patch Set 3 : Started Machine integration into the state package #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1110 lines, -200 lines) Patch
M charm/url.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M state/internal_test.go View 1 2 11 chunks +150 lines, -16 lines 0 comments Download
A state/machine.go View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
M state/state.go View 1 2 2 chunks +33 lines, -0 lines 0 comments Download
M state/state_test.go View 1 2 5 chunks +301 lines, -3 lines 0 comments Download
M state/topology.go View 1 2 8 chunks +115 lines, -8 lines 0 comments Download
M state/unit.go View 1 2 3 chunks +161 lines, -0 lines 0 comments Download
M store/store.go View 1 2 10 chunks +123 lines, -72 lines 0 comments Download
M store/store_test.go View 1 2 12 chunks +170 lines, -99 lines 0 comments Download

Messages

Total messages: 6
TheMue
Please take a look.
12 years, 3 months ago (2012-02-08 19:17:32 UTC) #1
niemeyer
Very good overall. Thanks Frank. https://codereview.appspot.com/5647055/diff/1/state/machine.go File state/machine.go (right): https://codereview.appspot.com/5647055/diff/1/state/machine.go#newcode19 state/machine.go:19: // Key returns the ...
12 years, 3 months ago (2012-02-08 20:30:14 UTC) #2
TheMue
Please take a look.
12 years, 3 months ago (2012-02-09 15:56:55 UTC) #3
TheMue
PTAL https://codereview.appspot.com/5647055/diff/1/state/machine.go File state/machine.go (right): https://codereview.appspot.com/5647055/diff/1/state/machine.go#newcode19 state/machine.go:19: // Key returns the public key of the ...
12 years, 3 months ago (2012-02-09 15:57:19 UTC) #4
niemeyer
Thanks for the fixes.. just a few additional details and it's ready for merging. https://codereview.appspot.com/5647055/diff/7001/state/topology.go ...
12 years, 3 months ago (2012-02-09 16:23:44 UTC) #5
TheMue
12 years, 3 months ago (2012-02-09 18:40:17 UTC) #6
*** Submitted:

Started Machine integration into the state package

A first raw Machine type has been added to add the Machine
related methods to unit. Additionally all Machine related
methods in topology have been added. Beside this major topic
Unit has been extended by few further methods.

R=niemeyer
CC=
https://codereview.appspot.com/5647055

https://codereview.appspot.com/5647055/diff/7001/state/topology.go
File state/topology.go (right):

https://codereview.appspot.com/5647055/diff/7001/state/topology.go#newcode92
state/topology.go:92: // RemoveMachine removes a machine from the topology.
On 2012/02/09 16:23:44, niemeyer wrote:
> s/a machine/the machine with key/

Done.

https://codereview.appspot.com/5647055/diff/7001/state/topology.go#newcode281
state/topology.go:281: // key means there is no machine assigned.
On 2012/02/09 16:23:44, niemeyer wrote:
> Documentation is wrong now.

Done.

https://codereview.appspot.com/5647055/diff/7001/state/unit.go
File state/unit.go (right):

https://codereview.appspot.com/5647055/diff/7001/state/unit.go#newcode173
state/unit.go:173: machineKey = ""
On 2012/02/09 16:23:44, niemeyer wrote:
> Please invert the logic to make the intention more clear. At the top of the
for
> loop:
> 
> if machineId(machineKey) == 0 {
>     machineKey = ""
>     continue
> }

Doesn't work, machineKey has to be set empty at the end of each loop. Otherwise
the last set key will be taken.
> ... rest ...

https://codereview.appspot.com/5647055/diff/7001/state/util.go
File state/util.go (right):

https://codereview.appspot.com/5647055/diff/7001/state/util.go#newcode19
state/util.go:19: unitNotAssigned = errors.New("unit not assigned to machine")
On 2012/02/09 16:23:44, niemeyer wrote:
> Please move that right above the respective function in topology.go. It
doesn't
> help to have this error out of context here.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b