예제 #1
0
class SSHCmdExecutor(AbstractCmdExecutor):
    
    def __init__(self, config, cachedir, username, password):
        self.hostname=config.host
        self.username=username
        self.password=password
        self.starter=SSHStarter(hostname=self.hostname, username=self.username, password=self.password, tmp_dir=cachedir)

    def execute(self, command):
        return self.starter.start(command)
예제 #2
0
 def __init__(self, config, cachedir, username, password):
     self.hostname=config.host
     self.username=username
     self.password=password
     self.starter=SSHStarter(hostname=self.hostname, username=self.username, password=self.password, tmp_dir=cachedir)