This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
The following commit(s) were added to refs/heads/master by this push:
new fc0975e network: Fixes #24 split args to API in two parts
fc0975e is described below
commit fc0975eadf6ca0266a61b4f7639f3481dc56c22c
Author: Rohit Yadav <[email protected]>
AuthorDate: Thu Aug 16 13:53:05 2018 +0530
network: Fixes #24 split args to API in two parts
This fixes issue of passing args which has `=` like:
update configuration name=ldap.basedn
value="ou=People,dc=ldap,dc=corp,dc=company,dc=com"
Signed-off-by: Rohit Yadav <[email protected]>
---
cmd/network.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/network.go b/cmd/network.go
index 37e128e..2951caa 100644
--- a/cmd/network.go
+++ b/cmd/network.go
@@ -158,7 +158,7 @@ func NewAPIRequest(r *Request, api string, args []string,
isAsync bool) (map[str
params := make(url.Values)
params.Add("command", api)
for _, arg := range args {
- parts := strings.Split(arg, "=")
+ parts := strings.SplitN(arg, "=", 2)
if len(parts) == 2 {
params.Add(parts[0], parts[1])
}