You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "vishesh92 (via GitHub)" <gi...@apache.org> on 2026/02/24 06:52:30 UTC

Re: [PR] Fix param in create LB Stickyness policy command [cloudstack-go]

vishesh92 commented on code in PR #133:
URL: https://github.com/apache/cloudstack-go/pull/133#discussion_r2844907000


##########
cloudstack/LoadBalancerService.go:
##########
@@ -1139,7 +1139,7 @@ func (p *CreateLBStickinessPolicyParams) toURLValues() url.Values {
 	if v, found := p.p["param"]; found {
 		m := v.(map[string]string)
 		for i, k := range getSortedKeysFromMap(m) {
-			u.Set(fmt.Sprintf("param[%d].key", i), k)
+			u.Set(fmt.Sprintf("param[%d].name", i), k)

Review Comment:
   The issue is that in CloudStack, the map parameter is parsed in different ways. And for this scenario, we need to set `name` instead of `key`.
   Ref.:
   https://github.com/apache/cloudstack/blob/30e6c224bdd2e33f35349e808ec75428853f2aa0/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java#L72-L73
   
   https://github.com/apache/cloudstack/blob/30e6c224bdd2e33f35349e808ec75428853f2aa0/server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java#L544-L547
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org