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

Issue 5916045: Adds support for -r option to specify relation id for relation hook commands.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by jimbaker
Modified:
12 years ago
Reviewers:
mp+99456, hazmat
Visibility:
Public.

Description

Adds support for -r option to specify relation id for relation hook commands. This branch builds on the previous branches for working with relation ids: -r specifies the relation id to lookup a relation hook context for relation-set, relation-get, and relation-list. In addition, there are some bug fixes for relation-ids around making relation name optional. https://code.launchpad.net/~jimbaker/juju/relation-id-option/+merge/99456 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Adds support for -r option to specify relation id for relation hook commands. #

Total comments: 6

Patch Set 3 : Adds support for -r option to specify relation id for relation hook commands. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -48 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M juju/agents/unit.py View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M juju/hooks/cli.py View 1 chunk +2 lines, -1 line 0 comments Download
M juju/hooks/commands.py View 1 2 4 chunks +14 lines, -1 line 0 comments Download
M juju/hooks/executor.py View 1 2 1 chunk +7 lines, -0 lines 2 comments Download
M juju/hooks/invoker.py View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M juju/hooks/protocol.py View 1 2 12 chunks +57 lines, -27 lines 2 comments Download
M juju/hooks/tests/test_cli.py View 1 chunk +3 lines, -5 lines 0 comments Download
M juju/hooks/tests/test_communications.py View 1 2 7 chunks +20 lines, -10 lines 0 comments Download
M juju/hooks/tests/test_invoker.py View 1 2 6 chunks +82 lines, -2 lines 0 comments Download
M juju/state/hook.py View 1 2 1 chunk +11 lines, -0 lines 2 comments Download

Messages

Total messages: 8
jimbaker
Please take a look.
12 years, 1 month ago (2012-03-27 01:14:04 UTC) #1
jimbaker
Please take a look.
12 years, 1 month ago (2012-03-30 06:15:27 UTC) #2
hazmat
the implementation here is feels a bit convoluted. you have two apis on two different ...
12 years ago (2012-04-02 16:28:46 UTC) #3
jimbaker
https://codereview.appspot.com/5916045/diff/3001/juju/hooks/commands.py File juju/hooks/commands.py (right): https://codereview.appspot.com/5916045/diff/3001/juju/hooks/commands.py#newcode105 juju/hooks/commands.py:105: default="", It was nonsensical, so changed accordingly in the ...
12 years ago (2012-04-05 03:43:12 UTC) #4
jimbaker
12 years ago (2012-04-05 03:44:15 UTC) #5
jimbaker
Please take a look.
12 years ago (2012-04-05 03:46:36 UTC) #6
hazmat
looks much better thanks for refactoring, +1 with some minors. https://codereview.appspot.com/5916045/diff/10001/juju/hooks/executor.py File juju/hooks/executor.py (right): https://codereview.appspot.com/5916045/diff/10001/juju/hooks/executor.py#newcode261 ...
12 years ago (2012-04-05 11:49:03 UTC) #7
jimbaker
12 years ago (2012-04-05 17:01:30 UTC) #8
https://codereview.appspot.com/5916045/diff/10001/juju/hooks/executor.py
File juju/hooks/executor.py (right):

https://codereview.appspot.com/5916045/diff/10001/juju/hooks/executor.py#newc...
juju/hooks/executor.py:261: This enables a lookup point for cached child
relation hook contexts.
On 2012/04/05 11:49:03, hazmat wrote:
> ^for the hook api.

Done.

https://codereview.appspot.com/5916045/diff/10001/juju/hooks/protocol.py
File juju/hooks/protocol.py (right):

https://codereview.appspot.com/5916045/diff/10001/juju/hooks/protocol.py#newc...
juju/hooks/protocol.py:462: self.invoker = invoker
On 2012/04/05 11:49:03, hazmat wrote:
> please rename to invoker_provider/accessor to distinguish from actual invoker.

Done.

https://codereview.appspot.com/5916045/diff/10001/juju/state/hook.py
File juju/state/hook.py (right):

https://codereview.appspot.com/5916045/diff/10001/juju/state/hook.py#newcode48
juju/state/hook.py:48: # Invoker holding this context
On 2012/04/05 11:49:03, hazmat wrote:
> There shouldn't be any invokers refs on the hook context anymore.

Done.
Sign in to reply to this message.

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