Updated Branches: refs/heads/4.3 4de858c7a -> 980e66d50
CLOUDSTACK-5121: There was one wrong initialization of cloudstackConnection. The bug mentioned is causing test cases to fail. Signed-off-by: Girish Shilamkar <[email protected]> Conflicts: tools/marvin/marvin/cloudstackConnection.py Conflicts: tools/marvin/marvin/cloudstackConnection.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/980e66d5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/980e66d5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/980e66d5 Branch: refs/heads/4.3 Commit: 980e66d501f525672827c207d8b0921f819e5fcd Parents: 4de858c Author: Santhosh Edukulla <[email protected]> Authored: Mon Nov 11 03:30:09 2013 +0530 Committer: Girish Shilamkar <[email protected]> Committed: Sun Nov 24 18:06:58 2013 -0500 ---------------------------------------------------------------------- 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/980e66d5/tools/marvin/marvin/cloudstackConnection.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 75af874..23f81fb 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/980e66d5/tools/marvin/marvin/cloudstackTestClient.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 8909b94..8a41fad 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -42,8 +42,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 =\ @@ -149,12 +150,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/980e66d5/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/980e66d5/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 )
