in cloudstack/TemplateService.go [2917:2979]
func (p *UpdateTemplateParams) toURLValues() url.Values {
u := url.Values{}
if p.p == nil {
return u
}
if v, found := p.p["bootable"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("bootable", vv)
}
if v, found := p.p["cleanupdetails"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("cleanupdetails", vv)
}
if v, found := p.p["details"]; found {
m := v.(map[string]string)
for _, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("details[0].%s", k), m[k])
}
}
if v, found := p.p["displaytext"]; found {
u.Set("displaytext", v.(string))
}
if v, found := p.p["format"]; found {
u.Set("format", v.(string))
}
if v, found := p.p["id"]; found {
u.Set("id", v.(string))
}
if v, found := p.p["isdynamicallyscalable"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("isdynamicallyscalable", vv)
}
if v, found := p.p["isrouting"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("isrouting", vv)
}
if v, found := p.p["name"]; found {
u.Set("name", v.(string))
}
if v, found := p.p["ostypeid"]; found {
u.Set("ostypeid", v.(string))
}
if v, found := p.p["passwordenabled"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("passwordenabled", vv)
}
if v, found := p.p["requireshvm"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("requireshvm", vv)
}
if v, found := p.p["sortkey"]; found {
vv := strconv.Itoa(v.(int))
u.Set("sortkey", vv)
}
if v, found := p.p["sshkeyenabled"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("sshkeyenabled", vv)
}
if v, found := p.p["templatetype"]; found {
u.Set("templatetype", v.(string))
}
return u
}