コード例 #1
0
        /// <summary>
        /// Returns the current status for a hypervisor hosting one or more cluster nodes.
        /// </summary>
        /// <param name="host">The node being queried.</param>
        /// <returns>The status.</returns>
        private string GetHostStatus(SetupNodeStatus host)
        {
            // We mark completed steps with a "[x] " or "[!] " prefix and
            // indent non-completed steps status with four blanks.

            if (host.Status.StartsWith("[x] ") || host.Status.StartsWith("[!] "))
            {
                return(host.Status);
            }
            else
            {
                return("    " + host.Status);
            }
        }
コード例 #2
0
        //---------------------------------------------------------------------
        // Code that writes the cluster status to the Console.

        /// <summary>
        /// Returns the current status for a node.
        /// </summary>
        /// <param name="stepNodeNames">The set of node names participating in the current step.</param>
        /// <param name="node">The node being queried.</param>
        /// <returns>The status.</returns>
        private string GetStatus(HashSet <string> stepNodeNames, SetupNodeStatus node)
        {
            if (false && stepNodeNames != null && !stepNodeNames.Contains(node.Name))
            {
                return("  -");
            }
            else
            {
                // We mark completed steps with a "[x] " or "[!] " prefix and
                // indent non-completed steps status with four blanks.

                if (node.Status.StartsWith("[x] ") || node.Status.StartsWith("[!] "))
                {
                    return(node.Status);
                }
                else
                {
                    return("    " + node.Status);
                }
            }
        }