Ejemplo n.º 1
0
        public void SettersThatSetOnlyForMROrLaterForVersionNewerThanMR()
        {
            Dictionary <string, string> inputData = new Dictionary <string, string>()
            {
                { "WlbVersion", "6.0" },
                { "AutoBalanceEnabled", "false" },
                { "AutoBalancePollIntervals", "0.333333" },
                { "AutoBalanceSeverity", "High" },
                { "AutoBalanceAggressiveness", "High" },
                { "PowerManagementEnabled", "false" },
                { "PowerManagementPollIntervals", "5.321264" },
                { "EnableOptimizationModeSchedules", "false" }                                           //Equal to AutomateOptimizationMode
            };

            validator = new VerifyGettersAndSetters(new WlbPoolConfiguration(inputData));

            MRSensitiveData expectedData = new MRSensitiveData()
            {
                AutoBalanceEnabled           = true,
                AutoBalancePollIntervals     = 2.0,
                AutoBalanceSeverity          = WlbPoolAutoBalanceSeverity.Low,
                AutoBalanceAggressiveness    = WlbPoolAutoBalanceAggressiveness.Medium,
                PowerManagementEnabled       = true,
                PowerManagementPollIntervals = 7.0,
                AutomateOptimizationMode     = true
            };

            validator.Verify(expectedData);
        }
Ejemplo n.º 2
0
        public void SettersThatSetVerbatim()
        {
            Dictionary <string, string> inputData = new Dictionary <string, string>()
            {
                //Simple setters.....
                { "OptimizationMode", "MaximizeDensity" },                                          //PerformanceMode
                { "MetricGroomingPeriod", "2.0" },
                { "RecentMoveMinutes", "2.0" },
                //{"ReportingUseRSServer", "false"},
                { "ReportingSMTPServer", "some string" },
                //These set ranges of values.....
                { "HostCpuThresholdCritical", "3" },
                { "HostMemoryThresholdCritical", "3.0" },
                { "HostPifReadThresholdCritical", "4.0" },                                          //HostNetworkReadThresholdCritical
                { "HostPifWriteThresholdCritical", "5.0" },                                         //HostNetworkWriteThresholdCritical
                { "HostPbdReadThresholdCritical", "6.0" },                                          //HostDiskReadThresholdCritical
                { "HostPbdWriteThresholdCritical", "7.0" },                                         //HostDiskWriteThresholdCritical
                { "VmCpuUtilizationWeightHigh", "8" },
                { "VmMemoryWeightHigh", "9" },
                { "VmDiskReadWeightHigh", "10" },
                { "VmDiskWriteWeightHigh", "11" },
                { "VmNetworkReadWeightHigh", "12" },
                { "VmNetworkWriteWeightHigh", "13" }
            };

            validator = new VerifyGettersAndSetters(new WlbPoolConfiguration(inputData));
            MRInSensitiveData data = new MRInSensitiveData()
            {
                PerformanceMode      = WlbPoolPerformanceMode.MaximizePerformance,
                MetricGroomingPeriod = 5.0,
                RecentMoveMinutes    = 6.0,
                //ReportingUseRSServer = true,
                ReportingSMTPServer               = "who knows what?!",
                HostCpuThresholdCritical          = 1,
                HostMemoryThresholdCritical       = 2,
                HostNetworkReadThresholdCritical  = 1.0,
                HostNetworkWriteThresholdCritical = 2.0,
                HostDiskReadThresholdCritical     = 3.0,
                HostDiskWriteThresholdCritical    = 4.0,
                VmCpuUtilizationWeightHigh        = 5,
                VmMemoryWeightHigh       = 6,
                VmDiskReadWeightHigh     = 7,
                VmDiskWriteWeightHigh    = 8,
                VmNetworkReadWeightHigh  = 9,
                VmNetworkWriteWeightHigh = 10
            };

            validator.Verify(data);
        }
Ejemplo n.º 3
0
        public void SettersThatSetOnlyForMROrLaterForVersionNewerThanMR()
        {

            Dictionary<string, string> inputData =  new Dictionary<string, string>()
                                                        {
                                                            {"WlbVersion", "6.0"},
                                                            {"AutoBalanceEnabled", "false"},
                                                            {"AutoBalancePollIntervals", "0.333333"},
                                                            {"AutoBalanceSeverity", "High"},
                                                            {"AutoBalanceAggressiveness", "High"},
                                                            {"PowerManagementEnabled", "false"},
                                                            {"PowerManagementPollIntervals", "5.321264"},
                                                            {"EnableOptimizationModeSchedules", "false"} //Equal to AutomateOptimizationMode
                                                        };

            validator = new VerifyGettersAndSetters(new WlbPoolConfiguration(inputData));

            MRSensitiveData expectedData = new MRSensitiveData()
                                            {
                                                AutoBalanceEnabled = true,
                                                AutoBalancePollIntervals = 2.0,
                                                AutoBalanceSeverity = WlbPoolAutoBalanceSeverity.Low,
                                                AutoBalanceAggressiveness = WlbPoolAutoBalanceAggressiveness.Medium,
                                                PowerManagementEnabled = true,
                                                PowerManagementPollIntervals = 7.0,
                                                AutomateOptimizationMode = true
                                            };

            validator.Verify( expectedData);

        }
Ejemplo n.º 4
0
        public void SettersThatSetVerbatim()
        {
            Dictionary<string, string> inputData = new Dictionary<string, string>()
                                                       {
                                                           //Simple setters.....
                                                           {"OptimizationMode", "MaximizeDensity"}, //PerformanceMode
                                                           {"MetricGroomingPeriod", "2.0"},
                                                           {"RecentMoveMinutes", "2.0"},
                                                           //{"ReportingUseRSServer", "false"},
                                                           {"ReportingSMTPServer", "some string"},
                                                           //These set ranges of values.....
                                                           {"HostCpuThresholdCritical", "3"},
                                                           {"HostMemoryThresholdCritical", "3.0"},
                                                           {"HostPifReadThresholdCritical", "4.0"}, //HostNetworkReadThresholdCritical
                                                           {"HostPifWriteThresholdCritical", "5.0"}, //HostNetworkWriteThresholdCritical
                                                           {"HostPbdReadThresholdCritical", "6.0"}, //HostDiskReadThresholdCritical
                                                           {"HostPbdWriteThresholdCritical", "7.0"}, //HostDiskWriteThresholdCritical
                                                           {"VmCpuUtilizationWeightHigh", "8"},
                                                           {"VmMemoryWeightHigh", "9"},
                                                           {"VmDiskReadWeightHigh", "10"},
                                                           {"VmDiskWriteWeightHigh", "11"},
                                                           {"VmNetworkReadWeightHigh", "12"},
                                                           {"VmNetworkWriteWeightHigh", "13"}
                                                        };

            validator = new VerifyGettersAndSetters(new WlbPoolConfiguration(inputData));
            MRInSensitiveData data = new MRInSensitiveData()
                                         {
                                             PerformanceMode = WlbPoolPerformanceMode.MaximizePerformance,
                                             MetricGroomingPeriod = 5.0,
                                             RecentMoveMinutes = 6.0,
                                             //ReportingUseRSServer = true,
                                             ReportingSMTPServer = "who knows what?!",
                                             HostCpuThresholdCritical = 1,
                                             HostMemoryThresholdCritical = 2,
                                             HostNetworkReadThresholdCritical = 1.0,
                                             HostNetworkWriteThresholdCritical = 2.0,
                                             HostDiskReadThresholdCritical = 3.0,
                                             HostDiskWriteThresholdCritical = 4.0,
                                             VmCpuUtilizationWeightHigh = 5,
                                             VmMemoryWeightHigh = 6,
                                             VmDiskReadWeightHigh = 7,
                                             VmDiskWriteWeightHigh = 8,
                                             VmNetworkReadWeightHigh = 9,
                                             VmNetworkWriteWeightHigh = 10
                                         };

            validator.Verify(data);
        }