Skip to content

Commit e50c1cf

Browse files
committed
Fix param in create LB Sticky policy command
1 parent 358fe85 commit e50c1cf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cloudstack/LoadBalancerService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ func (p *CreateLBStickinessPolicyParams) toURLValues() url.Values {
11391139
if v, found := p.p["param"]; found {
11401140
m := v.(map[string]string)
11411141
for i, k := range getSortedKeysFromMap(m) {
1142-
u.Set(fmt.Sprintf("param[%d].key", i), k)
1142+
u.Set(fmt.Sprintf("param[%d].name", i), k)
11431143
u.Set(fmt.Sprintf("param[%d].value", i), m[k])
11441144
}
11451145
}

generate/generate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,9 @@ func (s *service) generateConvertCode(cmd, name, typ string) {
14321432
case "otherdeployparams":
14331433
pn(" u.Set(fmt.Sprintf(\"%s[%%d].name\", i), k)", name)
14341434
pn(" u.Set(fmt.Sprintf(\"%s[%%d].value\", i), m[k])", name)
1435+
case "param":
1436+
pn(" u.Set(fmt.Sprintf(\"%s[%%d].name\", i), k)", name)
1437+
pn(" u.Set(fmt.Sprintf(\"%s[%%d].value\", i), m[k])", name)
14351438
case "nodeofferings":
14361439
pn(" u.Set(fmt.Sprintf(\"%s[%%d].node\", i), k)", name)
14371440
pn(" u.Set(fmt.Sprintf(\"%s[%%d].offering\", i), m[k])", name)

0 commit comments

Comments
 (0)