This is an automated email from the ASF dual-hosted git repository.

abh1sar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git


The following commit(s) were added to refs/heads/main by this push:
     new d8a7439  Fix param in create LB Stickyness policy command (#133)
d8a7439 is described below

commit d8a7439fdc7eb412d0773832b4c385bfd9e90f2a
Author: Vishesh <[email protected]>
AuthorDate: Mon Aug 3 21:37:47 2026 +0530

    Fix param in create LB Stickyness policy command (#133)
    
    * Fix param in create LB Sticky policy command
    
    * Fix list stickyness policy response
---
 cloudstack/LoadBalancerService.go | 4 ++--
 generate/generate.go              | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cloudstack/LoadBalancerService.go 
b/cloudstack/LoadBalancerService.go
index c66a8c0..a6afb81 100644
--- a/cloudstack/LoadBalancerService.go
+++ b/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)
                        u.Set(fmt.Sprintf("param[%d].value", i), m[k])
                }
        }
@@ -3782,7 +3782,7 @@ func (s *LoadBalancerService) ListLBStickinessPolicies(p 
*ListLBStickinessPolici
 
 type ListLBStickinessPoliciesResponse struct {
        Count                int                   `json:"count"`
-       LBStickinessPolicies []*LBStickinessPolicy `json:"lbstickinesspolicy"`
+       LBStickinessPolicies []*LBStickinessPolicy `json:"stickinesspolicies"`
 }
 
 type LBStickinessPolicy struct {
diff --git a/generate/generate.go b/generate/generate.go
index 448b614..7fbeb79 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -1432,6 +1432,9 @@ func (s *service) generateConvertCode(cmd, name, typ 
string) {
                case "otherdeployparams":
                        pn("    u.Set(fmt.Sprintf(\"%s[%%d].name\", i), k)", 
name)
                        pn("    u.Set(fmt.Sprintf(\"%s[%%d].value\", i), 
m[k])", name)
+               case "param":
+                       pn("    u.Set(fmt.Sprintf(\"%s[%%d].name\", i), k)", 
name)
+                       pn("    u.Set(fmt.Sprintf(\"%s[%%d].value\", i), 
m[k])", name)
                case "nodeofferings":
                        pn("    u.Set(fmt.Sprintf(\"%s[%%d].node\", i), k)", 
name)
                        pn("    u.Set(fmt.Sprintf(\"%s[%%d].offering\", i), 
m[k])", name)
@@ -2096,6 +2099,9 @@ func (s *service) generateResponseType(a *API) {
                case "quotaSummary":
                        pn("    Count int `json:\"count\"`")
                        pn("    %s []*%s `json:\"%s\"`", ln, parseSingular(ln), 
"summary")
+               case "listLBStickinessPolicies":
+                       pn("    Count int `json:\"count\"`")
+                       pn("    %s []*%s `json:\"%s\"`", ln, parseSingular(ln), 
"stickinesspolicies")
                default:
                        pn("    Count int `json:\"count\"`")
                        pn("    %s []*%s `json:\"%s\"`", ln, parseSingular(ln), 
strings.ToLower(parseSingular(ln)))

Reply via email to