Beispiel #1
0
        static void Main(string[] args)
        {
            var s = GenericScanner.GetMachineOs("localhost", "", "", "");

            Console.WriteLine("localhost " + s);

            Console.Write("Done.\nPress any key to exit...");
            Console.ReadKey();
            Console.WriteLine();
        }
        public void AddMachine(string machineName, OperatingSystems operatingSystem, IEnumerable <Kpi> kpis)
        {
            var machine = new Machine(machineName);

            if (operatingSystem == OperatingSystems.Unknown)
            {
                operatingSystem = GenericScanner.GetMachineOs(machineName, User, Password, SshKeyFileName);
            }
            var scanner = ScannerFactory.GetScanner(operatingSystem);

            scanner.Persistence = Persistence;
            scanner.SetKpis(kpis);
            Machines.Add(machine, scanner);
            Log.Debug("Machine {0} added to batch {1}", machineName, Name);
        }