git://git.onelab.eu
/
tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6ac92ca
)
-added get_path() method
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 8 Apr 2008 18:15:57 +0000
(18:15 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 8 Apr 2008 18:15:57 +0000
(18:15 +0000)
qaapi/qa/Remote.py
patch
|
blob
|
history
diff --git
a/qaapi/qa/Remote.py
b/qaapi/qa/Remote.py
index
67ebb4c
..
46a327a
100644
(file)
--- a/
qaapi/qa/Remote.py
+++ b/
qaapi/qa/Remote.py
@@
-3,8
+3,22
@@
import os
class Remote:
class Remote:
+ def get_path(self):
+ path = ""
+ if 'host' in self and self['host']:
+ if self['host'] not in ['localhost', self.config.hostname, None]:
+ path += "root@host:"
+ if 'vserver' in self and self['vserver']:
+ path += '/vservers/%s/' % self['vserver']
+ if 'chroot' in self and self['chroot']:
+ path += self['chroot'] + os.sep
+ if 'homedir' in self and self['homedir']:
+ path += self['homedir'] + os.sep
+
+ return path
+
def get_command(self, command):
def get_command(self, command):
- options = ""
+ options = "
-o StrictHostKeyChecking=no
"
# Chroot if necessary
if 'chroot' in self and self['chroot']:
command = " chroot %s %s" % (self['chroot'], command)
# Chroot if necessary
if 'chroot' in self and self['chroot']:
command = " chroot %s %s" % (self['chroot'], command)