LEFT | RIGHT |
1 // Copyright 2014 Canonical Ltd. | 1 // Copyright 2014 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package rsyslog | 4 package rsyslog |
5 | 5 |
6 import ( | 6 import ( |
7 "launchpad.net/juju-core/cert" | 7 "launchpad.net/juju-core/cert" |
8 "launchpad.net/juju-core/state" | 8 "launchpad.net/juju-core/state" |
9 "launchpad.net/juju-core/state/api/params" | 9 "launchpad.net/juju-core/state/api/params" |
10 "launchpad.net/juju-core/state/apiserver/common" | 10 "launchpad.net/juju-core/state/apiserver/common" |
(...skipping 23 matching lines...) Expand all Loading... |
34 var result params.ErrorResult | 34 var result params.ErrorResult |
35 if !api.canModify { | 35 if !api.canModify { |
36 result.Error = common.ServerError(common.ErrBadCreds) | 36 result.Error = common.ServerError(common.ErrBadCreds) |
37 return result, nil | 37 return result, nil |
38 } | 38 } |
39 if _, err := cert.ParseCert(args.CACert); err != nil { | 39 if _, err := cert.ParseCert(args.CACert); err != nil { |
40 result.Error = common.ServerError(err) | 40 result.Error = common.ServerError(err) |
41 return result, nil | 41 return result, nil |
42 } | 42 } |
43 attrs := map[string]interface{}{"rsyslog-ca-cert": string(args.CACert)} | 43 attrs := map[string]interface{}{"rsyslog-ca-cert": string(args.CACert)} |
44 » if err := api.st.UpdateEnvironConfig(attrs, []string{}); err != nil { | 44 » if err := api.st.UpdateEnvironConfig(attrs, nil, nil); err != nil { |
45 result.Error = common.ServerError(err) | 45 result.Error = common.ServerError(err) |
46 } | 46 } |
47 return result, nil | 47 return result, nil |
48 } | 48 } |
LEFT | RIGHT |