You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2013/11/11 10:42:32 UTC
git commit: updated refs/heads/4.2 to cff7e39
Updated Branches:
refs/heads/4.2 8f53bb273 -> cff7e3933
Fixed few hunks which were incorrect.
While adding certain marvin related fixes from master to 4.2 branch
incorrect hunks were added. Fixed them.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cff7e393
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cff7e393
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cff7e393
Branch: refs/heads/4.2
Commit: cff7e39339cc8735e3dc930bd1ce6761d502e307
Parents: 8f53bb2
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Mon Nov 11 15:10:29 2013 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Mon Nov 11 15:10:29 2013 +0530
----------------------------------------------------------------------
tools/marvin/marvin/cloudstackConnection.py | 27 ++++++------------------
1 file changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cff7e393/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py
index 64a43f8..644cf3a 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -32,6 +32,7 @@ from requests import RequestException
class cloudConnection(object):
+
""" Connections to make API calls to the cloudstack management server
"""
def __init__(self, mgmtDet, asyncTimeout=3600, logging=None,
@@ -56,7 +57,7 @@ class cloudConnection(object):
(self.apiKey is None and self.securityKey is None):
self.auth = False
if mgmtDet.useHttps == "True":
- self.protocol = "https"
+ self.protocol = "https"
self.baseurl = "%s://%s:%d/%s"\
% (self.protocol, self.mgtSvr, self.port, self.path)
@@ -157,12 +158,12 @@ class cloudConnection(object):
#Verify whether protocol is "http", then call the request over http
if self.protocol == "http":
- if method == 'POST':
- response = requests.post(self.baseurl, params=payload,
+ if method == 'POST':
+ response = requests.post(self.baseurl, params=payload,
+ verify=https_flag)
+ else:
+ response = requests.get(self.baseurl, params=payload,
verify=https_flag)
- else:
- response = requests.get(self.baseurl, params=payload,
- verify=https_flag)
else:
'''
If protocol is https, then create the connection url with \
@@ -170,20 +171,6 @@ class cloudConnection(object):
provided as part of cert
'''
try:
- if method == 'POST':
- response = requests.post(self.baseurl, params=payload,
- cert=cert_path, verify=https_flag)
- else:
- response = requests.get(self.baseurl, params=payload,
- cert=cert_path, verify=https_flag)
- except Exception,e:
- '''
- If an exception occurs with current CA certs,\
- then try with default certs path, we dont need \
- to mention here the cert path
- '''
- self.logging.debug( "Creating CS connection over https \
- didnt worked with user provided certs %s"%e )
if method == 'POST':
response = requests.post(self.baseurl,
params=payload,