Example #1
0
 public bool Test_1()
 {
     return(DotOneXTemplates.AuthenticationWithAlternateModes(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #2
0
 public bool Test_82997()
 {
     return(DotOneXTemplates.AuthenticationAfterHosebreak(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #3
0
 public bool Test_728595()
 {
     return(DotOneXTemplates.AuthenticationWithLinkSpeed(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #4
0
 public bool Test_82990()
 {
     return(DotOneXTemplates.AuthenticationWithEncryption(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #5
0
 public bool Test_732842()
 {
     return(DotOneXTemplates.AuthenticationWithHostname(ref _activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #6
0
 public bool Test_9()
 {
     return(DotOneXTemplates.AuthenticationAfterColdReset(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #7
0
 public bool Test_13()
 {
     return(DotOneXTemplates.ResetAuthenticationControlPanel(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #8
0
 public bool Test_730310()
 {
     return(DotOneXTemplates.AuthenticationWithDifferentServerCertificates(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #9
0
 public bool Test_82991()
 {
     return(DotOneXTemplates.AuthenticationWithAssociatedIdCertificate(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #10
0
 public bool Test_472710()
 {
     return(DotOneXTemplates.AuthenticationWithFailSafeDisabled(_activityData, CtcUtility.GetTestId().ToString()));
 }
Example #11
0
 public bool Test_670899()
 {
     return(DotOneXTemplates.AuthenticationWithDifferentCertificateStore(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #12
0
 public bool Test_730311()
 {
     return(DotOneXTemplates.ExpiredCertificatesOnServer(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #13
0
 public bool Test_92147()
 {
     return(DotOneXTemplates.ExpiredCertificatesOnPrinter(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #14
0
 public bool Test_82985()
 {
     return(DotOneXTemplates.ValidateAuthentication(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #15
0
 public bool Test_5()
 {
     return(DotOneXTemplates.AuthenticationWithInvalidUserName(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString(), true));
 }
Example #16
0
 public bool Test_730312()
 {
     return(DotOneXTemplates.AuthenticationWithAssociatedIdCertificate(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString(), true));
 }
Example #17
0
 public bool Test_6()
 {
     return(DotOneXTemplates.AuthenticationAfterPowercycle(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #18
0
 public bool Test_730308()
 {
     return(DotOneXTemplates.AuthenticationWithUnTrustedCertificate(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #19
0
 public bool Test_11()
 {
     return(DotOneXTemplates.AuthenticationWithServerID(_activityData, AuthenticationMode.EAPTLS, CtcUtility.GetTestId().ToString()));
 }
Example #20
0
 public bool Test_718501()
 {
     return(DotOneXTemplates.VerifyIPSecBehaviourWithDotOnexConfigurations_Certificates(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString(), true));
 }
Example #21
0
 public bool Test_PrintWithDot1x_IPV6()
 {
     return(DotOneXTemplates.VerifyPrintWithDotoneX(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString(), true));
 }
Example #22
0
 public bool Test_729262()
 {
     return(DotOneXTemplates.VerifyIPSecBehaviourWithDotOnexConfigurations_Peap(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #23
0
 public bool Test_728596()
 {
     return(DotOneXTemplates.ValidateReAuthentication(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #24
0
 public bool Test_576736()
 {
     return(DotOneXTemplates.VerifyDotOnexConfigurationsinFIPS(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #25
0
 public bool Test_714932()
 {
     return(DotOneXTemplates.AuthenticationWithLaa(ref _activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #26
0
 public bool Test_729636()
 {
     return(DotOneXTemplates.AuthenticationWithInvalidCAPowerCycle(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }
Example #27
0
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            CtcSettings.Initialize(executionData);

            // create activity data
            DotOneXActivityData activityData = executionData.GetMetadata <DotOneXActivityData>(CtcMetadataConverter.Converters);
            PrinterFamilies     family       = (PrinterFamilies)Enum.Parse(typeof(PrinterFamilies), activityData.ProductFamily);

            activityData.DotOneXUserName = DOT1X_USERNAME.FormatWith(activityData.RadiusServerType.ToString().ToLower(CultureInfo.CurrentCulture));
            activityData.DotOneXPassword = DOT1X_PASSWORD;
            activityData.SharedSecret    = SHARED_SECRET;
            activityData.PolicyName      = NETWORK_POLICY;

            bool continueTest = true;

            while (continueTest && !NetworkUtil.PingUntilTimeout(IPAddress.Parse(activityData.Ipv4Address), TimeSpan.FromSeconds(30)))
            {
                continueTest = DotOneXTemplates.ShowErrorPopUp("Printer: {0} is not available.\nPlease cold reset the printer.".FormatWith(activityData.Ipv4Address));
            }

            if (!continueTest)
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Printer: {0} is not available.\nPlease cold reset the printer.".FormatWith(activityData.Ipv4Address)));
            }

            // create instance of ews adapter
            EwsWrapper.Instance().Create(family, activityData.ProductName, activityData.Ipv4Address, Path.Combine(activityData.SitemapPath, activityData.SiteMapVersion), BrowserModel.Firefox);

            EwsWrapper.Instance().Start();

            EwsWrapper.Instance().WakeUpPrinter();

            EwsWrapper.Instance().EnableSnmpv1v2ReadWriteAccess();

            SnmpWrapper.Instance().Create(activityData.Ipv4Address);
            SnmpWrapper.Instance().SetCommunityName("public");

            TelnetWrapper.Instance().Create(activityData.Ipv4Address);

            //TODO: Migration issue even thought it is not migration issue why it is commented
            //EwsWrapper.Instance().SetWSDiscovery(true);

            Printer.Printer printer = PrinterFactory.Create(activityData.ProductFamily, activityData.Ipv4Address);
            activityData.MacAddress = printer.MacAddress;

            using (DhcpApplicationServiceClient dhcpClient = DhcpApplicationServiceClient.Create(activityData.DhcpServerIp))
            {
                string scope = dhcpClient.Channel.GetDhcpScopeIP(activityData.DhcpServerIp);
                dhcpClient.Channel.DeleteReservation(activityData.DhcpServerIp, scope, activityData.Ipv4Address, activityData.MacAddress);

                if (dhcpClient.Channel.CreateReservation(activityData.DhcpServerIp, scope, activityData.Ipv4Address, activityData.MacAddress, ReservationType.Both))
                {
                    TraceFactory.Logger.Info("Successfully created reservation for IP address: {0}, Mac address: {1} for {2}".FormatWith(activityData.Ipv4Address, activityData.MacAddress, ReservationType.Both));
                }
                else
                {
                    TraceFactory.Logger.Info("Failed to create reservation for IP address: {0}, Mac address: {1} for {2}".FormatWith(activityData.Ipv4Address, activityData.MacAddress, ReservationType.Both));
                    return(new PluginExecutionResult(PluginResult.Failed, "Failed to create reservation for IP address: {0}, Mac address: {1} for {2}".FormatWith(activityData.Ipv4Address, activityData.MacAddress, ReservationType.Both)));
                }
            }

            if (!ConfigureRadiusServer(activityData))
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Failed to configure radius server"));
            }

            if (!ConfigureSwitch(activityData))
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Failed to configure switch"));
            }

            activityData.SessionId = executionData.SessionId;

            if (null == _tests)
            {
                _tests = new DotOneXTests(activityData);
            }

            // Execute the selected tests
            foreach (int testNumber in activityData.SelectedTests)
            {
                try
                {
                    ExecutionServices.SessionRuntime.AsInternal().WaitIfPaused();
                    _tests.RunTest(executionData, testNumber, IPAddress.Parse(activityData.Ipv4Address), (ProductFamilies)Enum.Parse(typeof(ProductFamilies), activityData.ProductFamily));
                }
                catch (Exception ex)
                {
                    TraceFactory.Logger.Fatal("Error while executing Test:{0} \n".FormatWith(testNumber, ex.Message));
                }
            }

            EwsWrapper.Instance().Stop();

            return(new PluginExecutionResult(PluginResult.Passed));
        }
Example #28
0
 public bool Test_83000()
 {
     return(DotOneXTemplates.AuthenticationWithIpConfigMethodChange(_activityData, AuthenticationMode.PEAP, CtcUtility.GetTestId().ToString()));
 }