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

Issue 13237050: Add the formatter concept to agent config.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by thumper
Modified:
10 years, 8 months ago
Reviewers:
mp+183074, fwereade
Visibility:
Public.

Description

Add the formatter concept to agent config. In order to decouple the internal structure of the agent config from how it is stored on disk, we introduce formatters. They are responsible for moving the internal config to and from a serialization format. The existing format is called "format 1.12", as that is the stable release that the format was introduced. Some of the methods are purposefully trivial at this stage, and they are flushed out in the next branch. https://code.launchpad.net/~thumper/juju-core/agent-config-formatters/+merge/183074 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add the formatter concept to agent config. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+464 lines, -169 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 15 chunks +108 lines, -169 lines 0 comments Download
A agent/format.go View 1 1 chunk +51 lines, -0 lines 0 comments Download
A agent/format-1.12.go View 1 1 chunk +175 lines, -0 lines 0 comments Download
A agent/format-1.12_whitebox_test.go View 1 1 chunk +96 lines, -0 lines 0 comments Download
A agent/format_whitebox_test.go View 1 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 3
thumper
Please take a look.
10 years, 8 months ago (2013-08-30 05:51:53 UTC) #1
fwereade
LGTM, just quibbles https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go File agent/format-1.12.go (right): https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go#newcode19 agent/format-1.12.go:19: const format112 = "format 1.12" 1_12 ...
10 years, 8 months ago (2013-08-30 07:06:22 UTC) #2
thumper
10 years, 8 months ago (2013-09-02 04:03:19 UTC) #3
Please take a look.

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go
File agent/format-1.12.go (right):

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go#newcode19
agent/format-1.12.go:19: const format112 = "format 1.12"
On 2013/08/30 07:06:22, fwereade wrote:
> 1_12 throughout?

I have renamed "format112" to "format_1_12" because "format1_12" looked too
weird.

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go#newcode22
agent/format-1.12.go:22: type formatter112 struct {
formatter112 becomes formatter_1_12

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12.go#newcode26
agent/format-1.12.go:26: type format112Serialization struct {
format112Serialization becomes format_1_12Serialization

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12_whitebox_tes...
File agent/format-1.12_whitebox_test.go (right):

https://codereview.appspot.com/13237050/diff/1/agent/format-1.12_whitebox_tes...
agent/format-1.12_whitebox_test.go:6: // package.
On 2013/08/30 07:06:22, fwereade wrote:
> I don't personally feel we need to make a big deal out of this.

Removed then.
Sign in to reply to this message.

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