You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/09/05 19:39:55 UTC

[1/2] git commit: request: fix ValueError when expiry is not set or set as blank/none

Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master d62f6b4c6 -> 9662e6bcc


request: fix ValueError when expiry is not set or set as blank/none

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/4c80be86
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/4c80be86
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/4c80be86

Branch: refs/heads/master
Commit: 4c80be86b535955cb092e1303f8e12e1aeb90d89
Parents: d62f6b4
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Sep 5 19:38:49 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Sep 5 19:38:49 2014 +0200

----------------------------------------------------------------------
 cloudmonkey/requester.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/4c80be86/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index 5a9b7ec..730b825 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -153,6 +153,8 @@ def make_request(command, args, logger, url,
     args["command"] = command
     args["response"] = "json"
     args["signatureversion"] = "3"
+    if expires == "" or expires == None:
+        expires = 600
     expirationtime = datetime.utcnow() + timedelta(seconds=int(expires))
     args["expires"] = expirationtime.strftime('%Y-%m-%dT%H:%M:%S+0000')
 


[2/2] git commit: requester: fix AttributeError in case timeout if blank or None

Posted by bh...@apache.org.
requester: fix AttributeError in case timeout if blank or None

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/9662e6bc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/9662e6bc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/9662e6bc

Branch: refs/heads/master
Commit: 9662e6bcc940eda5fe416e11c96e850b276aaad5
Parents: 4c80be8
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Sep 5 19:39:24 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Sep 5 19:39:24 2014 +0200

----------------------------------------------------------------------
 cloudmonkey/requester.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/9662e6bc/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index 730b825..210b377 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -236,6 +236,8 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, url,
         jobid = response[responsekey]['jobid']
         command = "queryAsyncJobResult"
         request = {'jobid': jobid}
+        if timeout == "" or timeout == None:
+            timeout = 3600
         timeout = int(timeout)
         pollperiod = 2
         progress = 1