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

Issue 7405049: charm: Add config.Convert() (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by dimitern
Modified:
11 years, 2 months ago
Reviewers:
mp+150628
Visibility:
Public.

Description

charm: Add config.Convert() Add a new Config() method to charm config, taking a map[string]interface{} and returning map[string]interface{}, passing the given values through a schema type checking, and ignoring the defaults. This is needed in a follow-up CL that implements most of upgrade-charm feature's state operations. https://code.launchpad.net/~dimitern/juju-core/004-upgrade-charm-add-config-convert/+merge/150628 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : charm: Add config.Convert() #

Total comments: 2

Patch Set 3 : charm: Add config.Convert() #

Patch Set 4 : charm: Add config.Convert() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -0 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M charm/config.go View 1 1 chunk +17 lines, -0 lines 0 comments Download
M charm/config_test.go View 1 2 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 7
dimitern
Please take a look.
11 years, 2 months ago (2013-02-26 17:56:29 UTC) #1
rog
LGTM with a couple of minor thoughts. https://codereview.appspot.com/7405049/diff/1/charm/config.go File charm/config.go (right): https://codereview.appspot.com/7405049/diff/1/charm/config.go#newcode122 charm/config.go:122: func (c ...
11 years, 2 months ago (2013-02-26 18:15:10 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/7405049/diff/1/charm/config.go File charm/config.go (right): https://codereview.appspot.com/7405049/diff/1/charm/config.go#newcode122 charm/config.go:122: func (c *Config) Convert(values map[string]interface{}) ...
11 years, 2 months ago (2013-02-26 18:24:56 UTC) #3
dave_cheney.net
https://codereview.appspot.com/7405049/diff/5001/charm/config_test.go File charm/config_test.go (right): https://codereview.appspot.com/7405049/diff/5001/charm/config_test.go#newcode193 charm/config_test.go:193: func (s *ConfigSuite) TestConvert(c *C) { Could you convert ...
11 years, 2 months ago (2013-02-27 05:49:20 UTC) #4
dimitern
Please take a look. https://codereview.appspot.com/7405049/diff/5001/charm/config_test.go File charm/config_test.go (right): https://codereview.appspot.com/7405049/diff/5001/charm/config_test.go#newcode193 charm/config_test.go:193: func (s *ConfigSuite) TestConvert(c *C) ...
11 years, 2 months ago (2013-02-27 08:19:16 UTC) #5
dave_cheney.net
LGTM. Nice tests.
11 years, 2 months ago (2013-02-27 08:37:25 UTC) #6
dimitern
11 years, 2 months ago (2013-02-27 08:42:13 UTC) #7
*** Submitted:

charm: Add config.Convert()

Add a new Config() method to charm config, taking a
map[string]interface{} and returning map[string]interface{},
passing the given values through a schema type checking,
and ignoring the defaults.
This is needed in a follow-up CL that implements most of
upgrade-charm feature's state operations.

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

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