Re: [PR] Convert GET to POST requests [cloudstack-cloudmonkey]

2023-11-02 Thread via GitHub


rohityadavcloud commented on PR #140:
URL: 
https://github.com/apache/cloudstack-cloudmonkey/pull/140#issuecomment-1791029733

   @DaanHoogland @Pearl1594 is there a way you could test against large 
userdata input string to see how it behaves wrt post vs get request?


-- 
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] Convert GET to POST requests [cloudstack-cloudmonkey]

2023-11-02 Thread via GitHub


DaanHoogland commented on code in PR #140:
URL: 
https://github.com/apache/cloudstack-cloudmonkey/pull/140#discussion_r1380289018


##
cmd/network.go:
##
@@ -243,9 +252,18 @@ func NewAPIRequest(r *Request, api string, args []string, 
isAsync bool) (map[str
params.Add("sessionkey", sessionKey)
requestURL = fmt.Sprintf("%s?%s", r.Config.ActiveProfile.URL, 
encodeRequestParams(params))
config.Debug("NewAPIRequest API request URL:", requestURL)
-   response, err = r.Client().Get(requestURL)
-   if err != nil {
-   return nil, err
+
+   if params.Has("password") || params.Has("userdata") {
+   requestURL = fmt.Sprintf("%s", 
r.Config.ActiveProfile.URL)
+   response, err = r.Client().PostForm(requestURL, params)
+   if err != nil {
+   return nil, err
+   }
+   } else {
+   response, err = r.Client().Get(requestURL)
+   if err != nil {
+   return nil, err
+   }
}

Review Comment:
   this change is done twice. time for a method to call in both places?



-- 
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: [DISCUSS] New benchmarking tool

2023-11-02 Thread Daan Hoogland
thanks Rohit,
It is a great idea. I have some questions concerning "measuring is
influencing" and "prerequisites",
but those should not stop us from creating a repo for this in the project
great idea,

On Thu, Nov 2, 2023 at 9:58 AM Nux  wrote:

> Great idea, looking forward to it.
>
>
> On 2023-11-01 16:34, Rohit Yadav wrote:
> > All,
> >
> > I want to kickstart a discussion of developing a new tool - csbench,
> > that can help with generating resource load and measuring  the
> > performance and efficiency of Apache CloudStack APIs.
> >
> > Much like cmk, this tool can be written in Go and can be useful for
> > anybody to benchmark CloudStack API performance. It's still in a
> > nascent stage and can benefit from feedback and input from the wider
> > community early in the development process.
> >
> > If there are no objections, I propose to create a cloudstack-csbench
> > repo in which this tool can be developed. Thoughts and feedback?
> > Thanks.
> >
> >
> > Regards.
>


-- 
Daan


Re: [DISCUSS] New benchmarking tool

2023-11-02 Thread Nux

Great idea, looking forward to it.


On 2023-11-01 16:34, Rohit Yadav wrote:

All,

I want to kickstart a discussion of developing a new tool - csbench, 
that can help with generating resource load and measuring  the 
performance and efficiency of Apache CloudStack APIs.


Much like cmk, this tool can be written in Go and can be useful for 
anybody to benchmark CloudStack API performance. It's still in a 
nascent stage and can benefit from feedback and input from the wider 
community early in the development process.


If there are no objections, I propose to create a cloudstack-csbench 
repo in which this tool can be developed. Thoughts and feedback? 
Thanks.



Regards.