You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/11/11 05:57:07 UTC
git commit: updated refs/heads/master to 175ead4
Updated Branches:
refs/heads/master f629d405e -> 175ead4ea
CLOUDSTACK-5121: There was one wrong initialization of cloudstackConnection.
The bug mentioned is causing test cases to fail.
Signed-off-by: Santhosh Edukulla <Sa...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/175ead4e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/175ead4e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/175ead4e
Branch: refs/heads/master
Commit: 175ead4ea96b72168aaa61b061b3345b1f29f5c2
Parents: f629d40
Author: Santhosh Edukulla <Sa...@citrix.com>
Authored: Mon Nov 11 03:30:09 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Nov 11 10:26:32 2013 +0530
----------------------------------------------------------------------
tools/marvin/marvin/cloudstackConnection.py | 13 ++++++-------
tools/marvin/marvin/cloudstackTestClient.py | 13 +++++++------
tools/marvin/marvin/integration/lib/utils.py | 5 +----
.../sandbox/demo/simulator/testcase/libs/utils.py | 5 +----
4 files changed, 15 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/175ead4e/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py
index 2c027c3..644cf3a 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -36,7 +36,7 @@ class cloudConnection(object):
""" Connections to make API calls to the cloudstack management server
"""
def __init__(self, mgmtDet, asyncTimeout=3600, logging=None,
- scheme='http', path='client/api'):
+ path='client/api'):
self.loglevel() # Turn off requests logs
self.apiKey = mgmtDet.apiKey
self.securityKey = mgmtDet.securityKey
@@ -49,7 +49,8 @@ class cloudConnection(object):
self.logging = logging
self.path = path
self.retries = 5
- self.protocol = scheme
+ self.mgtDetails = mgmtDet
+ self.protocol = "http"
self.asyncTimeout = asyncTimeout
self.auth = True
if self.port == 8096 or \
@@ -61,11 +62,9 @@ class cloudConnection(object):
% (self.protocol, self.mgtSvr, self.port, self.path)
def __copy__(self):
- return cloudConnection(self.mgtSvr, self.port, self.user,
- self.passwd, self.apiKey,
- self.securityKey,
- self.asyncTimeout, self.logging,
- self.protocol,
+ return cloudConnection(self.mgtDetails,
+ self.asyncTimeout,
+ self.logging,
self.path)
def loglevel(self, lvl=logging.WARNING):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/175ead4e/tools/marvin/marvin/cloudstackTestClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py
index 3e833c7..0f96a2c 100644
--- a/tools/marvin/marvin/cloudstackTestClient.py
+++ b/tools/marvin/marvin/cloudstackTestClient.py
@@ -41,8 +41,9 @@ class cloudstackTestClient(object):
dbSvrDetails, asyncTimeout=3600,
defaultWorkerThreads=10,
logging=None):
+ self.mgmtDetails = mgmtDetails
self.connection = \
- cloudstackConnection.cloudConnection(mgmtDetails,
+ cloudstackConnection.cloudConnection(self.mgmtDetails,
asyncTimeout,
logging)
self.apiClient =\
@@ -148,12 +149,12 @@ class cloudstackTestClient(object):
apiKey = registerUserRes.apikey
securityKey = registerUserRes.secretkey
+ mgtDetails = self.mgmtDetails
+ mgtDetails.apiKey = apiKey
+ mgtDetails.securityKey = securityKey
+
newUserConnection =\
- cloudstackConnection.cloudConnection(self.connection.mgtSvr,
- self.connection.port,
- self.connection.user,
- self.connection.passwd,
- apiKey, securityKey,
+ cloudstackConnection.cloudConnection(mgtDetails,
self.connection.asyncTimeout,
self.connection.logging)
self.userApiClient =\
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/175ead4e/tools/marvin/marvin/integration/lib/utils.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py
index 0fe3c26..d046235 100644
--- a/tools/marvin/marvin/integration/lib/utils.py
+++ b/tools/marvin/marvin/integration/lib/utils.py
@@ -157,10 +157,7 @@ def fetch_api_client(config_file='datacenterCfg'):
asyncTimeout = 3600
return cloudstackAPIClient.CloudStackAPIClient(
marvin.cloudstackConnection.cloudConnection(
- mgt.mgtSvrIp,
- mgt.port,
- mgt.apiKey,
- mgt.securityKey,
+ mgt,
asyncTimeout,
testClientLogger
)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/175ead4e/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py
index f26d2c0..0c7ca49 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py
@@ -76,10 +76,7 @@ def fetch_api_client(config_file='datacenterCfg'):
asyncTimeout = 3600
return cloudstackAPIClient.CloudStackAPIClient(
cloudstackConnection.cloudConnection(
- mgt.mgtSvrIp,
- mgt.port,
- mgt.apiKey,
- mgt.securityKey,
+ mgt,
asyncTimeout,
testClientLogger
)