private Task <string> RemoteCopyBinaries(string host) { //var source_dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var t = Task.Run(() => { return(GammaFSUtility.RemoteCopyFiles(host, Source_location, Target_location)); }); t.GetAwaiter().OnCompleted(() => { OnOpCompleted(new OpResultArgs() { OpResult = t.Result, Hostname = host, OpType = "copy service file" }); }); return(t); }
private void VerifyNodes() { var err_list = new List <string>(); foreach (var host in Hosts) { if (!host.ToLower().Contains(localhost.ToLower())) { var rs = GammaFSUtility.NetUse(host, Domain, Username, Password, Target_location.Trim().ToCharArray()[0]); if (rs.Contains("error")) { err_list.Add(host); OnOpCompleted(new OpResultArgs() { Hostname = host, OpResult = "net use fails, will not be configured", OpType = "net use setup" }); } } } Hosts = Hosts.Except(err_list).ToList(); }