Merge lp:~rogpeppe/juju-core/513-gopkg-in-yaml into lp:~go-bot/juju-core/trunk
- 513-gopkg-in-yaml
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~rogpeppe/juju-core/513-gopkg-in-yaml |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
1126 lines (+107/-104) 45 files modified
agent/format-1.16.go (+3/-2) agent/format-1.16_whitebox_test.go (+1/-1) agent/format-1.18.go (+4/-3) agent/format-1.18_whitebox_test.go (+1/-1) charm/bundle_test.go (+2/-2) charm/charm_test.go (+3/-3) charm/config.go (+3/-3) charm/meta.go (+2/-2) cloudinit/cloudinit.go (+1/-1) cmd/juju/get_test.go (+4/-4) cmd/juju/status_test.go (+2/-2) cmd/jujud/bootstrap.go (+2/-2) cmd/jujud/bootstrap_test.go (+3/-3) cmd/output.go (+2/-2) cmd/plugins/juju-restore/restore.go (+2/-2) constraints/constraints_test.go (+3/-3) container/lxc/lxc_test.go (+2/-2) dependencies.tsv (+3/-3) environs/bootstrap/state.go (+3/-3) environs/bootstrap/state_test.go (+3/-3) environs/cloudinit/cloudinit.go (+2/-2) environs/cloudinit/cloudinit_test.go (+4/-4) environs/cloudinit_test.go (+2/-2) environs/config.go (+2/-2) environs/configstore/disk.go (+3/-3) juju/testing/conn.go (+2/-2) provider/ec2/local_test.go (+3/-3) provider/maas/environ_whitebox_test.go (+2/-2) provider/maas/environprovider_test.go (+2/-2) provider/maas/util.go (+2/-2) provider/maas/util_test.go (+2/-2) state/api/usermanager/client_test.go (+1/-0) state/apiserver/tools_test.go (+1/-1) state/apiserver/usermanager/usermanager.go (+1/-1) store/config.go (+2/-2) utils/trivial.go (+4/-4) version/version.go (+4/-4) version/version_test.go (+3/-3) worker/localstorage/config.go (+3/-3) worker/localstorage/config_test.go (+2/-2) worker/uniter/debug/client.go (+2/-2) worker/uniter/debug/server.go (+2/-2) worker/uniter/jujuc/config-get_test.go (+2/-2) worker/uniter/uniter_test.go (+3/-3) worker/upgrader/upgrader_test.go (+2/-2) |
To merge this branch: | bzr merge lp:~rogpeppe/juju-core/513-gopkg-in-yaml |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+211010@code.launchpad.net |
Commit message
all: use gopkg.in/v1/yaml
No semantic changes. This just changes the import
path.
We also update the gocheck dependency to use the latest branch,
which fixes time stamps on log messages.
Description of the change
all: use gopkg.in/v1/yaml
No semantic changes. This just changes the import
path.
We also update the gocheck dependency to use the latest branch,
which fixes time stamps on log messages.
Andrew Wilkins (axwalk) wrote : | # |
On 2014/03/14 10:03:20, rog wrote:
> Please take a look.
LGTM
Go Bot (go-bot) wrote : | # |
The attempt to merge lp:~rogpeppe/juju-core/513-gopkg-in-yaml into lp:juju-core failed. Below is the output from the failed tests.
agent/format-
/usr/lib/
/home/
Dave Cheney (dave-cheney) wrote : | # |
not lgtm - yet
before you commit this I need to have a firewall hole opened so I can
talk to gopkg.in.
On Fri, Mar 14, 2014 at 9:38 PM, Go Bot <email address hidden> wrote:
> The proposal to merge lp:~rogpeppe/juju-core/513-gopkg-in-yaml into lp:juju-core has been updated.
>
> Status: Approved => Needs review
>
> For more details, see:
> https:/
> --
> https:/
> You are subscribed to branch lp:juju-core.
Gustavo Niemeyer (niemeyer) wrote : | # |
What do we need for getting that done, Dave?
Dave Cheney (dave-cheney) wrote : | # |
I need to raise RTs to get firewalls adjusted for our development labs
On Wed, Mar 19, 2014 at 2:17 AM, Gustavo Niemeyer <email address hidden>wrote:
> Ping?
> --
>
> https:/
> You are subscribed to branch lp:juju-core.
>
Gustavo Niemeyer (niemeyer) wrote : | # |
Is there an ETA for this to get that finished?
Dave Cheney (dave-cheney) wrote : | # |
I was not able to find an issue covering this so I have raised, RT 68651
On Sat, Mar 22, 2014 at 2:44 AM, Gustavo Niemeyer <email address hidden>wrote:
> Is there an ETA for this to get that finished?
> --
>
> https:/
> You are subscribed to branch lp:juju-core.
>
Dave Cheney (dave-cheney) wrote : | # |
LGTM. RT 68851 is marked as closed
On Mon, Mar 24, 2014 at 3:35 PM, David Cheney <email address hidden>wrote:
> I was not able to find an issue covering this so I have raised, RT 68651
>
>
> On Sat, Mar 22, 2014 at 2:44 AM, Gustavo Niemeyer <email address hidden>wrote:
>
>> Is there an ETA for this to get that finished?
>> --
>>
>> https:/
>> You are subscribed to branch lp:juju-core.
>>
>
>
Unmerged revisions
- 2426. By Roger Peppe
-
cloudinit: remove yaml import alias
- 2425. By Roger Peppe
-
update dependencies.tsv
- 2424. By Roger Peppe
-
apiserver/
usermanager: do not use loggo/loggo - 2423. By Roger Peppe
-
sort imports
- 2422. By Roger Peppe
-
use gopkg.in/v1/yaml
Preview Diff
1 | === modified file 'agent/format-1.16.go' |
2 | --- agent/format-1.16.go 2014-03-12 02:28:30 +0000 |
3 | +++ agent/format-1.16.go 2014-03-14 10:02:56 +0000 |
4 | @@ -6,7 +6,8 @@ |
5 | import ( |
6 | "encoding/base64" |
7 | |
8 | - "launchpad.net/goyaml" |
9 | + "gopkg.in/v1/yaml" |
10 | + |
11 | "launchpad.net/juju-core/version" |
12 | ) |
13 | |
14 | @@ -65,7 +66,7 @@ |
15 | |
16 | func (formatter_1_16) unmarshal(data []byte) (*configInternal, error) { |
17 | var format format_1_16Serialization |
18 | - if err := goyaml.Unmarshal(data, &format); err != nil { |
19 | + if err := yaml.Unmarshal(data, &format); err != nil { |
20 | return nil, err |
21 | } |
22 | caCert, err := decode64(format.CACert) |
23 | |
24 | === modified file 'agent/format-1.16_whitebox_test.go' |
25 | --- agent/format-1.16_whitebox_test.go 2014-03-13 07:54:56 +0000 |
26 | +++ agent/format-1.16_whitebox_test.go 2014-03-14 10:02:56 +0000 |
27 | @@ -12,8 +12,8 @@ |
28 | "path/filepath" |
29 | |
30 | jc "github.com/juju/testing/checkers" |
31 | - |
32 | gc "launchpad.net/gocheck" |
33 | + |
34 | "launchpad.net/juju-core/testing/testbase" |
35 | "launchpad.net/juju-core/utils" |
36 | "launchpad.net/juju-core/version" |
37 | |
38 | === modified file 'agent/format-1.18.go' |
39 | --- agent/format-1.18.go 2014-03-12 02:28:30 +0000 |
40 | +++ agent/format-1.18.go 2014-03-14 10:02:56 +0000 |
41 | @@ -4,7 +4,8 @@ |
42 | package agent |
43 | |
44 | import ( |
45 | - "launchpad.net/goyaml" |
46 | + "gopkg.in/v1/yaml" |
47 | + |
48 | "launchpad.net/juju-core/state/api/params" |
49 | "launchpad.net/juju-core/version" |
50 | ) |
51 | @@ -53,7 +54,7 @@ |
52 | |
53 | func (formatter_1_18) unmarshal(data []byte) (*configInternal, error) { |
54 | var format format_1_18Serialization |
55 | - if err := goyaml.Unmarshal(data, &format); err != nil { |
56 | + if err := yaml.Unmarshal(data, &format); err != nil { |
57 | return nil, err |
58 | } |
59 | if format.UpgradedToVersion == nil || *format.UpgradedToVersion == version.Zero { |
60 | @@ -119,5 +120,5 @@ |
61 | format.APIAddresses = config.apiDetails.addresses |
62 | format.APIPassword = config.apiDetails.password |
63 | } |
64 | - return goyaml.Marshal(format) |
65 | + return yaml.Marshal(format) |
66 | } |
67 | |
68 | === modified file 'agent/format-1.18_whitebox_test.go' |
69 | --- agent/format-1.18_whitebox_test.go 2014-03-13 07:54:56 +0000 |
70 | +++ agent/format-1.18_whitebox_test.go 2014-03-14 10:02:56 +0000 |
71 | @@ -11,8 +11,8 @@ |
72 | "path/filepath" |
73 | |
74 | jc "github.com/juju/testing/checkers" |
75 | - |
76 | gc "launchpad.net/gocheck" |
77 | + |
78 | "launchpad.net/juju-core/state/api/params" |
79 | "launchpad.net/juju-core/testing/testbase" |
80 | "launchpad.net/juju-core/utils" |
81 | |
82 | === modified file 'charm/bundle_test.go' |
83 | --- charm/bundle_test.go 2014-03-13 07:54:56 +0000 |
84 | +++ charm/bundle_test.go 2014-03-14 10:02:56 +0000 |
85 | @@ -15,8 +15,8 @@ |
86 | "syscall" |
87 | |
88 | jc "github.com/juju/testing/checkers" |
89 | + "gopkg.in/v1/yaml" |
90 | gc "launchpad.net/gocheck" |
91 | - "launchpad.net/goyaml" |
92 | |
93 | "launchpad.net/juju-core/charm" |
94 | "launchpad.net/juju-core/testing" |
95 | @@ -136,7 +136,7 @@ |
96 | h.SetMode(0644) |
97 | w, err = zipw.CreateHeader(h) |
98 | c.Assert(err, gc.IsNil) |
99 | - data, err := goyaml.Marshal(charmDir.Meta()) |
100 | + data, err := yaml.Marshal(charmDir.Meta()) |
101 | c.Assert(err, gc.IsNil) |
102 | _, err = w.Write(data) |
103 | c.Assert(err, gc.IsNil) |
104 | |
105 | === modified file 'charm/charm_test.go' |
106 | --- charm/charm_test.go 2013-11-07 08:51:14 +0000 |
107 | +++ charm/charm_test.go 2014-03-14 10:02:56 +0000 |
108 | @@ -9,8 +9,8 @@ |
109 | "io/ioutil" |
110 | stdtesting "testing" |
111 | |
112 | + "gopkg.in/v1/yaml" |
113 | gc "launchpad.net/gocheck" |
114 | - "launchpad.net/goyaml" |
115 | |
116 | "launchpad.net/juju-core/charm" |
117 | "launchpad.net/juju-core/testing" |
118 | @@ -86,7 +86,7 @@ |
119 | panic(err) |
120 | } |
121 | m := make(map[interface{}]interface{}) |
122 | - err = goyaml.Unmarshal(data, m) |
123 | + err = yaml.Unmarshal(data, m) |
124 | if err != nil { |
125 | panic(err) |
126 | } |
127 | @@ -94,7 +94,7 @@ |
128 | } |
129 | |
130 | func (yh YamlHacker) Reader() io.Reader { |
131 | - data, err := goyaml.Marshal(yh) |
132 | + data, err := yaml.Marshal(yh) |
133 | if err != nil { |
134 | panic(err) |
135 | } |
136 | |
137 | === modified file 'charm/config.go' |
138 | --- charm/config.go 2013-09-11 08:56:44 +0000 |
139 | +++ charm/config.go 2014-03-14 10:02:56 +0000 |
140 | @@ -9,7 +9,7 @@ |
141 | "io/ioutil" |
142 | "strconv" |
143 | |
144 | - "launchpad.net/goyaml" |
145 | + "gopkg.in/v1/yaml" |
146 | |
147 | "launchpad.net/juju-core/schema" |
148 | ) |
149 | @@ -93,7 +93,7 @@ |
150 | return nil, err |
151 | } |
152 | var config *Config |
153 | - if err := goyaml.Unmarshal(data, &config); err != nil { |
154 | + if err := yaml.Unmarshal(data, &config); err != nil { |
155 | return nil, err |
156 | } |
157 | if config == nil { |
158 | @@ -194,7 +194,7 @@ |
159 | // config option. Empty strings and nil values are both interpreted as nil. |
160 | func (c *Config) ParseSettingsYAML(yamlData []byte, key string) (Settings, error) { |
161 | var allSettings map[string]Settings |
162 | - if err := goyaml.Unmarshal(yamlData, &allSettings); err != nil { |
163 | + if err := yaml.Unmarshal(yamlData, &allSettings); err != nil { |
164 | return nil, fmt.Errorf("cannot parse settings data: %v", err) |
165 | } |
166 | settings, ok := allSettings[key] |
167 | |
168 | === modified file 'charm/meta.go' |
169 | --- charm/meta.go 2013-08-14 13:52:35 +0000 |
170 | +++ charm/meta.go 2014-03-14 10:02:56 +0000 |
171 | @@ -10,7 +10,7 @@ |
172 | "io/ioutil" |
173 | "strings" |
174 | |
175 | - "launchpad.net/goyaml" |
176 | + "gopkg.in/v1/yaml" |
177 | |
178 | "launchpad.net/juju-core/charm/hooks" |
179 | "launchpad.net/juju-core/schema" |
180 | @@ -152,7 +152,7 @@ |
181 | return |
182 | } |
183 | raw := make(map[interface{}]interface{}) |
184 | - err = goyaml.Unmarshal(data, raw) |
185 | + err = yaml.Unmarshal(data, raw) |
186 | if err != nil { |
187 | return |
188 | } |
189 | |
190 | === modified file 'cloudinit/cloudinit.go' |
191 | --- cloudinit/cloudinit.go 2014-02-11 18:24:44 +0000 |
192 | +++ cloudinit/cloudinit.go 2014-03-14 10:02:56 +0000 |
193 | @@ -10,7 +10,7 @@ |
194 | "bytes" |
195 | "text/template" |
196 | |
197 | - yaml "launchpad.net/goyaml" |
198 | + "gopkg.in/v1/yaml" |
199 | ) |
200 | |
201 | // Config represents a set of cloud-init configuration options. |
202 | |
203 | === modified file 'cmd/juju/get_test.go' |
204 | --- cmd/juju/get_test.go 2013-10-09 13:55:14 +0000 |
205 | +++ cmd/juju/get_test.go 2014-03-14 10:02:56 +0000 |
206 | @@ -6,8 +6,8 @@ |
207 | import ( |
208 | "bytes" |
209 | |
210 | + "gopkg.in/v1/yaml" |
211 | gc "launchpad.net/gocheck" |
212 | - "launchpad.net/goyaml" |
213 | |
214 | "launchpad.net/juju-core/charm" |
215 | "launchpad.net/juju-core/cmd" |
216 | @@ -73,14 +73,14 @@ |
217 | // round trip via goyaml to avoid being sucked into a quagmire of |
218 | // map[interface{}]interface{} vs map[string]interface{}. This is |
219 | // also required if we add json support to this command. |
220 | - buf, err := goyaml.Marshal(t.expected) |
221 | + buf, err := yaml.Marshal(t.expected) |
222 | c.Assert(err, gc.IsNil) |
223 | expected := make(map[string]interface{}) |
224 | - err = goyaml.Unmarshal(buf, &expected) |
225 | + err = yaml.Unmarshal(buf, &expected) |
226 | c.Assert(err, gc.IsNil) |
227 | |
228 | actual := make(map[string]interface{}) |
229 | - err = goyaml.Unmarshal(ctx.Stdout.(*bytes.Buffer).Bytes(), &actual) |
230 | + err = yaml.Unmarshal(ctx.Stdout.(*bytes.Buffer).Bytes(), &actual) |
231 | c.Assert(err, gc.IsNil) |
232 | c.Assert(actual, gc.DeepEquals, expected) |
233 | } |
234 | |
235 | === modified file 'cmd/juju/status_test.go' |
236 | --- cmd/juju/status_test.go 2014-01-24 14:52:58 +0000 |
237 | +++ cmd/juju/status_test.go 2014-03-14 10:02:56 +0000 |
238 | @@ -11,8 +11,8 @@ |
239 | "strings" |
240 | "time" |
241 | |
242 | + "gopkg.in/v1/yaml" |
243 | gc "launchpad.net/gocheck" |
244 | - "launchpad.net/goyaml" |
245 | |
246 | "launchpad.net/juju-core/charm" |
247 | "launchpad.net/juju-core/cmd" |
248 | @@ -209,7 +209,7 @@ |
249 | |
250 | // statusFormats list all output formats supported by status command. |
251 | var statusFormats = []outputFormat{ |
252 | - {"yaml", goyaml.Marshal, goyaml.Unmarshal}, |
253 | + {"yaml", yaml.Marshal, yaml.Unmarshal}, |
254 | {"json", json.Marshal, json.Unmarshal}, |
255 | } |
256 | |
257 | |
258 | === modified file 'cmd/jujud/bootstrap.go' |
259 | --- cmd/jujud/bootstrap.go 2014-03-05 16:30:01 +0000 |
260 | +++ cmd/jujud/bootstrap.go 2014-03-14 10:02:56 +0000 |
261 | @@ -9,8 +9,8 @@ |
262 | "io/ioutil" |
263 | "strings" |
264 | |
265 | + "gopkg.in/v1/yaml" |
266 | "launchpad.net/gnuflag" |
267 | - "launchpad.net/goyaml" |
268 | |
269 | "launchpad.net/juju-core/agent" |
270 | "launchpad.net/juju-core/cmd" |
271 | @@ -112,7 +112,7 @@ |
272 | if err != nil { |
273 | return err |
274 | } |
275 | - return goyaml.Unmarshal(decoded, v) |
276 | + return yaml.Unmarshal(decoded, v) |
277 | } |
278 | |
279 | func (v *yamlBase64Value) String() string { |
280 | |
281 | === modified file 'cmd/jujud/bootstrap_test.go' |
282 | --- cmd/jujud/bootstrap_test.go 2014-03-13 07:54:56 +0000 |
283 | +++ cmd/jujud/bootstrap_test.go 2014-03-14 10:02:56 +0000 |
284 | @@ -9,8 +9,8 @@ |
285 | "path/filepath" |
286 | |
287 | jc "github.com/juju/testing/checkers" |
288 | + "gopkg.in/v1/yaml" |
289 | gc "launchpad.net/gocheck" |
290 | - "launchpad.net/goyaml" |
291 | |
292 | "launchpad.net/juju-core/agent" |
293 | "launchpad.net/juju-core/constraints" |
294 | @@ -53,7 +53,7 @@ |
295 | stateInfo := bootstrap.BootstrapState{ |
296 | StateInstances: []instance.Id{instance.Id("dummy.instance.id")}, |
297 | } |
298 | - stateData, err := goyaml.Marshal(stateInfo) |
299 | + stateData, err := yaml.Marshal(stateInfo) |
300 | c.Assert(err, gc.IsNil) |
301 | content := map[string]string{"/" + bootstrap.StateFile: string(stateData)} |
302 | testRoundTripper.Sub = jujutest.NewCannedRoundTripper(content, nil) |
303 | @@ -316,7 +316,7 @@ |
304 | type b64yaml map[string]interface{} |
305 | |
306 | func (m b64yaml) encode() string { |
307 | - data, err := goyaml.Marshal(m) |
308 | + data, err := yaml.Marshal(m) |
309 | if err != nil { |
310 | panic(err) |
311 | } |
312 | |
313 | === modified file 'cmd/output.go' |
314 | --- cmd/output.go 2013-11-14 06:30:53 +0000 |
315 | +++ cmd/output.go 2014-03-14 10:02:56 +0000 |
316 | @@ -12,8 +12,8 @@ |
317 | "sort" |
318 | "strings" |
319 | |
320 | + "gopkg.in/v1/yaml" |
321 | "launchpad.net/gnuflag" |
322 | - "launchpad.net/goyaml" |
323 | ) |
324 | |
325 | // Formatter converts an arbitrary object into a []byte. |
326 | @@ -24,7 +24,7 @@ |
327 | if value == nil { |
328 | return nil, nil |
329 | } |
330 | - result, err := goyaml.Marshal(value) |
331 | + result, err := yaml.Marshal(value) |
332 | if err != nil { |
333 | return nil, err |
334 | } |
335 | |
336 | === modified file 'cmd/plugins/juju-restore/restore.go' |
337 | --- cmd/plugins/juju-restore/restore.go 2014-03-05 19:41:34 +0000 |
338 | +++ cmd/plugins/juju-restore/restore.go 2014-03-14 10:02:56 +0000 |
339 | @@ -16,8 +16,8 @@ |
340 | "text/template" |
341 | |
342 | "github.com/juju/loggo" |
343 | + "gopkg.in/v1/yaml" |
344 | "launchpad.net/gnuflag" |
345 | - "launchpad.net/goyaml" |
346 | |
347 | "launchpad.net/juju-core/cmd" |
348 | "launchpad.net/juju-core/constraints" |
349 | @@ -305,7 +305,7 @@ |
350 | return credentials{}, fmt.Errorf("failed to read agent config file: %v", err) |
351 | } |
352 | var conf interface{} |
353 | - if err := goyaml.Unmarshal(data, &conf); err != nil { |
354 | + if err := yaml.Unmarshal(data, &conf); err != nil { |
355 | return credentials{}, fmt.Errorf("cannot unmarshal agent config file: %v", err) |
356 | } |
357 | m, ok := conf.(map[interface{}]interface{}) |
358 | |
359 | === modified file 'constraints/constraints_test.go' |
360 | --- constraints/constraints_test.go 2014-03-13 07:54:56 +0000 |
361 | +++ constraints/constraints_test.go 2014-03-14 10:02:56 +0000 |
362 | @@ -8,8 +8,8 @@ |
363 | "testing" |
364 | |
365 | jc "github.com/juju/testing/checkers" |
366 | + "gopkg.in/v1/yaml" |
367 | gc "launchpad.net/gocheck" |
368 | - "launchpad.net/goyaml" |
369 | |
370 | "launchpad.net/juju-core/constraints" |
371 | "launchpad.net/juju-core/instance" |
372 | @@ -409,10 +409,10 @@ |
373 | func (s *ConstraintsSuite) TestRoundtripYaml(c *gc.C) { |
374 | for _, t := range constraintsRoundtripTests { |
375 | c.Logf("test %s", t.Name) |
376 | - data, err := goyaml.Marshal(t.Value) |
377 | + data, err := yaml.Marshal(t.Value) |
378 | c.Assert(err, gc.IsNil) |
379 | var cons constraints.Value |
380 | - err = goyaml.Unmarshal(data, &cons) |
381 | + err = yaml.Unmarshal(data, &cons) |
382 | c.Check(err, gc.IsNil) |
383 | c.Check(cons, gc.DeepEquals, t.Value) |
384 | } |
385 | |
386 | === modified file 'container/lxc/lxc_test.go' |
387 | --- container/lxc/lxc_test.go 2014-03-13 07:54:56 +0000 |
388 | +++ container/lxc/lxc_test.go 2014-03-14 10:02:56 +0000 |
389 | @@ -14,9 +14,9 @@ |
390 | |
391 | "github.com/juju/loggo" |
392 | jc "github.com/juju/testing/checkers" |
393 | + "gopkg.in/v1/yaml" |
394 | gc "launchpad.net/gocheck" |
395 | "launchpad.net/golxc" |
396 | - "launchpad.net/goyaml" |
397 | |
398 | "launchpad.net/juju-core/agent" |
399 | "launchpad.net/juju-core/container" |
400 | @@ -123,7 +123,7 @@ |
401 | data := containertesting.AssertCloudInit(c, cloudInitFilename) |
402 | |
403 | x := make(map[interface{}]interface{}) |
404 | - err = goyaml.Unmarshal(data, &x) |
405 | + err = yaml.Unmarshal(data, &x) |
406 | c.Assert(err, gc.IsNil) |
407 | |
408 | var scripts []string |
409 | |
410 | === modified file 'dependencies.tsv' |
411 | --- dependencies.tsv 2014-03-14 04:38:34 +0000 |
412 | +++ dependencies.tsv 2014-03-14 10:02:56 +0000 |
413 | @@ -1,16 +1,16 @@ |
414 | code.google.com/p/go.crypto hg 6478cc9340cbbe6c04511280c5007722269108e9 184 |
415 | code.google.com/p/go.net hg 3591c18acabc99439c783463ef00e6dc277eee39 77 |
416 | -labix.org/v2/mgo bzr gustavo@niemeyer.net-20131118213720-aralgr4ienh0gdyq 248 |
417 | github.com/errgo/errgo git 93d72bf813883d1054cae1c001d3a46603f7f559 |
418 | github.com/juju/loggo git fa3acf9ab9ed09aea29030558528e24a254d27af |
419 | github.com/juju/testing git 9c0e0686136637876ae659e9056897575236e11f |
420 | +gopkg.in/v1/yaml git cd515839285fe1a31b92193360172d59f818c9b8 |
421 | +labix.org/v2/mgo bzr gustavo@niemeyer.net-20131118213720-aralgr4ienh0gdyq 248 |
422 | launchpad.net/gnuflag bzr roger.peppe@canonical.com-20121003093437-zcyyw0lpvj2nifpk 12 |
423 | launchpad.net/goamz bzr roger.peppe@canonical.com-20131218155244-hbnkvlkkzy3vmlh9 44 |
424 | -launchpad.net/gocheck bzr gustavo@niemeyer.net-20130302024745-6ikofwq2c03h7giu 85 |
425 | +launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 87 |
426 | launchpad.net/golxc bzr tim.penhey@canonical.com-20140311005930-b14361bwnocu3krh 8 |
427 | launchpad.net/gomaasapi bzr ian.booth@canonical.com-20131017011445-m1hmr0ap14osd7li 47 |
428 | launchpad.net/goose bzr tarmac-20140124165235-h9rloooc531udms5 116 |
429 | -launchpad.net/goyaml bzr gustavo@niemeyer.net-20131114120802-abe042syx64z2m7s 50 |
430 | launchpad.net/gwacl bzr tarmac-20140205045433-81h182mhz24fzp5e 231 |
431 | launchpad.net/lpad bzr gustavo@niemeyer.net-20120626194701-536yx0g9jdq2ik3h 64 |
432 | launchpad.net/tomb bzr gustavo@niemeyer.net-20130531003818-70ikdgklbxopn8x4 17 |
433 | |
434 | === modified file 'environs/bootstrap/state.go' |
435 | --- environs/bootstrap/state.go 2014-03-12 10:59:17 +0000 |
436 | +++ environs/bootstrap/state.go 2014-03-14 10:02:56 +0000 |
437 | @@ -10,7 +10,7 @@ |
438 | "io/ioutil" |
439 | "net/http" |
440 | |
441 | - "launchpad.net/goyaml" |
442 | + "gopkg.in/v1/yaml" |
443 | |
444 | "launchpad.net/juju-core/environs" |
445 | "launchpad.net/juju-core/environs/storage" |
446 | @@ -61,7 +61,7 @@ |
447 | |
448 | // SaveState writes the given state to the given storage. |
449 | func SaveState(storage storage.StorageWriter, state *BootstrapState) error { |
450 | - data, err := goyaml.Marshal(state) |
451 | + data, err := yaml.Marshal(state) |
452 | if err != nil { |
453 | return err |
454 | } |
455 | @@ -105,7 +105,7 @@ |
456 | return nil, fmt.Errorf("error reading %q: %v", StateFile, err) |
457 | } |
458 | var state BootstrapState |
459 | - err = goyaml.Unmarshal(data, &state) |
460 | + err = yaml.Unmarshal(data, &state) |
461 | if err != nil { |
462 | return nil, fmt.Errorf("error unmarshalling %q: %v", StateFile, err) |
463 | } |
464 | |
465 | === modified file 'environs/bootstrap/state_test.go' |
466 | --- environs/bootstrap/state_test.go 2014-03-13 07:54:56 +0000 |
467 | +++ environs/bootstrap/state_test.go 2014-03-14 10:02:56 +0000 |
468 | @@ -11,8 +11,8 @@ |
469 | "path/filepath" |
470 | |
471 | jc "github.com/juju/testing/checkers" |
472 | + "gopkg.in/v1/yaml" |
473 | gc "launchpad.net/gocheck" |
474 | - "launchpad.net/goyaml" |
475 | |
476 | "launchpad.net/juju-core/environs" |
477 | "launchpad.net/juju-core/environs/bootstrap" |
478 | @@ -92,7 +92,7 @@ |
479 | state := bootstrap.BootstrapState{ |
480 | StateInstances: []instance.Id{instance.Id("an-instance-id")}, |
481 | Characteristics: []instance.HardwareCharacteristics{{Arch: &arch}}} |
482 | - marshaledState, err := goyaml.Marshal(state) |
483 | + marshaledState, err := yaml.Marshal(state) |
484 | c.Assert(err, gc.IsNil) |
485 | |
486 | err = bootstrap.SaveState(stor, &state) |
487 | @@ -110,7 +110,7 @@ |
488 | state := bootstrap.BootstrapState{ |
489 | StateInstances: []instance.Id{instance.Id("an-instance-id")}, |
490 | Characteristics: []instance.HardwareCharacteristics{{Arch: &arch}}} |
491 | - content, err := goyaml.Marshal(state) |
492 | + content, err := yaml.Marshal(state) |
493 | c.Assert(err, gc.IsNil) |
494 | err = ioutil.WriteFile(filepath.Join(dataDir, bootstrap.StateFile), []byte(content), 0644) |
495 | c.Assert(err, gc.IsNil) |
496 | |
497 | === modified file 'environs/cloudinit/cloudinit.go' |
498 | --- environs/cloudinit/cloudinit.go 2014-03-13 20:52:41 +0000 |
499 | +++ environs/cloudinit/cloudinit.go 2014-03-14 10:02:56 +0000 |
500 | @@ -11,7 +11,7 @@ |
501 | "strings" |
502 | |
503 | "github.com/errgo/errgo" |
504 | - "launchpad.net/goyaml" |
505 | + "gopkg.in/v1/yaml" |
506 | |
507 | "launchpad.net/juju-core/agent" |
508 | "launchpad.net/juju-core/agent/mongo" |
509 | @@ -159,7 +159,7 @@ |
510 | } |
511 | |
512 | func base64yaml(m *config.Config) string { |
513 | - data, err := goyaml.Marshal(m.AllAttrs()) |
514 | + data, err := yaml.Marshal(m.AllAttrs()) |
515 | if err != nil { |
516 | // can't happen, these values have been validated a number of times |
517 | panic(err) |
518 | |
519 | === modified file 'environs/cloudinit/cloudinit_test.go' |
520 | --- environs/cloudinit/cloudinit_test.go 2014-03-13 20:52:41 +0000 |
521 | +++ environs/cloudinit/cloudinit_test.go 2014-03-14 10:02:56 +0000 |
522 | @@ -9,8 +9,8 @@ |
523 | "strings" |
524 | |
525 | jc "github.com/juju/testing/checkers" |
526 | + "gopkg.in/v1/yaml" |
527 | gc "launchpad.net/gocheck" |
528 | - "launchpad.net/goyaml" |
529 | |
530 | "launchpad.net/juju-core/agent" |
531 | "launchpad.net/juju-core/agent/mongo" |
532 | @@ -408,7 +408,7 @@ |
533 | buf, err := base64.StdEncoding.DecodeString(m[1]) |
534 | c.Assert(err, gc.IsNil) |
535 | var actual map[string]interface{} |
536 | - err = goyaml.Unmarshal(buf, &actual) |
537 | + err = yaml.Unmarshal(buf, &actual) |
538 | c.Assert(err, gc.IsNil) |
539 | c.Assert(cfg.AllAttrs(), gc.DeepEquals, actual) |
540 | } |
541 | @@ -435,7 +435,7 @@ |
542 | c.Assert(err, gc.IsNil) |
543 | |
544 | x := make(map[interface{}]interface{}) |
545 | - err = goyaml.Unmarshal(data, &x) |
546 | + err = yaml.Unmarshal(data, &x) |
547 | c.Assert(err, gc.IsNil) |
548 | |
549 | c.Check(x["apt_upgrade"], gc.Equals, true) |
550 | @@ -486,7 +486,7 @@ |
551 | c.Assert(err, gc.IsNil) |
552 | |
553 | ciContent := make(map[interface{}]interface{}) |
554 | - err = goyaml.Unmarshal(data, &ciContent) |
555 | + err = yaml.Unmarshal(data, &ciContent) |
556 | c.Assert(err, gc.IsNil) |
557 | // The 'runcmd' statement is at the beginning of the list |
558 | // of 'runcmd' statements. |
559 | |
560 | === modified file 'environs/cloudinit_test.go' |
561 | --- environs/cloudinit_test.go 2014-03-13 07:54:56 +0000 |
562 | +++ environs/cloudinit_test.go 2014-03-14 10:02:56 +0000 |
563 | @@ -7,8 +7,8 @@ |
564 | "time" |
565 | |
566 | jc "github.com/juju/testing/checkers" |
567 | + "gopkg.in/v1/yaml" |
568 | gc "launchpad.net/gocheck" |
569 | - "launchpad.net/goyaml" |
570 | |
571 | "launchpad.net/juju-core/agent" |
572 | "launchpad.net/juju-core/cert" |
573 | @@ -199,7 +199,7 @@ |
574 | c.Assert(err, gc.IsNil) |
575 | |
576 | config := make(map[interface{}]interface{}) |
577 | - err = goyaml.Unmarshal(unzipped, &config) |
578 | + err = yaml.Unmarshal(unzipped, &config) |
579 | c.Assert(err, gc.IsNil) |
580 | |
581 | // The scripts given to userData where added as the first |
582 | |
583 | === modified file 'environs/config.go' |
584 | --- environs/config.go 2014-03-05 19:41:34 +0000 |
585 | +++ environs/config.go 2014-03-14 10:02:56 +0000 |
586 | @@ -10,7 +10,7 @@ |
587 | "path/filepath" |
588 | |
589 | "github.com/juju/loggo" |
590 | - "launchpad.net/goyaml" |
591 | + "gopkg.in/v1/yaml" |
592 | |
593 | "launchpad.net/juju-core/environs/config" |
594 | "launchpad.net/juju-core/errors" |
595 | @@ -155,7 +155,7 @@ |
596 | Default string |
597 | Environments map[string]map[string]interface{} |
598 | } |
599 | - err := goyaml.Unmarshal(data, &raw) |
600 | + err := yaml.Unmarshal(data, &raw) |
601 | if err != nil { |
602 | return nil, err |
603 | } |
604 | |
605 | === modified file 'environs/configstore/disk.go' |
606 | --- environs/configstore/disk.go 2014-03-12 10:59:17 +0000 |
607 | +++ environs/configstore/disk.go 2014-03-14 10:02:56 +0000 |
608 | @@ -11,7 +11,7 @@ |
609 | |
610 | "github.com/errgo/errgo" |
611 | "github.com/juju/loggo" |
612 | - "launchpad.net/goyaml" |
613 | + "gopkg.in/v1/yaml" |
614 | |
615 | "launchpad.net/juju-core/errors" |
616 | "launchpad.net/juju-core/juju/osenv" |
617 | @@ -106,7 +106,7 @@ |
618 | if len(data) == 0 { |
619 | return &info, nil |
620 | } |
621 | - if err := goyaml.Unmarshal(data, &info); err != nil { |
622 | + if err := yaml.Unmarshal(data, &info); err != nil { |
623 | return nil, fmt.Errorf("error unmarshalling %q: %v", path, err) |
624 | } |
625 | info.initialized = true |
626 | @@ -166,7 +166,7 @@ |
627 | |
628 | // Write implements EnvironInfo.Write. |
629 | func (info *environInfo) Write() error { |
630 | - data, err := goyaml.Marshal(info) |
631 | + data, err := yaml.Marshal(info) |
632 | if err != nil { |
633 | return errgo.Annotate(err, "cannot marshal environment info") |
634 | } |
635 | |
636 | === modified file 'juju/testing/conn.go' |
637 | --- juju/testing/conn.go 2014-02-21 03:57:49 +0000 |
638 | +++ juju/testing/conn.go 2014-03-14 10:02:56 +0000 |
639 | @@ -9,8 +9,8 @@ |
640 | "os" |
641 | "path/filepath" |
642 | |
643 | + "gopkg.in/v1/yaml" |
644 | gc "launchpad.net/gocheck" |
645 | - "launchpad.net/goyaml" |
646 | |
647 | "launchpad.net/juju-core/agent" |
648 | "launchpad.net/juju-core/charm" |
649 | @@ -229,7 +229,7 @@ |
650 | "dummyenv": attrs, |
651 | }, |
652 | } |
653 | - data, err := goyaml.Marshal(whole) |
654 | + data, err := yaml.Marshal(whole) |
655 | c.Assert(err, gc.IsNil) |
656 | s.WriteConfig(string(data)) |
657 | } |
658 | |
659 | === modified file 'provider/ec2/local_test.go' |
660 | --- provider/ec2/local_test.go 2014-03-13 20:52:41 +0000 |
661 | +++ provider/ec2/local_test.go 2014-03-14 10:02:56 +0000 |
662 | @@ -10,13 +10,13 @@ |
663 | "strings" |
664 | |
665 | jc "github.com/juju/testing/checkers" |
666 | + "gopkg.in/v1/yaml" |
667 | "launchpad.net/goamz/aws" |
668 | amzec2 "launchpad.net/goamz/ec2" |
669 | "launchpad.net/goamz/ec2/ec2test" |
670 | "launchpad.net/goamz/s3" |
671 | "launchpad.net/goamz/s3/s3test" |
672 | gc "launchpad.net/gocheck" |
673 | - "launchpad.net/goyaml" |
674 | |
675 | "launchpad.net/juju-core/constraints" |
676 | "launchpad.net/juju-core/environs" |
677 | @@ -261,7 +261,7 @@ |
678 | c.Assert(err, gc.IsNil) |
679 | c.Logf("first instance: UserData: %q", userData) |
680 | var userDataMap map[interface{}]interface{} |
681 | - err = goyaml.Unmarshal(userData, &userDataMap) |
682 | + err = yaml.Unmarshal(userData, &userDataMap) |
683 | c.Assert(err, gc.IsNil) |
684 | c.Assert(userDataMap, jc.DeepEquals, map[interface{}]interface{}{ |
685 | "output": map[interface{}]interface{}{ |
686 | @@ -287,7 +287,7 @@ |
687 | c.Assert(err, gc.IsNil) |
688 | c.Logf("second instance: UserData: %q", userData) |
689 | userDataMap = nil |
690 | - err = goyaml.Unmarshal(userData, &userDataMap) |
691 | + err = yaml.Unmarshal(userData, &userDataMap) |
692 | c.Assert(err, gc.IsNil) |
693 | CheckPackage(c, userDataMap, "git", true) |
694 | CheckPackage(c, userDataMap, "mongodb-server", false) |
695 | |
696 | === modified file 'provider/maas/environ_whitebox_test.go' |
697 | --- provider/maas/environ_whitebox_test.go 2014-03-13 07:54:56 +0000 |
698 | +++ provider/maas/environ_whitebox_test.go 2014-03-14 10:02:56 +0000 |
699 | @@ -11,8 +11,8 @@ |
700 | "net/url" |
701 | |
702 | jc "github.com/juju/testing/checkers" |
703 | + "gopkg.in/v1/yaml" |
704 | gc "launchpad.net/gocheck" |
705 | - "launchpad.net/goyaml" |
706 | |
707 | "launchpad.net/juju-core/constraints" |
708 | "launchpad.net/juju-core/environs" |
709 | @@ -197,7 +197,7 @@ |
710 | info := machineInfo{"host1"} |
711 | cloudinitRunCmd, err := info.cloudinitRunCmd() |
712 | c.Assert(err, gc.IsNil) |
713 | - data, err := goyaml.Marshal(cloudinitRunCmd) |
714 | + data, err := yaml.Marshal(cloudinitRunCmd) |
715 | c.Assert(err, gc.IsNil) |
716 | c.Check(string(decodedUserData), gc.Matches, "(.|\n)*"+string(data)+"(\n|.)*") |
717 | |
718 | |
719 | === modified file 'provider/maas/environprovider_test.go' |
720 | --- provider/maas/environprovider_test.go 2014-03-13 07:54:56 +0000 |
721 | +++ provider/maas/environprovider_test.go 2014-03-14 10:02:56 +0000 |
722 | @@ -7,8 +7,8 @@ |
723 | "io/ioutil" |
724 | |
725 | jc "github.com/juju/testing/checkers" |
726 | + "gopkg.in/v1/yaml" |
727 | gc "launchpad.net/gocheck" |
728 | - "launchpad.net/goyaml" |
729 | |
730 | "launchpad.net/juju-core/environs/config" |
731 | "launchpad.net/juju-core/juju/osenv" |
732 | @@ -98,7 +98,7 @@ |
733 | func (suite *EnvironProviderSuite) TestPrivatePublicAddressReadsHostnameFromMachineFile(c *gc.C) { |
734 | hostname := "myhostname" |
735 | info := machineInfo{hostname} |
736 | - yaml, err := goyaml.Marshal(info) |
737 | + yaml, err := yaml.Marshal(info) |
738 | c.Assert(err, gc.IsNil) |
739 | // Create a temporary file to act as the file where the instanceID |
740 | // is stored. |
741 | |
742 | === modified file 'provider/maas/util.go' |
743 | --- provider/maas/util.go 2013-08-02 05:13:41 +0000 |
744 | +++ provider/maas/util.go 2014-03-14 10:02:56 +0000 |
745 | @@ -8,7 +8,7 @@ |
746 | "net/url" |
747 | "strings" |
748 | |
749 | - "launchpad.net/goyaml" |
750 | + "gopkg.in/v1/yaml" |
751 | |
752 | "launchpad.net/juju-core/environs" |
753 | "launchpad.net/juju-core/instance" |
754 | @@ -51,7 +51,7 @@ |
755 | // "machine info" file containing the hostname of a machine. |
756 | // That command is destined to be used by cloudinit. |
757 | func (info *machineInfo) cloudinitRunCmd() (string, error) { |
758 | - yaml, err := goyaml.Marshal(info) |
759 | + yaml, err := yaml.Marshal(info) |
760 | if err != nil { |
761 | return "", err |
762 | } |
763 | |
764 | === modified file 'provider/maas/util_test.go' |
765 | --- provider/maas/util_test.go 2013-08-09 04:58:34 +0000 |
766 | +++ provider/maas/util_test.go 2014-03-14 10:02:56 +0000 |
767 | @@ -6,8 +6,8 @@ |
768 | import ( |
769 | "fmt" |
770 | |
771 | + "gopkg.in/v1/yaml" |
772 | gc "launchpad.net/gocheck" |
773 | - "launchpad.net/goyaml" |
774 | |
775 | "launchpad.net/juju-core/environs" |
776 | "launchpad.net/juju-core/instance" |
777 | @@ -46,7 +46,7 @@ |
778 | script, err := info.cloudinitRunCmd() |
779 | |
780 | c.Assert(err, gc.IsNil) |
781 | - yaml, err := goyaml.Marshal(info) |
782 | + yaml, err := yaml.Marshal(info) |
783 | c.Assert(err, gc.IsNil) |
784 | expected := fmt.Sprintf("mkdir -p '%s'; echo -n '%s' > '%s'", environs.DataDir, yaml, filename) |
785 | c.Check(script, gc.Equals, expected) |
786 | |
787 | === modified file 'state/api/usermanager/client_test.go' |
788 | --- state/api/usermanager/client_test.go 2014-03-13 13:30:37 +0000 |
789 | +++ state/api/usermanager/client_test.go 2014-03-14 10:02:56 +0000 |
790 | @@ -5,6 +5,7 @@ |
791 | |
792 | import ( |
793 | gc "launchpad.net/gocheck" |
794 | + |
795 | jujutesting "launchpad.net/juju-core/juju/testing" |
796 | "launchpad.net/juju-core/state" |
797 | "launchpad.net/juju-core/state/api/usermanager" |
798 | |
799 | === modified file 'state/apiserver/tools_test.go' |
800 | --- state/apiserver/tools_test.go 2014-03-13 05:57:38 +0000 |
801 | +++ state/apiserver/tools_test.go 2014-03-14 10:02:56 +0000 |
802 | @@ -8,6 +8,7 @@ |
803 | "io/ioutil" |
804 | "net/http" |
805 | "path" |
806 | + "path/filepath" |
807 | |
808 | gc "launchpad.net/gocheck" |
809 | |
810 | @@ -18,7 +19,6 @@ |
811 | coretools "launchpad.net/juju-core/tools" |
812 | "launchpad.net/juju-core/utils" |
813 | "launchpad.net/juju-core/version" |
814 | - "path/filepath" |
815 | ) |
816 | |
817 | type toolsSuite struct { |
818 | |
819 | === modified file 'state/apiserver/usermanager/usermanager.go' |
820 | --- state/apiserver/usermanager/usermanager.go 2014-03-13 16:11:02 +0000 |
821 | +++ state/apiserver/usermanager/usermanager.go 2014-03-14 10:02:56 +0000 |
822 | @@ -6,7 +6,7 @@ |
823 | import ( |
824 | "fmt" |
825 | |
826 | - "github.com/loggo/loggo" |
827 | + "github.com/juju/loggo" |
828 | |
829 | "launchpad.net/juju-core/state" |
830 | "launchpad.net/juju-core/state/api/params" |
831 | |
832 | === modified file 'store/config.go' |
833 | --- store/config.go 2013-12-06 21:34:16 +0000 |
834 | +++ store/config.go 2014-03-14 10:02:56 +0000 |
835 | @@ -8,7 +8,7 @@ |
836 | "io/ioutil" |
837 | "os" |
838 | |
839 | - "launchpad.net/goyaml" |
840 | + "gopkg.in/v1/yaml" |
841 | ) |
842 | |
843 | type Config struct { |
844 | @@ -27,7 +27,7 @@ |
845 | return nil, fmt.Errorf("reading config file: %v", err) |
846 | } |
847 | conf := new(Config) |
848 | - err = goyaml.Unmarshal(data, conf) |
849 | + err = yaml.Unmarshal(data, conf) |
850 | if err != nil { |
851 | return nil, fmt.Errorf("processing config file: %v", err) |
852 | } |
853 | |
854 | === modified file 'utils/trivial.go' |
855 | --- utils/trivial.go 2014-01-28 17:07:55 +0000 |
856 | +++ utils/trivial.go 2014-03-14 10:02:56 +0000 |
857 | @@ -16,14 +16,14 @@ |
858 | "strings" |
859 | "unicode" |
860 | |
861 | - "launchpad.net/goyaml" |
862 | + "gopkg.in/v1/yaml" |
863 | ) |
864 | |
865 | // WriteYaml marshals obj as yaml and then writes it to a file, atomically, |
866 | // by first writing a sibling with the suffix ".preparing" and then moving |
867 | // the sibling to the real path. |
868 | func WriteYaml(path string, obj interface{}) error { |
869 | - data, err := goyaml.Marshal(obj) |
870 | + data, err := yaml.Marshal(obj) |
871 | if err != nil { |
872 | return err |
873 | } |
874 | @@ -40,13 +40,13 @@ |
875 | } |
876 | |
877 | // ReadYaml unmarshals the yaml contained in the file at path into obj. See |
878 | -// goyaml.Unmarshal. |
879 | +// yaml.Unmarshal. |
880 | func ReadYaml(path string, obj interface{}) error { |
881 | data, err := ioutil.ReadFile(path) |
882 | if err != nil { |
883 | return err |
884 | } |
885 | - return goyaml.Unmarshal(data, obj) |
886 | + return yaml.Unmarshal(data, obj) |
887 | } |
888 | |
889 | // ErrorContextf prefixes any error stored in err with text formatted |
890 | |
891 | === modified file 'version/version.go' |
892 | --- version/version.go 2014-03-11 05:30:27 +0000 |
893 | +++ version/version.go 2014-03-14 10:02:56 +0000 |
894 | @@ -118,12 +118,12 @@ |
895 | return nil |
896 | } |
897 | |
898 | -// GetYAML implements goyaml.Getter |
899 | +// GetYAML implements yaml.Getter |
900 | func (v Binary) GetYAML() (tag string, value interface{}) { |
901 | return "", v.String() |
902 | } |
903 | |
904 | -// SetYAML implements goyaml.Setter |
905 | +// SetYAML implements yaml.Setter |
906 | func (vp *Binary) SetYAML(tag string, value interface{}) bool { |
907 | vstr := fmt.Sprintf("%v", value) |
908 | if vstr == "" { |
909 | @@ -278,12 +278,12 @@ |
910 | return nil |
911 | } |
912 | |
913 | -// GetYAML implements goyaml.Getter |
914 | +// GetYAML implements yaml.Getter |
915 | func (v Number) GetYAML() (tag string, value interface{}) { |
916 | return "", v.String() |
917 | } |
918 | |
919 | -// SetYAML implements goyaml.Setter |
920 | +// SetYAML implements yaml.Setter |
921 | func (vp *Number) SetYAML(tag string, value interface{}) bool { |
922 | vstr := fmt.Sprintf("%v", value) |
923 | if vstr == "" { |
924 | |
925 | === modified file 'version/version_test.go' |
926 | --- version/version_test.go 2014-03-09 20:53:15 +0000 |
927 | +++ version/version_test.go 2014-03-14 10:02:56 +0000 |
928 | @@ -10,9 +10,9 @@ |
929 | "strings" |
930 | "testing" |
931 | |
932 | + "gopkg.in/v1/yaml" |
933 | "labix.org/v2/mgo/bson" |
934 | gc "launchpad.net/gocheck" |
935 | - "launchpad.net/goyaml" |
936 | |
937 | "launchpad.net/juju-core/testing/testbase" |
938 | "launchpad.net/juju-core/version" |
939 | @@ -202,8 +202,8 @@ |
940 | bson.Unmarshal, |
941 | }, { |
942 | "yaml", |
943 | - goyaml.Marshal, |
944 | - goyaml.Unmarshal, |
945 | + yaml.Marshal, |
946 | + yaml.Unmarshal, |
947 | }} |
948 | |
949 | func (*suite) TestBinaryMarshalUnmarshal(c *gc.C) { |
950 | |
951 | === modified file 'worker/localstorage/config.go' |
952 | --- worker/localstorage/config.go 2014-01-23 04:37:52 +0000 |
953 | +++ worker/localstorage/config.go 2014-03-14 10:02:56 +0000 |
954 | @@ -4,7 +4,7 @@ |
955 | package localstorage |
956 | |
957 | import ( |
958 | - "launchpad.net/goyaml" |
959 | + "gopkg.in/v1/yaml" |
960 | |
961 | "launchpad.net/juju-core/agent" |
962 | ) |
963 | @@ -77,7 +77,7 @@ |
964 | kv[StorageCAKey] = string(key) |
965 | } |
966 | if hostnames := tlsConfig.StorageHostnames(); len(hostnames) > 0 { |
967 | - data, err := goyaml.Marshal(hostnames) |
968 | + data, err := yaml.Marshal(hostnames) |
969 | if err != nil { |
970 | return nil, err |
971 | } |
972 | @@ -106,7 +106,7 @@ |
973 | |
974 | hostnames := agentConfig.Value(StorageHostnames) |
975 | if len(hostnames) > 0 { |
976 | - err := goyaml.Unmarshal([]byte(hostnames), &config.hostnames) |
977 | + err := yaml.Unmarshal([]byte(hostnames), &config.hostnames) |
978 | if err != nil { |
979 | return nil, err |
980 | } |
981 | |
982 | === modified file 'worker/localstorage/config_test.go' |
983 | --- worker/localstorage/config_test.go 2014-01-23 04:37:52 +0000 |
984 | +++ worker/localstorage/config_test.go 2014-03-14 10:02:56 +0000 |
985 | @@ -6,8 +6,8 @@ |
986 | import ( |
987 | stdtesting "testing" |
988 | |
989 | + "gopkg.in/v1/yaml" |
990 | gc "launchpad.net/gocheck" |
991 | - "launchpad.net/goyaml" |
992 | |
993 | "launchpad.net/juju-core/worker/localstorage" |
994 | ) |
995 | @@ -104,7 +104,7 @@ |
996 | } |
997 | |
998 | func mustMarshalYAML(c *gc.C, v interface{}) string { |
999 | - data, err := goyaml.Marshal(v) |
1000 | + data, err := yaml.Marshal(v) |
1001 | c.Assert(err, gc.IsNil) |
1002 | return string(data) |
1003 | } |
1004 | |
1005 | === modified file 'worker/uniter/debug/client.go' |
1006 | --- worker/uniter/debug/client.go 2013-07-31 06:00:13 +0000 |
1007 | +++ worker/uniter/debug/client.go 2014-03-14 10:02:56 +0000 |
1008 | @@ -7,7 +7,7 @@ |
1009 | "encoding/base64" |
1010 | "strings" |
1011 | |
1012 | - "launchpad.net/goyaml" |
1013 | + "gopkg.in/v1/yaml" |
1014 | ) |
1015 | |
1016 | type hookArgs struct { |
1017 | @@ -38,7 +38,7 @@ |
1018 | |
1019 | func encodeArgs(hooks []string) []byte { |
1020 | // Marshal to YAML, then encode in base64 to avoid shell escapes. |
1021 | - yamlArgs, err := goyaml.Marshal(hookArgs{Hooks: hooks}) |
1022 | + yamlArgs, err := yaml.Marshal(hookArgs{Hooks: hooks}) |
1023 | if err != nil { |
1024 | // This should not happen: we're in full control. |
1025 | panic(err) |
1026 | |
1027 | === modified file 'worker/uniter/debug/server.go' |
1028 | --- worker/uniter/debug/server.go 2013-09-16 01:55:29 +0000 |
1029 | +++ worker/uniter/debug/server.go 2014-03-14 10:02:56 +0000 |
1030 | @@ -10,7 +10,7 @@ |
1031 | "os" |
1032 | "os/exec" |
1033 | |
1034 | - "launchpad.net/goyaml" |
1035 | + "gopkg.in/v1/yaml" |
1036 | |
1037 | "launchpad.net/juju-core/utils/set" |
1038 | ) |
1039 | @@ -72,7 +72,7 @@ |
1040 | return nil, err |
1041 | } |
1042 | var args hookArgs |
1043 | - err = goyaml.Unmarshal(data, &args) |
1044 | + err = yaml.Unmarshal(data, &args) |
1045 | if err != nil { |
1046 | return nil, err |
1047 | } |
1048 | |
1049 | === modified file 'worker/uniter/jujuc/config-get_test.go' |
1050 | --- worker/uniter/jujuc/config-get_test.go 2013-09-12 16:29:52 +0000 |
1051 | +++ worker/uniter/jujuc/config-get_test.go 2014-03-14 10:02:56 +0000 |
1052 | @@ -8,8 +8,8 @@ |
1053 | "io/ioutil" |
1054 | "path/filepath" |
1055 | |
1056 | + "gopkg.in/v1/yaml" |
1057 | gc "launchpad.net/gocheck" |
1058 | - "launchpad.net/goyaml" |
1059 | |
1060 | "launchpad.net/juju-core/cmd" |
1061 | "launchpad.net/juju-core/testing" |
1062 | @@ -113,7 +113,7 @@ |
1063 | out := map[string]interface{}{} |
1064 | switch t.format { |
1065 | case formatYaml: |
1066 | - c.Assert(goyaml.Unmarshal(bufferBytes(ctx.Stdout), &out), gc.IsNil) |
1067 | + c.Assert(yaml.Unmarshal(bufferBytes(ctx.Stdout), &out), gc.IsNil) |
1068 | case formatJson: |
1069 | c.Assert(json.Unmarshal(bufferBytes(ctx.Stdout), &out), gc.IsNil) |
1070 | } |
1071 | |
1072 | === modified file 'worker/uniter/uniter_test.go' |
1073 | --- worker/uniter/uniter_test.go 2014-03-13 07:54:56 +0000 |
1074 | +++ worker/uniter/uniter_test.go 2014-03-14 10:02:56 +0000 |
1075 | @@ -18,8 +18,8 @@ |
1076 | "time" |
1077 | |
1078 | jc "github.com/juju/testing/checkers" |
1079 | + "gopkg.in/v1/yaml" |
1080 | gc "launchpad.net/gocheck" |
1081 | - "launchpad.net/goyaml" |
1082 | |
1083 | "launchpad.net/juju-core/agent/tools" |
1084 | "launchpad.net/juju-core/charm" |
1085 | @@ -1818,7 +1818,7 @@ |
1086 | data, err := ioutil.ReadFile(filepath.Join(ctx.path, s.path)) |
1087 | c.Assert(err, gc.IsNil) |
1088 | actual := make(map[string]interface{}) |
1089 | - err = goyaml.Unmarshal(data, &actual) |
1090 | + err = yaml.Unmarshal(data, &actual) |
1091 | c.Assert(err, gc.IsNil) |
1092 | c.Assert(actual, gc.DeepEquals, s.expect) |
1093 | } |
1094 | @@ -1910,7 +1910,7 @@ |
1095 | replaced := replace(meta.Provides) || replace(meta.Requires) || replace(meta.Peers) |
1096 | c.Assert(replaced, gc.Equals, true, gc.Commentf("charm %q does not implement relation %q", charmPath, oldName)) |
1097 | |
1098 | - newmeta, err := goyaml.Marshal(meta) |
1099 | + newmeta, err := yaml.Marshal(meta) |
1100 | c.Assert(err, gc.IsNil) |
1101 | ioutil.WriteFile(path, newmeta, 0644) |
1102 | |
1103 | |
1104 | === modified file 'worker/upgrader/upgrader_test.go' |
1105 | --- worker/upgrader/upgrader_test.go 2014-03-13 23:30:56 +0000 |
1106 | +++ worker/upgrader/upgrader_test.go 2014-03-14 10:02:56 +0000 |
1107 | @@ -10,10 +10,9 @@ |
1108 | stdtesting "testing" |
1109 | "time" |
1110 | |
1111 | + jc "github.com/juju/testing/checkers" |
1112 | gc "launchpad.net/gocheck" |
1113 | - coretesting "launchpad.net/juju-core/testing" |
1114 | |
1115 | - jc "github.com/juju/testing/checkers" |
1116 | "launchpad.net/juju-core/agent" |
1117 | agenttools "launchpad.net/juju-core/agent/tools" |
1118 | envtesting "launchpad.net/juju-core/environs/testing" |
1119 | @@ -24,6 +23,7 @@ |
1120 | "launchpad.net/juju-core/state" |
1121 | "launchpad.net/juju-core/state/api" |
1122 | statetesting "launchpad.net/juju-core/state/testing" |
1123 | + coretesting "launchpad.net/juju-core/testing" |
1124 | coretools "launchpad.net/juju-core/tools" |
1125 | "launchpad.net/juju-core/version" |
1126 | "launchpad.net/juju-core/worker/upgrader" |
Reviewers: mp+211010_ code.launchpad. net,
Message:
Please take a look.
Description:
all: use gopkg.in/v1/yaml
No semantic changes. This just changes the import
path.
We also update the gocheck dependency to use the latest branch,
which fixes time stamps on log messages.
https:/ /code.launchpad .net/~rogpeppe/ juju-core/ 513-gopkg- in-yaml/ +merge/ 211010
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/75970043/
Affected files (+109, -104 lines): 1.16.go 1.16_whitebox_ test.go 1.18.go 1.18_whitebox_ test.go test.go cloudinit. go get_test. go status_ test.go bootstrap. go bootstrap_ test.go juju-restore/ restore. go constraints_ test.go lxc/lxc_ test.go bootstrap/ state.go bootstrap/ state_test. go cloudinit/ cloudinit. go cloudinit/ cloudinit_ test.go cloudinit_ test.go configstore/ disk.go conn.go ec2/local_ test.go maas/environ_ whitebox_ test.go maas/environpro vider_test. go maas/util. go maas/util_ test.go usermanager/ client_ test.go /tools_ test.go /usermanager/ usermanager. go version_ test.go localstorage/ config. go localstorage/ config_ test.go uniter/ debug/client. go uniter/ debug/server. go uniter/ jujuc/config- get_test. go uniter/ uniter_ test.go upgrader/ upgrader_ test.go
A [revision details]
M agent/format-
M agent/format-
M agent/format-
M agent/format-
M charm/bundle_
M charm/charm_test.go
M charm/config.go
M charm/meta.go
M cloudinit/
M cmd/juju/
M cmd/juju/
M cmd/jujud/
M cmd/jujud/
M cmd/output.go
M cmd/plugins/
M constraints/
M container/
M dependencies.tsv
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/config.go
M environs/
M juju/testing/
M provider/
M provider/
M provider/
M provider/
M provider/
M state/api/
M state/apiserver
M state/apiserver
M store/config.go
M utils/trivial.go
M version/version.go
M version/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/