Re: [PR] Modify State Changing Requests to Utilize POST Request [cloudstack-go]
sureshanaparti commented on code in PR #107: URL: https://github.com/apache/cloudstack-go/pull/107#discussion_r2149679383 ## generate/generate.go: ## @@ -1752,17 +1755,22 @@ func (s *service) generateNewAPICallFunc(a *API) { pn("") pn("// We should be able to retry on failure as this call is idempotent") pn("for i := 0; i < 3; i++ {") - pn("resp, err = s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) + pn("resp, err = s.cs.newRequest(\"%s\", p.toURLValues())", a.Name) pn("if err == nil {") pn("break") pn("}") pn("time.Sleep(500 * time.Millisecond)") pn("}") } else { - if requiresPostMethod[a.Name] { + isGetRequest, _ := regexp.MatchString("^(get|list|query|find)(\\w+)+$", strings.ToLower(a.Name)) + getRequestList := map[string]struct{}{"isaccountallowedtocreateofferingswithtags": {}, "readyforshutdown": {}, "cloudianisenabled": {}, "quotabalance": {}, + "quotasummary": {}, "quotatarifflist": {}, "quotaisenabled": {}, "quotastatement": {}, "verifyoauthcodeandgetuser": {}} + _, isInGetRequestList := getRequestList[strings.ToLower(a.Name)] + + if requiresPostMethod[a.Name] || !(isGetRequest || isInGetRequestList) { pn("resp, err := s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) } else { - pn("resp, err := s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) + pn("resp, err := s.cs.newRequest(\"%s\", p.toURLValues())", a.Name) Review Comment: newRequest, which is GET call -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Modify State Changing Requests to Utilize POST Request [cloudstack-go]
weizhouapache commented on code in PR #107: URL: https://github.com/apache/cloudstack-go/pull/107#discussion_r2149635362 ## cloudstack/UserService.go: ## @@ -3133,7 +3133,7 @@ func (s *UserService) NewVerifyOAuthCodeAndGetUserParams(provider string) *Verif // Verify the OAuth Code and fetch the corresponding user from provider func (s *UserService) VerifyOAuthCodeAndGetUser(p *VerifyOAuthCodeAndGetUserParams) (*VerifyOAuthCodeAndGetUserResponse, error) { - resp, err := s.cs.newPostRequest("verifyOAuthCodeAndGetUser", p.toURLValues()) + resp, err := s.cs.newRequest("verifyOAuthCodeAndGetUser", p.toURLValues()) Review Comment: should this be changed ? @sureshanaparti ## generate/generate.go: ## @@ -1752,17 +1755,22 @@ func (s *service) generateNewAPICallFunc(a *API) { pn("") pn("// We should be able to retry on failure as this call is idempotent") pn("for i := 0; i < 3; i++ {") - pn("resp, err = s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) + pn("resp, err = s.cs.newRequest(\"%s\", p.toURLValues())", a.Name) pn("if err == nil {") pn("break") pn("}") pn("time.Sleep(500 * time.Millisecond)") pn("}") } else { - if requiresPostMethod[a.Name] { + isGetRequest, _ := regexp.MatchString("^(get|list|query|find)(\\w+)+$", strings.ToLower(a.Name)) + getRequestList := map[string]struct{}{"isaccountallowedtocreateofferingswithtags": {}, "readyforshutdown": {}, "cloudianisenabled": {}, "quotabalance": {}, + "quotasummary": {}, "quotatarifflist": {}, "quotaisenabled": {}, "quotastatement": {}, "verifyoauthcodeandgetuser": {}} + _, isInGetRequestList := getRequestList[strings.ToLower(a.Name)] + + if requiresPostMethod[a.Name] || !(isGetRequest || isInGetRequestList) { pn("resp, err := s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) } else { - pn("resp, err := s.cs.newPostRequest(\"%s\", p.toURLValues())", a.Name) + pn("resp, err := s.cs.newRequest(\"%s\", p.toURLValues())", a.Name) Review Comment: newPostRequest or newRequest ? @sureshanaparti ## generate/requiredParams.go: ## @@ -49,7 +49,11 @@ var requiredParams = map[string][]string{ "displaytext", }, "createVPC": { + "name", "displaytext", + "vpcofferingid", + "zoneid", + "cidr", Review Comment: actually only need to add `cidr` but no issues if add others (`name`, `zoneid`, `vpcofferingid`) -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Updated CreateVPCParams call (as per 4.20 API changes) [cloudstack-terraform-provider]
sureshanaparti commented on PR #191: URL: https://github.com/apache/cloudstack-terraform-provider/pull/191#issuecomment-2976092498 @kiranchavala Updated changes in cloudstack-go PR: https://github.com/apache/cloudstack-go/pull/107 - https://github.com/apache/cloudstack-go/pull/107/commits/9164e3c2cfa50a1ac5a7f8bc8d909dc91f726f88 - https://github.com/apache/cloudstack-go/pull/107/commits/2584bd3278c2b6d2b82756eb1380f66eba05c042 -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Updated CreateVPCParams call (as per 4.20 API changes) [cloudstack-terraform-provider]
sureshanaparti commented on PR #191: URL: https://github.com/apache/cloudstack-terraform-provider/pull/191#issuecomment-2976095999 cidr is added as required parameter in create VPC, closing this PR. -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Updated CreateVPCParams call (as per 4.20 API changes) [cloudstack-terraform-provider]
sureshanaparti closed pull request #191: Updated CreateVPCParams call (as per 4.20 API changes) URL: https://github.com/apache/cloudstack-terraform-provider/pull/191 -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Modify State Changing Requests to Utilize POST Request [cloudstack-go]
sureshanaparti commented on code in PR #107: URL: https://github.com/apache/cloudstack-go/pull/107#discussion_r2149668170 ## cloudstack/UserService.go: ## @@ -3133,7 +3133,7 @@ func (s *UserService) NewVerifyOAuthCodeAndGetUserParams(provider string) *Verif // Verify the OAuth Code and fetch the corresponding user from provider func (s *UserService) VerifyOAuthCodeAndGetUser(p *VerifyOAuthCodeAndGetUserParams) (*VerifyOAuthCodeAndGetUserResponse, error) { - resp, err := s.cs.newPostRequest("verifyOAuthCodeAndGetUser", p.toURLValues()) + resp, err := s.cs.newRequest("verifyOAuthCodeAndGetUser", p.toURLValues()) Review Comment: yes, this is changed with generate. it's a GET call, valid one @weizhouapache -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Changing executeAPI to utilize POST request [cloudstack-csbench]
sureshanaparti commented on code in PR #18: URL: https://github.com/apache/cloudstack-csbench/pull/18#discussion_r2149456131 ## apirunner/apirunner.go: ## @@ -145,7 +151,7 @@ func executeAPIandCalculate(profileName string, apiURL string, command string, p log.Infof("count [%.f] : Time in seconds [Min - %.2f] [Max - %.2f] [Avg - %.2f]\n", count, minTime, maxTime, avgTime) saveData(apiURL, count, minTime, maxTime, avgTime, page, pagesize, keyword, profileName, command, dbProfile, reportAppend) } else { - elapsedTime, apicount, _ := executeAPI(apiURL, params) + elapsedTime, apicount, _ := executeAPI(apiURL, params, !isGetRequest) Review Comment: ```suggestion elapsedTime, apicount, _ := executeAPI(apiURL, params, !(isGetRequest || isInGetRequestList)) ``` -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add Netris Integration Documentation [cloudstack-documentation]
Pearl1594 commented on PR #482: URL: https://github.com/apache/cloudstack-documentation/pull/482#issuecomment-2977911333 @blueorangutan docbuild -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add Netris Integration Documentation [cloudstack-documentation]
blueorangutan commented on PR #482: URL: https://github.com/apache/cloudstack-documentation/pull/482#issuecomment-2977914471 @Pearl1594 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add Netris Integration Documentation [cloudstack-documentation]
blueorangutan commented on PR #482: URL: https://github.com/apache/cloudstack-documentation/pull/482#issuecomment-2977917519 QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/482. (QA-JID 370) -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add CloudStack project resource [cloudstack-terraform-provider]
ianc769 commented on PR #167: URL: https://github.com/apache/cloudstack-terraform-provider/pull/167#issuecomment-2978315867 @CodeBleu Ok I think i resolved all the test issues, thanks for fixing the workflows! If you can kick tests for this and #181 that would be much appreciated 😄 -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org