You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2014/05/08 12:43:35 UTC

git commit: updated refs/heads/master to e69a94b

Repository: cloudstack
Updated Branches:
  refs/heads/master 807b6d2c4 -> e69a94b61


Fixed few issues for userapiclient and port issue

Signed-off-by: santhosh <sa...@gmail.com>
Signed-off-by: Koushik Das <ko...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e69a94b6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e69a94b6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e69a94b6

Branch: refs/heads/master
Commit: e69a94b61ee160532d660165e8b715f0f3f83ea9
Parents: 807b6d2
Author: santhosh <sa...@gmail.com>
Authored: Thu May 8 16:30:33 2014 +1000
Committer: Koushik Das <ko...@apache.org>
Committed: Thu May 8 16:13:18 2014 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/cloudstackTestClient.py | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e69a94b6/tools/marvin/marvin/cloudstackTestClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py
index 0e4837e..13d920e 100644
--- a/tools/marvin/marvin/cloudstackTestClient.py
+++ b/tools/marvin/marvin/cloudstackTestClient.py
@@ -124,7 +124,8 @@ class CSTestClient(object):
             '''
             Step1 : Create a CS Connection Object
             '''
-            self.__csConnection = CSConnection(self.__mgmtDetails,
+            mgmt_details = self.__mgmtDetails
+            self.__csConnection = CSConnection(mgmt_details,
                                                self.__asyncTimeOut,
                                                self.__logger)
 
@@ -137,7 +138,7 @@ class CSTestClient(object):
             Step3:  If API Key is not provided as part of Management Details,
                     then verify and register
             '''
-            if self.__mgmtDetails.apiKey is None:
+            if mgmt_details.apiKey is None:
                 list_user = listUsers.listUsersCmd()
                 list_user.account = "admin"
                 list_user_res = self.__apiClient.listUsers(list_user)
@@ -152,7 +153,6 @@ class CSTestClient(object):
                 if api_key is None:
                     ret = self.__getKeys(user_id)
                     if ret != FAILED:
-                        mgmt_details = self.__mgmtDetails
                         mgmt_details.apiKey = ret[0]
                         mgmt_details.securityKey = ret[1]
                     else:
@@ -309,7 +309,7 @@ class CSTestClient(object):
         try:
             if not self.isAdminContext():
                 return self.__apiClient
-
+            mgmt_details = self.__mgmtDetails
             listDomain = listDomains.listDomainsCmd()
             listDomain.listall = True
             listDomain.name = DomainName
@@ -353,21 +353,20 @@ class CSTestClient(object):
             if apiKey is None:
                 ret = self.__getKeys(userId)
                 if ret != FAILED:
-                    mgtDetails = self.__mgmtDetails
-                    mgtDetails.apiKey = ret[0]
-                    mgtDetails.securityKey = ret[1]
+                    mgmt_details.apiKey = ret[0]
+                    mgmt_details.securityKey = ret[1]
                 else:
                     self.__logger.error("__createUserApiClient: "
                                         "User API Client Creation."
                                         " While Registering User Failed")
                     return FAILED
             else:
-                mgtDetails = self.__mgmtDetails
-                mgtDetails.apiKey = apiKey
-                mgtDetails.securityKey = securityKey
+                mgmt_details.port = 8080
+                mgmt_details.apiKey = apiKey
+                mgmt_details.securityKey = securityKey
 
             newUserConnection =\
-                CSConnection(mgtDetails,
+                CSConnection(mgmt_details,
                              self.__csConnection.asyncTimeout,
                              self.__csConnection.logger)
             self.__userApiClient = CloudStackAPIClient(newUserConnection)