~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/state/modelconfig.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
}
135
135
 
136
136
// UpdateModelConfigDefaultValues updates the inherited settings used when creating a new model.
137
 
func (st *State) UpdateModelConfigDefaultValues(attrs map[string]interface{}, removed []string) error {
138
 
        settings, err := readSettings(st, globalSettingsC, controllerInheritedSettingsGlobalKey)
 
137
func (st *State) UpdateModelConfigDefaultValues(attrs map[string]interface{}, removed []string, regionSpec *environs.RegionSpec) error {
 
138
        var key string
 
139
        if regionSpec != nil {
 
140
                key = regionSettingsGlobalKey(regionSpec.Cloud, regionSpec.Region)
 
141
        } else {
 
142
                key = controllerInheritedSettingsGlobalKey
 
143
        }
 
144
        settings, err := readSettings(st, globalSettingsC, key)
139
145
        if err != nil {
140
146
                return errors.Trace(err)
141
147
        }