Skip to content

Commit f678fc1

Browse files
committed
Fix generation of otherdeployparams's setters
1 parent 0bc11ec commit f678fc1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cloudstack/AutoScaleService.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ func (p *CreateAutoScaleVmProfileParams) toURLValues() url.Values {
632632
if v, found := p.p["otherdeployparams"]; found {
633633
m := v.(map[string]string)
634634
for i, k := range getSortedKeysFromMap(m) {
635-
u.Set(fmt.Sprintf("otherdeployparams[%d].key", i), k)
635+
u.Set(fmt.Sprintf("otherdeployparams[%d].name", i), k)
636636
u.Set(fmt.Sprintf("otherdeployparams[%d].value", i), m[k])
637637
}
638638
}
@@ -4693,7 +4693,7 @@ func (p *UpdateAutoScaleVmProfileParams) toURLValues() url.Values {
46934693
if v, found := p.p["otherdeployparams"]; found {
46944694
m := v.(map[string]string)
46954695
for i, k := range getSortedKeysFromMap(m) {
4696-
u.Set(fmt.Sprintf("otherdeployparams[%d].key", i), k)
4696+
u.Set(fmt.Sprintf("otherdeployparams[%d].name", i), k)
46974697
u.Set(fmt.Sprintf("otherdeployparams[%d].value", i), m[k])
46984698
}
46994699
}

generate/generate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,9 @@ func (s *service) generateConvertCode(cmd, name, typ string) {
14041404
case "datadiskofferinglist":
14051405
pn(" u.Set(fmt.Sprintf(\"%s[%%d].disk\", i), k)", name)
14061406
pn(" u.Set(fmt.Sprintf(\"%s[%%d].diskOffering\", i), m[k])", name)
1407+
case "otherdeployparams":
1408+
pn(" u.Set(fmt.Sprintf(\"%s[%%d].name\", i), k)", name)
1409+
pn(" u.Set(fmt.Sprintf(\"%s[%%d].value\", i), m[k])", name)
14071410
default:
14081411
if zeroIndex && !detailsRequireKeyValue[cmd] {
14091412
pn(" u.Set(fmt.Sprintf(\"%s[0].%%s\", k), m[k])", name)

0 commit comments

Comments
 (0)