protected override string SuccessMessagePerPool(Pool pool) { var sb = new StringBuilder(); sb.AppendLine(string.Format(Messages.PATCHINGWIZARD_SINGLEUPDATE_SUCCESS_ONE, GetUpdateName())).AppendLine(); if (!IsAutomaticMode && ManualTextInstructions.ContainsKey(pool)) { sb.Append(ManualTextInstructions[pool]).AppendLine(); } var poolHosts = pool.Connection.Cache.Hosts.ToList(); var livePatchingFailedHosts = new List <Host>(); foreach (var host in SelectedServers) { if (poolHosts.Contains(host) && LivePatchingAttemptedForHost(host) && HostRequiresReboot(host)) { livePatchingFailedHosts.Add(host); } } if (livePatchingFailedHosts.Count == 1) { sb.AppendFormat(Messages.LIVE_PATCHING_FAILED_ONE_HOST, livePatchingFailedHosts[0].Name()).AppendLine(); } else if (livePatchingFailedHosts.Count > 1) { var hostnames = string.Join(", ", livePatchingFailedHosts.Select(h => string.Format("'{0}'", h.Name()))); sb.AppendFormat(Messages.LIVE_PATCHING_FAILED_MULTI_HOST, hostnames).AppendLine(); } return(sb.ToString()); }
protected override string SuccessMessagePerPool(Pool pool) { var sb = new StringBuilder(); sb.AppendLine(string.Format(Messages.PATCHINGWIZARD_SINGLEUPDATE_SUCCESS_ONE, GetUpdateName())).AppendLine(); if (!IsAutomaticMode && ManualTextInstructions.ContainsKey(pool)) { sb.Append(ManualTextInstructions[pool]).AppendLine(); } return(sb.ToString()); }