Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cloudstack/AutoScaleService.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,7 @@ func (p *CreateAutoScaleVmProfileParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down Expand Up @@ -4709,8 +4708,7 @@ func (p *UpdateAutoScaleVmProfileParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down
9 changes: 3 additions & 6 deletions cloudstack/VirtualMachineService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1446,8 +1446,7 @@ func (p *DeployVirtualMachineParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down Expand Up @@ -7935,8 +7934,7 @@ func (p *ResetUserDataForVirtualMachineParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down Expand Up @@ -9917,8 +9915,7 @@ func (p *UpdateVirtualMachineParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down
3 changes: 1 addition & 2 deletions cloudstack/VirtualNetworkFunctionsService.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ func (p *DeployVnfApplianceParams) toURLValues() url.Values {
if v, found := p.p["userdatadetails"]; found {
m := v.(map[string]string)
for i, k := range getSortedKeysFromMap(m) {
u.Set(fmt.Sprintf("userdatadetails[%d].key", i), k)
u.Set(fmt.Sprintf("userdatadetails[%d].value", i), m[k])
u.Set(fmt.Sprintf("userdatadetails[%d].%s", i, k), m[k])
}
}
if v, found := p.p["userdataid"]; found {
Expand Down
2 changes: 2 additions & 0 deletions generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,8 @@ func (s *service) generateConvertCode(cmd, name, typ string) {
pn(" u.Set(fmt.Sprintf(\"%s[%%d].%%s\", i, k), m[k])", name)
}
}
case "userdatadetails":
pn(" u.Set(fmt.Sprintf(\"%s[%%d].%%s\", i, k), m[k])", name)
case "serviceproviderlist":
pn(" u.Set(fmt.Sprintf(\"%s[%%d].service\", i), k)", name)
pn(" u.Set(fmt.Sprintf(\"%s[%%d].provider\", i), m[k])", name)
Expand Down
Loading