cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/4.2 to e82fe01
Date Mon, 11 Nov 2013 05:16:50 GMT
Updated Branches:
  refs/heads/4.2 42941b337 -> e82fe0169


CLOUDSTACK-5121: There was one wrong initialization of cloudstackConnection.

The bug mentioned is causing test cases to fail.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>

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/e82fe016
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e82fe016
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e82fe016

Branch: refs/heads/4.2
Commit: e82fe016920d42afd3c648d370dfc5de61e03c48
Parents: 42941b3
Author: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Authored: Mon Nov 11 03:30:09 2013 +0530
Committer: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Committed: Sun Nov 10 17:28:32 2013 -0500

----------------------------------------------------------------------
 tools/marvin/marvin/cloudstackConnection.py            | 12 ++++++------
 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(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e82fe016/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py
index a56dd68..64a43f8 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -34,7 +34,8 @@ 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, scheme='http',path='client/api'):
+    def __init__(self, mgmtDet, asyncTimeout=3600, logging=None,
+                 path='client/api'):
         self.loglevel()  # Turn off requests logs
         self.apiKey = mgmtDet.apiKey
         self.securityKey = mgmtDet.securityKey
@@ -47,6 +48,7 @@ class cloudConnection(object):
         self.logging = logging
         self.path = path
         self.retries = 5
+        self.mgtDetails = mgmtDet
         self.protocol = "http"
         self.asyncTimeout = asyncTimeout
         self.auth = True
@@ -59,11 +61,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/e82fe016/tools/marvin/marvin/cloudstackTestClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py
index 916219c..b3826a7 100644
--- a/tools/marvin/marvin/cloudstackTestClient.py
+++ b/tools/marvin/marvin/cloudstackTestClient.py
@@ -52,8 +52,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 =\
@@ -158,12 +159,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/e82fe016/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 4e7fe82..d4d180e 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/e82fe016/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
                                                 )


Mime
View raw message