I thought this was fixed, but no...
the fix is in statecmd.merge:
// Merge service settings and charm schema. func merge(serviceCfg map[string]interface{}, charmCfg map[string]charm.Option) map[string]interface{} { results := make(map[string]interface{}) log.Infof("charm config %#v", charmCfg) log.Infof("service config %#v", serviceCfg) for k, v := range charmCfg { m := map[string]interface{}{ "description": v.Description, "type": v.Type, } s, ok := serviceCfg[k] if ok && s != nil { m["value"] = s if v.Default != nil && reflect.DeepEqual(v.Default, s) { m["default"] = true } } else { // Breaks compatibility with py/juju (is this true any more?) m["value"] = v.Default } results[k] = m } return results }
I thought this was fixed, but no...
the fix is in statecmd.merge:
// Merge service settings and charm schema. interface{ }, charmCfg map[string] charm.Option) map[string] interface{ } { string] interface{ }) interface{ }{ DeepEqual( v.Default, s) {
func merge(serviceCfg map[string]
results := make(map[
log.Infof("charm config %#v", charmCfg)
log.Infof("service config %#v", serviceCfg)
for k, v := range charmCfg {
m := map[string]
"description": v.Description,
"type": v.Type,
}
s, ok := serviceCfg[k]
if ok && s != nil {
m["value"] = s
if v.Default != nil && reflect.
m["default"] = true
}
} else {
// Breaks compatibility with py/juju (is this true any more?)
m["value"] = v.Default
}
results[k] = m
}
return results
}