private void RunCommandOnSingleTarget(string ip) { UpdateStatusForIp(ip, Status.InProgress); if (!string.IsNullOrWhiteSpace(SelectedPath)) { ISshCommand cmd = new RenziImpl("root", Password); cmd.Upload(SelectedPath, "/", ip); UpdateSshCommandResult(cmd, ip); } else { ISshCommand cmd = new RenziImpl("root", Password); cmd.Run(CmdText, ip); UpdateSshCommandResult(cmd,ip); } }
public void GetIps(String hostName, String command, String rootPassword) { ISshCommand cmd = new RenziImpl("root", rootPassword); cmd.Download("/mnt/cdrom/peerIps.txt", hostName); string ipResults = cmd.Result; if (ipResults != null) { var ipCollection = ParseIps(ipResults); UpdateIpCollection(ipCollection); Log.DebugFormat("Got IPs! IPs are :" + Environment.NewLine + "{0}", ipResults.Trim('\n', '\r')); } }