shwstppr commented on code in PR #161:
URL: 
https://github.com/apache/cloudstack-cloudmonkey/pull/161#discussion_r2013440497


##########
cmd/network.go:
##########
@@ -204,6 +204,10 @@ func NewAPIRequest(r *Request, api string, args []string, 
isAsync bool) (map[str
                }
        }
        params.Add("response", "json")
+       params.Add("signatureversion", "3")

Review Comment:
   Should we define these keys as constants?



##########
cmd/network.go:
##########
@@ -204,6 +204,10 @@ func NewAPIRequest(r *Request, api string, args []string, 
isAsync bool) (map[str
                }
        }
        params.Add("response", "json")
+       params.Add("signatureversion", "3")
+       expirationTime := time.Now().UTC().Add(15 * time.Minute)
+       expirationStr := expirationTime.Format("2006-01-02T15:04:05Z")
+       params.Add("expires", expirationStr)

Review Comment:
   Can this be changed to the following?
   ```suggestion
        params.Add(expiresKey, time.Now().UTC().Add(15 * 
time.Minute).Format(time.RFC3339))
   ```



-- 
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

Reply via email to