Beispiel #1
0
 /// <summary>
 /// Handles dumping various reports on the EPRs (Hosts and/or EPR Instances).  Can dump all, only the
 /// Used EPRs or only the unused EPRs.  Probably the only useful one is to dump all.
 /// </summary>
 /// <param name="pRep">Report to dump</param>
 /// <param name="pHosts">The Main "actio0n" list of VM's to use for the report</param>
 static void Report(Options.ToolActions pRep, List <HostVM> pHosts)
 {
     foreach (HostVM _vm in pHosts)
     {
         foreach (EPRInstance _epr in _vm.EPRs)
         {
             Console.ForegroundColor = ConsoleColor.DarkGreen;
             Console.Write(_vm.HostName);
             Console.ResetColor();
             Console.Write(" - ");
             Console.ForegroundColor = ConsoleColor.Cyan;
             Console.Write(_epr.IPAddress.ToString());
             Console.ResetColor();
             Console.Write(" :: ");
             if ((_epr.InUse) && (pRep != Options.ToolActions.ListUnused))
             {
                 Console.ForegroundColor = ConsoleColor.Cyan;
                 Console.Write(_epr.Profile);
                 Console.ResetColor();
                 Console.Write(" :: ");
                 Console.ForegroundColor = ConsoleColor.Cyan;
                 Console.WriteLine(_epr.ProtocolString);
                 Console.ResetColor();
                 GenUtils.LogIt(_vm.HostName + " - " + _epr.IPAddress.ToString() + " :: " + _epr.Profile + " :: " + _epr.ProtocolString);
             }
             else
             {
                 Console.ForegroundColor = ConsoleColor.Cyan;
                 Console.WriteLine("Available");
                 Console.ResetColor();
                 GenUtils.LogIt(_vm.HostName + " - " + _epr.IPAddress.ToString() + " :: Available");
             }
         }
     }
     Console.WriteLine("\n\nPress Enter to Exit");
     Console.ReadLine();
 }