summaryrefslogtreecommitdiffstats
path: root/SharedModules/Globals/manager.py
diff options
context:
space:
mode:
authorShwetha-H-Panduranga <shwetha@gluster.com>2011-12-06 14:11:13 +0530
committerShwetha-H-Panduranga <shwetha@gluster.com>2011-12-06 14:11:13 +0530
commit18445ae1a94366c955cc7626fb8ec749dedcf73e (patch)
treeaf8b3a9db47f3a472aa4abae4629b517aa71885b /SharedModules/Globals/manager.py
parent5b847067495a65c71c56ad477780ed57e9e0fb2f (diff)
Adding New/Updated Automation Files
Diffstat (limited to 'SharedModules/Globals/manager.py')
-rwxr-xr-xSharedModules/Globals/manager.py64
1 files changed, 64 insertions, 0 deletions
diff --git a/SharedModules/Globals/manager.py b/SharedModules/Globals/manager.py
new file mode 100755
index 0000000..d73cf15
--- /dev/null
+++ b/SharedModules/Globals/manager.py
@@ -0,0 +1,64 @@
+""" manager module contains:
+
+*) ConnectionsManager Class
+"""
+class ConnectionsManager():
+ """
+ *) Manages Client SSH Connections in the current TestEnvironment
+ *) Manages Server SSH Connections in the current TestEnvironment
+ *) Manages allhosts SSH Connection in the current TestEnvironment
+ """
+ def __init__(self):
+
+ self._serverpool = {}
+ self._clientpool = {}
+ self._all = {}
+
+ def addServer(self, key, server):
+ """
+ Add a server to _serverpool
+ """
+
+ self._serverpool[key] = server
+ self._all[key] = server
+ return
+
+ def addClient(self, key, client):
+ """
+ Add a client to clientpool
+ """
+
+ self._clientpool[key] = client
+ self._all[key] = client
+ return
+
+ def getServers(self):
+ """
+ Return the server object
+ """
+
+ return self._serverpool
+
+ def getClients(self):
+ """
+ Return the client object
+ """
+
+ return self._clientpool
+
+ def getConnection(self, key):
+ """
+ """
+ value = None
+ if self._all.has_key(key):
+ value = self._all[key]
+ return value
+
+ def getConnections(self):
+ """
+ """
+ return self._all
+
+
+
+