Updated Branches: refs/heads/4.2 e256794a3 -> 30a680efc
Change security_group_agent python side in line with default security group rules change in 4.2 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/30a680ef Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/30a680ef Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/30a680ef Branch: refs/heads/4.2 Commit: 30a680efc5bddd5c6ff670f9a8f41b4fafe45dca Parents: d31dcdf Author: Frank.Zhang <frank.zh...@citrix.com> Authored: Tue Oct 8 11:08:18 2013 -0700 Committer: Frank.Zhang <frank.zh...@citrix.com> Committed: Wed Oct 9 10:52:42 2013 -0700 ---------------------------------------------------------------------- .../security_group_agent/security_group_agent/sglib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30a680ef/plugins/hypervisors/baremetal/resources/security_group_agent/security_group_agent/sglib.py ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/baremetal/resources/security_group_agent/security_group_agent/sglib.py b/plugins/hypervisors/baremetal/resources/security_group_agent/security_group_agent/sglib.py index b4a39eb..4eb8e43 100755 --- a/plugins/hypervisors/baremetal/resources/security_group_agent/security_group_agent/sglib.py +++ b/plugins/hypervisors/baremetal/resources/security_group_agent/security_group_agent/sglib.py @@ -77,7 +77,10 @@ class Request(object): def from_cherrypy_request(creq): req = Request() req.headers = copy.copy(creq.headers) - req.body = creq.body.fp.read() if creq.body else None + if hasattr(creq.body, 'fp'): + req.body = creq.body.fp.read() if creq.body else None + else: + req.body = creq.body.read() if creq.body else None req.method = copy.copy(creq.method) req.query_string = copy.copy(creq.query_string) if creq.query_string else None return req