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

Issue 7317045: Refactor charm/hooks,worker/uniter/hook (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by dimitern
Modified:
12 years, 4 months ago
Reviewers:
mp+148512
Visibility:
Public.

Description

Refactor charm/hooks,worker/uniter/hook As discussed, this splits worker/uniter/hook module into uniter-related stuff (Info and validation) and generic charm hooks stuff (defined hooks kinds). Adds UnitHooks and RelationHooks func, which return their respective Kinds as slices. Changed uniter code to match the code split. Added a Meta method Hooks() to return map[string]bool of all (possible) hooks according to the metadata. This is needed for a follow-up CL to fix bug #864164. https://code.launchpad.net/~dimitern/juju-core/refactor-charm-hooks/+merge/148512 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 15

Patch Set 2 : Refactor charm/hook, worker/uniter/hook #

Total comments: 10

Patch Set 3 : Refactor charm/hooks,worker/uniter/hook #

Patch Set 4 : Refactor charm/hooks,worker/uniter/hook #

Patch Set 5 : Refactor charm/hooks,worker/uniter/hook #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -202 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A charm/hooks/hooks.go View 1 2 3 1 chunk +67 lines, -0 lines 0 comments Download
M charm/meta.go View 1 2 2 chunks +29 lines, -0 lines 0 comments Download
M charm/meta_test.go View 1 chunk +30 lines, -0 lines 0 comments Download
M worker/uniter/hook/hook.go View 1 2 chunks +7 lines, -40 lines 0 comments Download
M worker/uniter/hook/hook_test.go View 1 2 chunks +14 lines, -13 lines 0 comments Download
M worker/uniter/modes.go View 1 7 chunks +9 lines, -8 lines 0 comments Download
M worker/uniter/relation/hookqueue.go View 1 13 chunks +19 lines, -18 lines 0 comments Download
M worker/uniter/relation/hookqueue_test.go View 1 9 chunks +40 lines, -39 lines 0 comments Download
M worker/uniter/relation/relation.go View 1 4 chunks +9 lines, -8 lines 0 comments Download
M worker/uniter/relation/relation_test.go View 1 2 chunks +47 lines, -46 lines 0 comments Download
M worker/uniter/relationer.go View 1 3 chunks +3 lines, -2 lines 0 comments Download
M worker/uniter/relationer_test.go View 1 9 chunks +14 lines, -13 lines 0 comments Download
M worker/uniter/state.go View 3 chunks +3 lines, -3 lines 0 comments Download
M worker/uniter/state_test.go View 1 6 chunks +8 lines, -7 lines 0 comments Download
M worker/uniter/uniter.go View 1 4 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
12 years, 4 months ago (2013-02-14 17:10:38 UTC) #1
fwereade
LGTM assuming the following. https://codereview.appspot.com/7317045/diff/1/charm/meta.go File charm/meta.go (right): https://codereview.appspot.com/7317045/diff/1/charm/meta.go#newcode49 charm/meta.go:49: func generateRelationHooks(relName string, allHooks map[string]bool) ...
12 years, 4 months ago (2013-02-14 17:54:16 UTC) #2
rog
LGTM assuming some resolution to the following minor issues. does this really justify a new ...
12 years, 4 months ago (2013-02-14 18:20:16 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/7317045/diff/1/charm/meta.go File charm/meta.go (right): https://codereview.appspot.com/7317045/diff/1/charm/meta.go#newcode49 charm/meta.go:49: func generateRelationHooks(relName string, allHooks map[string]bool) ...
12 years, 4 months ago (2013-02-15 10:09:27 UTC) #4
fwereade
LGTM, only trivials/remarks for consideration https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go File charm/hooks/hooks.go (right): https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go#newcode32 charm/hooks/hooks.go:32: var UnitHooks = []Kind{ ...
12 years, 4 months ago (2013-02-15 10:15:36 UTC) #5
rog
https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go File charm/hooks/hooks.go (right): https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go#newcode32 charm/hooks/hooks.go:32: var UnitHooks = []Kind{ On 2013/02/15 10:15:36, fwereade wrote: ...
12 years, 4 months ago (2013-02-15 11:17:31 UTC) #6
dimitern
Please take a look. https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go File charm/hooks/hooks.go (right): https://codereview.appspot.com/7317045/diff/7001/charm/hooks/hooks.go#newcode32 charm/hooks/hooks.go:32: var UnitHooks = []Kind{ On ...
12 years, 4 months ago (2013-02-15 11:38:37 UTC) #7
dimitern
Please take a look.
12 years, 4 months ago (2013-02-15 11:43:50 UTC) #8
rog
On 2013/02/15 11:43:50, dimitern wrote: > Please take a look. LGTM with some reluctance on ...
12 years, 4 months ago (2013-02-15 11:46:31 UTC) #9
dimitern
12 years, 4 months ago (2013-02-15 11:47:49 UTC) #10
*** Submitted:

Refactor charm/hooks,worker/uniter/hook

As discussed, this splits worker/uniter/hook
module into uniter-related stuff (Info and
validation) and generic charm hooks stuff
(defined hooks kinds). Adds UnitHooks
and RelationHooks func, which return
their respective Kinds as slices. Changed
uniter code to match the code split. Added
a Meta method Hooks() to return map[string]bool
of all (possible) hooks according to the metadata.
This is needed for a follow-up CL to fix
bug #864164.

R=fwereade, rog
CC=
https://codereview.appspot.com/7317045
Sign in to reply to this message.

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