incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1295346 - in /incubator/tashi/branches/stroucki-accounting/src/tashi: clustermanager/clustermanagerservice.py connectionmanager.py util.py
Date Wed, 29 Feb 2012 23:58:11 GMT
Author: stroucki
Date: Wed Feb 29 23:58:10 2012
New Revision: 1295346

URL: http://svn.apache.org/viewvc?rev=1295346&view=rev
Log:
connectionmanager, clustermanagerservice: provide self-healing communications for clients
in CM and Agent
util: provide username attribute, client still needs it

Modified:
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/util.py

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py?rev=1295346&r1=1295345&r2=1295346&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
Wed Feb 29 23:58:10 2012
@@ -36,7 +36,7 @@ class ClusterManagerService(object):
 		else:
 			self.username = None
 			self.password = None
-		self.proxy = ConnectionManager(self.username, self.password, int(self.config.get('ClusterManager',
'nodeManagerPort')))
+		self.proxy = ConnectionManager(self.username, self.password, int(self.config.get('ClusterManager',
'nodeManagerPort')), authAndEncrypt=self.authAndEncrypt)
 		self.dfs = dfs
 		self.convertExceptions = boolean(config.get('ClusterManagerService', 'convertExceptions'))
 		self.log = logging.getLogger(__name__)

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py?rev=1295346&r1=1295345&r2=1295346&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py Wed Feb 29
23:58:10 2012
@@ -16,14 +16,16 @@
 # under the License.    
 
 from tashi.rpycservices import rpycservices
+from tashi import Connection
 #from tashi.rpycservices.rpyctypes import *
 
 class ConnectionManager(object):
-	def __init__(self, username, password, port, timeout=10000.0):
+	def __init__(self, username, password, port, timeout=10000.0, authAndEncrypt=False):
 		self.username = username
 		self.password = password
 		self.timeout = timeout
 		self.port = port
+		self.authAndEncrypt = authAndEncrypt
 	
 	def __getitem__(self, hostname):
 		port = self.port
@@ -31,4 +33,4 @@ class ConnectionManager(object):
 			port = hostname[1]
 			hostname = hostname[0]
 
-		return rpycservices.client(hostname, port, username=self.username, password=self.password)
+		return Connection(hostname, port, credentials=(self.username, self.password), authAndEncrypt=self.authAndEncrypt)

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/util.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/util.py?rev=1295346&r1=1295345&r2=1295346&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/util.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/util.py Wed Feb 29 23:58:10 2012
@@ -276,6 +276,10 @@ class Connection:
 		self.credentials = credentials
 		self.authAndEncrypt = authAndEncrypt
 		self.connection = None
+		# XXXstroucki some thing may still depend on this (client)
+		self.username = None
+		if credentials is not None:
+			self.username = credentials[0]
 
 	def __connect(self):
 		# create new connection



Mime
View raw message