Пример #1
0
 def get(self, remote_file, local_file):
   code_out_errs = []
   for d in self.downloaders:
     userhost = d.user + "@" + d.host
     code_out_errs.append(call(["scp", "-i", d.login_id, "-P", str(d.port),
                                userhost + ":" + remote_file, local_file]))
   return code_out_errs
Пример #2
0
 def do(self, cmd, run_on_host = None):
   code_out_errs = []
   for d in self.downloaders:
     if run_on_host is not None and not run_on_host(d.host):
       continue
     userhost = d.user + "@" + d.host
     code_out_errs.append(
       call(["ssh", "-i", d.login_id, "-p", str(d.port), userhost, cmd]))
   return code_out_errs
Пример #3
0
 def get(self, remote_file, local_file):
     code_out_errs = []
     for d in self.downloaders:
         userhost = d.user + "@" + d.host
         code_out_errs.append(
             call([
                 "scp", "-i", d.login_id, "-P",
                 str(d.port), userhost + ":" + remote_file, local_file
             ]))
     return code_out_errs
Пример #4
0
 def do(self, cmd, run_on_host=None):
     code_out_errs = []
     for d in self.downloaders:
         if run_on_host is not None and not run_on_host(d.host):
             continue
         userhost = d.user + "@" + d.host
         code_out_errs.append(
             call([
                 "ssh", "-i", d.login_id, "-p",
                 str(d.port), userhost, cmd
             ]))
     return code_out_errs
Пример #5
0
 def compile_projs(self):
   # compile service
   call(["find", ".", "-name", "build", "-exec", "rm", "-rf", "{}", ";"],
        wd=self.bs_repo)
   check_call(["ant", "clean"], wd=self.service_proj)
   check_call(["ant", "main"], wd=self.service_proj)