summaryrefslogtreecommitdiffstats
path: root/func/minion
diff options
context:
space:
mode:
authorJohn Eckersberg <jeckersb@redhat.com>2008-01-20 10:21:30 -0500
committerJohn Eckersberg <jeckersb@redhat.com>2008-01-20 10:21:30 -0500
commit4c33d7b726bea55a4cfbd4e5034041a8ed8416f1 (patch)
tree16f6d3aa008507b6c443b89b39b9ace0cae94f60 /func/minion
parent6672a2c6d04f4e5322be3127af42899dc8af4405 (diff)
downloadfunc-4c33d7b726bea55a4cfbd4e5034041a8ed8416f1.tar.gz
func-4c33d7b726bea55a4cfbd4e5034041a8ed8416f1.tar.xz
func-4c33d7b726bea55a4cfbd4e5034041a8ed8416f1.zip
common module used by all netapp modules (just ssh currently)
Diffstat (limited to 'func/minion')
-rw-r--r--func/minion/modules/netapp/common.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/func/minion/modules/netapp/common.py b/func/minion/modules/netapp/common.py
new file mode 100644
index 0000000..53d46d6
--- /dev/null
+++ b/func/minion/modules/netapp/common.py
@@ -0,0 +1,14 @@
+import subprocess
+
+SSH = '/usr/bin/ssh'
+
+def ssh(user, host, command):
+ cmd = subprocess.Popen([SSH, "%s@%s" % (user, host), command],
+ executable=SSH,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ shell=False)
+
+ (out, err) = cmd.communicate()
+ return out