~fwereade/juju-core/unit-remove-depart-scopes

« back to all changes in this revision

Viewing changes to state/api/client.go

  • Committer: William Reade
  • Date: 2013-11-07 17:30:38 UTC
  • mfrom: (2032.1.6 juju-core)
  • Revision ID: fwereade@gmail.com-20131107173038-d0a72q96dujotc0z
merge parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
                ServiceName: service,
41
41
                Options:     options,
42
42
        }
43
 
        return c.st.Call("Client", "", "ServiceSet", p, nil)
 
43
        // TODO(Nate): Put this back to ServiceSet when the GUI stops expecting
 
44
        // ServiceSet to unset values set to an empty string.
 
45
        return c.st.Call("Client", "", "NewServiceSetForClientAPI", p, nil)
44
46
}
45
47
 
46
48
// ServiceUnset resets configuration options on a service.
271
273
func (c *Client) Close() error {
272
274
        return c.st.Close()
273
275
}
 
276
 
 
277
// EnvironmentGet returns all environment settings.
 
278
func (c *Client) EnvironmentGet() (map[string]interface{}, error) {
 
279
        result := params.EnvironmentGetResults{}
 
280
        err := c.st.Call("Client", "", "EnvironmentGet", nil, &result)
 
281
        return result.Config, err
 
282
}
 
283
 
 
284
// EnvironmentSet sets the given key-value pairs in the environment.
 
285
func (c *Client) EnvironmentSet(config map[string]interface{}) error {
 
286
        args := params.EnvironmentSet{Config: config}
 
287
        return c.st.Call("Client", "", "EnvironmentSet", args, nil)
 
288
}