How to use the pyats.tcl.q.set function in pyats

To help you get started, we’ve selected a few pyats examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tgn_config_post_device_config = int(self.device.tgn_config_post_device_config) # loadTGNAfterRouterConfig
        tgn_profile_snapshot_threshold = int(self.device.tgn_profile_snapshot_threshold) # TGNWaitForRefRateMinutes
        tgn_routing_threshold = self.device.tgn_routing_threshold # waitAfterTGNRouting
        self.tgn_arp_wait_time = int(self.device.tgn_arp_wait_time)

        # Set user configured values
        # --------------------------
        tcl.q.set('test_params(useTGN)', tgn_enable)
        tcl.q.set('test_params(TGNEnableARP)', tgntcl_enable_arp)
        tcl.q.set('test_params(loadTGNAfterRouterConfig)', tgn_config_post_device_config)
        tcl.q.set('test_params(waitAfterTGNRouting)', tgn_routing_threshold)
        tcl.q.set('test_params(TGNWaitConvergence)', tgn_traffic_convergence_threshold)
        tcl.q.set('test_params(TGNWaitTimeNoTrafficMs)', tgn_traffic_loss_recovery_threshold)
        tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
        tcl.q.set('test_params(TGNtIndex)', 3)
        tcl.q.set('test_params(TGNStatisticsSet)', '')
        tcl.q.set('test_params(TGNPortStatisticsSet)', '')

        # Build TGN_KEY structure for TCL procs
        # -------------------------------------
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Address', address)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Controller', controller)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Handle', handle)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.portList', port_list)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Type', tgn_type)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionFile', self.config)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionAlreadyUp', session_up)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionLabel', tgn_type)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tgn_routing_threshold = self.device.tgn_routing_threshold # waitAfterTGNRouting
        self.tgn_arp_wait_time = int(self.device.tgn_arp_wait_time)

        # Set user configured values
        # --------------------------
        tcl.q.set('test_params(useTGN)', tgn_enable)
        tcl.q.set('test_params(TGNEnableARP)', tgntcl_enable_arp)
        tcl.q.set('test_params(loadTGNAfterRouterConfig)', tgn_config_post_device_config)
        tcl.q.set('test_params(waitAfterTGNRouting)', tgn_routing_threshold)
        tcl.q.set('test_params(TGNWaitConvergence)', tgn_traffic_convergence_threshold)
        tcl.q.set('test_params(TGNWaitTimeNoTrafficMs)', tgn_traffic_loss_recovery_threshold)
        tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tgn_first_sample_threshold = self.device.tgn_first_sample_threshold * 1000 # TGNWaitBeforeFirstSample
        tgntcl_learn_after_n_samples = self.device.tgntcl_learn_after_n_samples # TGNLearnExcessAfterNSamples
        tgn_disable_traffic_post_execution = int(self.device.tgn_disable_traffic_post_execution) # TGNStopTraffic
        tgn_traffic_loss_recovery_threshold = self.device.tgn_traffic_loss_recovery_threshold * 1000 # TGNWaitTimeNoTrafficMs
        tgn_traffic_loss_tolerance_percentage = self.device.tgn_traffic_loss_tolerance_percentage # trafficLossPercentageTolerance
        tgn_enable_traffic_loss_check = int(self.device.tgn_enable_traffic_loss_check) # checkTrafficLoss
        tgntcl_stream_sample_rate_percentage = self.device.tgntcl_stream_sample_rate_percentage # TGNThreshold
        tgntcl_wait_multiplier = self.device.tgntcl_wait_multiplier # TGNWaitMultiplier
        tgn_config_post_device_config = int(self.device.tgn_config_post_device_config) # loadTGNAfterRouterConfig
        tgn_profile_snapshot_threshold = int(self.device.tgn_profile_snapshot_threshold) # TGNWaitForRefRateMinutes
        tgn_routing_threshold = self.device.tgn_routing_threshold # waitAfterTGNRouting
        self.tgn_arp_wait_time = int(self.device.tgn_arp_wait_time)

        # Set user configured values
        # --------------------------
        tcl.q.set('test_params(useTGN)', tgn_enable)
        tcl.q.set('test_params(TGNEnableARP)', tgntcl_enable_arp)
        tcl.q.set('test_params(loadTGNAfterRouterConfig)', tgn_config_post_device_config)
        tcl.q.set('test_params(waitAfterTGNRouting)', tgn_routing_threshold)
        tcl.q.set('test_params(TGNWaitConvergence)', tgn_traffic_convergence_threshold)
        tcl.q.set('test_params(TGNWaitTimeNoTrafficMs)', tgn_traffic_loss_recovery_threshold)
        tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
        tcl.q.set('test_params(TGNtIndex)', 3)
        tcl.q.set('test_params(TGNStatisticsSet)', '')
        tcl.q.set('test_params(TGNPortStatisticsSet)', '')

        # Build TGN_KEY structure for TCL procs
        # -------------------------------------
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Address', address)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Controller', controller)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Handle', handle)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.portList', port_list)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Type', tgn_type)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tcl.q.set('test_params(TGNWaitConvergence)', tgn_traffic_convergence_threshold)
        tcl.q.set('test_params(TGNWaitTimeNoTrafficMs)', tgn_traffic_loss_recovery_threshold)
        tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
        tcl.q.set('test_params(TGNtIndex)', 3)
        tcl.q.set('test_params(TGNStatisticsSet)', '')
        tcl.q.set('test_params(TGNPortStatisticsSet)', '')

        # Build TGN_KEY structure for TCL procs
        # -------------------------------------
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Address', address)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Controller', controller)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Handle', handle)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
        tcl.q.set('test_params(TGNtIndex)', 3)
        tcl.q.set('test_params(TGNStatisticsSet)', '')
        tcl.q.set('test_params(TGNPortStatisticsSet)', '')

        # Build TGN_KEY structure for TCL procs
        # -------------------------------------
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Address', address)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Controller', controller)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Handle', handle)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.portList', port_list)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Type', tgn_type)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionFile', self.config)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionAlreadyUp', session_up)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionLabel', tgn_type)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)
        tcl.q.set('test_params(TGNfIndex)', 0)
        tcl.q.set('test_params(TGNiIndex)', 1)
        tcl.q.set('test_params(TGNeIndex)', 2)
        tcl.q.set('test_params(TGNtIndex)', 3)
        tcl.q.set('test_params(TGNStatisticsSet)', '')
        tcl.q.set('test_params(TGNPortStatisticsSet)', '')

        # Build TGN_KEY structure for TCL procs
        # -------------------------------------
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Address', address)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Controller', controller)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Handle', handle)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.portList', port_list)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.Type', tgn_type)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionFile', self.config)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionAlreadyUp', session_up)
        tcl.q.keylset('test_params(TGN_KEY)', 'Session1.SessionLabel', tgn_type)
github CiscoTestAutomation / genielibs / pkgs / conf-pkg / src / genie / libs / conf / device / statictgn / connection.py View on Github external
tgntcl_wait_multiplier = self.device.tgntcl_wait_multiplier # TGNWaitMultiplier
        tgn_config_post_device_config = int(self.device.tgn_config_post_device_config) # loadTGNAfterRouterConfig
        tgn_profile_snapshot_threshold = int(self.device.tgn_profile_snapshot_threshold) # TGNWaitForRefRateMinutes
        tgn_routing_threshold = self.device.tgn_routing_threshold # waitAfterTGNRouting
        self.tgn_arp_wait_time = int(self.device.tgn_arp_wait_time)

        # Set user configured values
        # --------------------------
        tcl.q.set('test_params(useTGN)', tgn_enable)
        tcl.q.set('test_params(TGNEnableARP)', tgntcl_enable_arp)
        tcl.q.set('test_params(loadTGNAfterRouterConfig)', tgn_config_post_device_config)
        tcl.q.set('test_params(waitAfterTGNRouting)', tgn_routing_threshold)
        tcl.q.set('test_params(TGNWaitConvergence)', tgn_traffic_convergence_threshold)
        tcl.q.set('test_params(TGNWaitTimeNoTrafficMs)', tgn_traffic_loss_recovery_threshold)
        tcl.q.set('test_params(TGNWaitForRefRateMinutes)', tgn_profile_snapshot_threshold)
        tcl.q.set('test_params(TGNWaitBeforeFirstSample)', tgn_first_sample_threshold)
        tcl.q.set('test_params(TGNMinWaitForReferenceRate)', tgn_reference_rate_threshold)
        tcl.q.set('test_params(TGNThreshold)', tgntcl_stream_sample_rate_percentage)
        tcl.q.set('test_params(checkTrafficLoss)', tgn_enable_traffic_loss_check)
        tcl.q.set('test_params(trafficLossPercentageTolerance)', tgn_traffic_loss_tolerance_percentage)
        tcl.q.set('test_params(TGNStopTraffic)', tgn_disable_traffic_post_execution)
        tcl.q.set('test_params(TGNLearnExcessAfterNSamples)', tgntcl_learn_after_n_samples)
        tcl.q.set('test_params(TGNWaitMultiplier)', tgntcl_wait_multiplier)

        # Set default values
        # ------------------
        tcl.q.set('test_params(TGNWaitInterval)', 1)
        tcl.q.set('test_params(TGNReportWorstStreams)', 0)
        tcl.q.set('test_params(TGNFeaturePatternMatch)', '{}')
        tcl.q.set('test_params(TGNretries)', 10)
        tcl.q.set('test_params(TGNarpTimeout)', 0)
        tcl.q.set('test_params(TGNarpInterval)', 0)