taf.testlib.Ixia

Submodules

taf.testlib.Ixia.BGP

BGP.py

IxNetwork BGP protocol emulation functionality

Note

TCL procedures:

::ixia::emulation_bgp_config
::ixia::emulation_bgp_control
::ixia::emulation_bgp_info
::ixia::emulation_bgp_route_config
class taf.testlib.Ixia.BGP.BGP(ixia)[source]

Bases: object

IxNet BGP configuration wrapper.

__init__(ixia)[source]

BGP class initialization.

Parameters:ixia (IxiaHLTMixin) – Ixia traffic generator
configure_neighbour(port, *args, **kwargs)[source]

Configure BGP neighbors.

Parameters:port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
Raises:AssertionError – error in executing tcl code
Returns:Neighbour handler names
Return type:dict

Note

See description of keyword arguments in ixia_bgp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_bgp_api.tcl

configure_route(*args, **kwargs)[source]

Create a route range associated with neighbor.

Raises:AssertionError – error in executing tcl code
Returns:Route handler names
Return type:dict

Note

See description of keyword arguments in ixia_bgp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_bgp_api.tcl

control(*args, **kwargs)[source]

Turning BGP on/off, enabling statistics.

Raises:AssertionError – error in executing tcl code
Returns:None

Note

See description of keyword arguments in ixia_bgp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_bgp_api.tcl

emulation_bgp_info(*args, **kwargs)[source]

Command to retrieve BGP statistics.

Raises:AssertionError – error in executing tcl code
Returns:BGP statistics
Return type:dict

Note

See description of keyword arguments in ixia_bgp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_bgp_api.tcl

taf.testlib.Ixia.ixia_fixtures

ixia_fixtures.py

Useful Ixia related fixture functions/patterns for TAF

class taf.testlib.Ixia.ixia_fixtures.QTRun(request, tg)[source]

Bases: object

Run Ixia QuickTest.

__init__(request, tg)[source]

Initialize QTRun class.

Parameters:
  • request (pytest.request) – pytest request
  • tg (Environment instance) – Ixia TG object
Raises:
Returns:

None

_load_cfg()[source]

Loading ixncfg file.

Returns:None
run(qt_name=None, qt_id=None, pdf=True)[source]

Execute QT and wait for result.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (str) – QuickTest id
  • pdf (bool) – Enable/Disable PDF report
Returns:

Path to results

Return type:

list

taf.testlib.Ixia.ixia_helpers

ixia_helpers.py

Helpers functions for Ixia environment

taf.testlib.Ixia.ixia_helpers.get_tcl_client_info(dst_file=None, tcl_srv_ip=None, tcl_srv_usr=None, tcl_srv_pass=None)[source]

Get local or remote Tcl client version info.

Parameters:
  • dst_file (str) – Path to file to be written
  • tcl_srv_ip (str) – Tcl server IP address
  • tcl_srv_usr (str) – Tcl server user
  • tcl_srv_pass (str) – Tcl user password
Returns:

Tcl client info

Return type:

str

taf.testlib.Ixia.ixia_helpers.ixload_import(tcl_object)[source]

Import IxLoad package.

Parameters:tcl_object (Tkinter.Tcl) – Tcl interpreter
Returns:None

Notes

IxTclHal package should be already imported

taf.testlib.Ixia.ixia_helpers.ixtclhal_import(tcl_object)[source]

Import IxTclHal package

Parameters:tcl_object (Tkinter.Tcl) – Tcl interpreter
Returns:None
taf.testlib.Ixia.ixia_helpers.tcl_puts_replace(tcl_interpret)[source]

Replace original tcl puts function with new tcl_puts function for logging tcl output

Parameters:tcl_interpret (Tkinter.Tcl) – Tcl interpreter
Returns:None

taf.testlib.Ixia.IxiaHAL

IxiaHAL.py

TAF Ixia traffic generator based on IxTclHal API

class taf.testlib.Ixia.IxiaHAL.IxiaHALMixin(config, opts)[source]

Bases: object

IXIA interaction base class.

DEFAULT_MAX_SNIFF_TIME = 3600
_IxiaHALMixin__connect()

Logs in to IXIA and takes ports ownership.

Raises:
Returns:

None

_IxiaHALMixin__disconnect(mode='fast')

Logs out from IXIA and clears ports ownership.

Parameters:mode (str) – Type of mode to execute
Raises:AssertionError – error in executing tcl code
Returns:None
__init__(config, opts)[source]

Initializes connection to IXIA.

Parameters:
  • config (dict) – Configuration information
  • opts (OptionParser) – py.test config.option object which contains all py.test cli options
_check_increment(increment, name)[source]

Verify that representation of increment is correct.

Parameters:
  • increment (tuple(int)) – Increment in format tuple(step, count)
  • name (str) – Name of increment
Raises:

TypeError – Incorrect type of parameters.

Returns:

Step and count.

Return type:

tuple

_configure_arp(payload, chassis, card, port)[source]

Configure ARP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

ARP payload, Tcl commands.

Return type:

tuple

_configure_icmp(payload, chassis, card, port)[source]

Configure ICMP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

ICMP payload, Tcl commands.

Return type:

tuple

_configure_igmp(payload, chassis, card, port)[source]

Configure IGMP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

IGMP payload, Tcl commands.

Return type:

tuple

_configure_ip(payload, chassis, card, port)[source]

Configure IP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

IP payload, Tcl commands.

Return type:

tuple

_configure_tcp(payload, chassis, card, port)[source]

Configure TCP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

TCP payload, Tcl commands.

Return type:

tuple

_configure_udp(payload, chassis, card, port)[source]

Configure UDP layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

UDP payload, Tcl commands.

Return type:

tuple

_configure_vlan(payload, vlan_type, chassis, card, port, vlan_increment, in_vlan_increment, continuous)[source]

Configure Dot1Q layer.

Parameters:
  • payload (pypacker.Packet) – Packet to analyze
  • vlan_type (hex) – VLAN type
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
  • vlan_increment (tuple) – VLAN increment parameters for tagged packet
  • in_vlan_increment (tuple) – Inner vlan ID increment parameters for double tagged frames
  • continuous (bool) – Should stream be sent continuously or not
Returns:

Dot1Q payload, Tcl commands.

Return type:

tuple

_convert_iface(iface)[source]

Convert representation of TG port from tuple to string.

Parameters:iface (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
Returns:Representation of TG port in format {chassisID cardId portId}
Return type:str
_disable_stream(chassis, card, port, ix_stream_id)[source]

Disable Ixia stream.

Parameters:
  • chassis (int) – Chassis id
  • card (int) – Card id
  • port (int) – Port id
  • ix_stream_id (int) – Stream id
Returns:

None

_enable_stream(chassis, card, port, ix_stream_id)[source]

Enable Ixia stream.

Parameters:
  • chassis (int) – Chassis id
  • card (int) – Card id
  • port (int) – Port id
  • ix_stream_id (int) – Stream id
Returns:

None

static _get_port_info(iface)[source]

Simple helper which allows to get interface info split.

Parameters:iface (str) – Which IXIA interface to use for packet sending (in format “{chassis_id card_id port_id}”)
Returns:[chassis_id, card_id, port_id]
Return type:list(str)
static _get_port_to_string(iface)[source]

Simple helper which allows to get string representation for interface.

Parameters:iface (list) – Which IXIA interface to use for packet sending (in format [chassis_id, card_id, port_id])
Returns:“chassis_id/card_id/port_id”
Return type:str
_get_version()[source]

Get Ixia version.

Returns:Version of product
Return type:str
_init_tcl()[source]

Initialize Tcl interpreter.

Returns:None
_reset_ports()[source]

Reset TG ports configuration.

Raises:AssertionError – error in executing tcl code
Returns:None
_set_filter_params(layer)[source]

Configures filter parameters for specified layer.

Parameters:layer (str) – Layer name.
Returns:Tcl command.
Return type:str
_set_increments(packet, sa_increment, da_increment, sip_increment, dip_increment, arp_sa_increment, arp_sip_increment, igmp_ip_increment, lldp_sa_increment, sudp_increment, dudp_increment, stcp_increment, dtcp_increment, vlan_increment, continuous, required_size, eth_type_increment, dscp_increment, protocol_increment, sipv6_increment, dipv6_increment, fl_increment, dhcp_si_increment, in_vlan_increment, tc_increment, nh_increment, isis_lspid_increment, chassis, card, port, force_errors)[source]

Set stream increments.

Parameters:
  • packet (pypacker.Packet) – Packet to analyze
  • sa_increment (tuple) – Source MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • da_increment (tuple) – Destination MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • sip_increment (tuple) – Source IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • dip_increment (tuple) – Destination IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • arp_sa_increment (tuple) – Source MAC increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sip_increment.
  • arp_sip_increment (tuple) – Source IP increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sa_increment.
  • igmp_ip_increment (tuple) – Destination IP increment parameters for IGMP packet. Tuple (<step>, <count>).
  • lldp_sa_increment (tuple) – Source MAC increment parameters for LLDP packet. Tuple (<step>, <count>).
  • sudp_increment (tuple) – UDP source port increment parameters.
  • dudp_increment (tuple) – UDP destination port increment parameters.
  • stcp_increment (tuple) – source TCP address increment
  • dtcp_increment (tuple) – destination TCP address increment
  • vlan_increment (tuple) – VLAN increment parameters for tagged packet. Tuple (<step>, <count>).
  • continuous (bool) – Should stream be sent continuously or not. Continuous streams have to be started using start_streams method.
  • required_size (int or tuple) – Integer or tuple of parameters needed to be set when packet size should be incremented . Tuple examples: (‘Increment’, <step>, <min>, <max>), (‘Random’, <min>, <max>)
  • dscp_increment (tuple) – DSCP increment parameters.
  • protocol_increment (tuple) – IP protocol incrementation..
  • sipv6_increment (tuple) – Source IPv6 increment parameters.
  • dipv6_increment (tuple) – Destination IPv6 increment parameters.
  • fl_increment (tuple) – Flow label increment parameters.
  • dhcp_si_increment (tuple) – DHCP IP increment parameters.
  • in_vlan_increment (tuple) – Inner vlan ID increment parameters for double tagged frames. Tuple (<step>, <count>).
  • tc_increment (tuple) – IPv6 traffic class increment parameters.
  • nh_increment (tuple) – Next header increment parameters.
  • eth_type_increment (tuple) – Ethernet frame type increment parameters.
  • isis_lspid_increment (tuple) – Dot3|LLC|ISIS_LSP LSP ID field increment parameters.
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
  • force_errors (str) – Emulate Errors for configured stream. Enum (“bad” /*streamErrorBadCRC, “none” /*streamErrorNoCRC, “dribble” /*streamErrorDribble, “align” /*streamErrorAlignment)
Returns:

Tcl commands.

Return type:

list

Notes

For increments description see set_stream method().

_set_ixia_stream(packet, count, inter, rate, sa_increment, da_increment, sip_increment, dip_increment, arp_sa_increment, arp_sip_increment, igmp_ip_increment, lldp_sa_increment, sudp_increment, dudp_increment, stcp_increment, dtcp_increment, vlan_increment, continuous, required_size, iface, chassis, card, port, stream_id, eth_type_increment, dscp_increment, protocol_increment, sipv6_increment, dipv6_increment, fl_increment, dhcp_si_increment, in_vlan_increment, tc_increment, nh_increment, isis_lspid_increment, cont_burst, force_errors, udf_dependancies)[source]

Set traffic stream with specified parameters on specified TG port.

Parameters:
  • packet (pypacker.Packet) – Packet to analyze
  • count (int) – How many packets to send in a stream.
  • inter (int) – Interval between sending each packet.
  • rate (int) – Interface rate in percents.
  • continuous (bool) – Should stream be sent continuously or not. Continuous streams have to be started using start_streams method.
  • iface (str, tuple) – Interface to use for packet sending (type depends on particular tg ports type).
  • required_size (int, tuple) – Integer or tuple of parameters needed to be set when packet size should be incremented. Tuple examples: (‘Increment’, <step>, <min>, <max>), (‘Random’, <min>, <max>)
  • sa_increment (tuple) – Source MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • da_increment (tuple) – Destination MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • sip_increment (tuple) – Source IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • dip_increment (tuple) – Destination IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • arp_sa_increment (tuple) – Source MAC increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sip_increment.
  • arp_sip_increment (tuple) – Source IP increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sa_increment.
  • igmp_ip_increment (tuple) – Destination IP increment parameters for IGMP packet. Tuple (<step>, <count>).
  • lldp_sa_increment (tuple) – Source MAC increment parameters for LLDP packet. Tuple (<step>, <count>).
  • vlan_increment (tuple) – VLAN increment parameters for tagged packet. Tuple (<step>, <count>).
  • sudp_increment (tuple) – UDP source port increment parameters.
  • dudp_increment (tuple) – UDP destination port increment parameters.
  • eth_type_increment (tuple) – Ethernet frame type increment parameters.
  • dscp_increment (tuple) – DSCP increment parameters.
  • protocol_increment (tuple) – IP protocol incrementation..
  • sipv6_increment (tuple) – Source IPv6 increment parameters.
  • dipv6_increment (tuple) – Destination IPv6 increment parameters.
  • fl_increment (tuple) – Flow label increment parameters.
  • dhcp_si_increment (tuple) – DHCP IP increment parameters.
  • in_vlan_increment (tuple) – Inner vlan ID increment parameters for double tagged frames. Tuple (<step>, <count>).
  • tc_increment (tuple) – IPv6 Traffic Class increment parameters.
  • nh_increment (tuple) – IPv6 Next Header increment parameters.
  • cont_burst (bool) – Should stream be sent as continuous burst or not. Continuous streams have to be started using start_streams method.
  • force_errors (str) – Emulate Errors for configured stream. Enum (“bad” /*streamErrorBadCRC, “none” /*streamErrorNoCRC, “dribble” /*streamErrorDribble, “align” /*streamErrorAlignment).
  • udf_dependancies (dict) – Set UDF dependencies in case one incerement is dependant from another. Dictionary {<dependant_increment> : <initial_increment>}
  • chassis (int) – TG chassis id
  • card (int) – TG card id
  • port (int) – TG port id
Returns:

stream id

Return type:

int

Notes

It’s not expected to configure a lot of incrementation options. Different traffic generator could have different limitations for these options.

Example:

stream_id_1 = tg.set_stream(pack_ip, count=100, iface=iface)
stream_id_2 = tg.set_stream(pack_ip, continuous=True, inter=0.1, iface=iface)
stream_id_3 = tg.set_stream(pack_ip_udp, count=5, protocol_increment=(3, 5), iface=iface)
stream_id_4 = tg.set_stream(pack_ip_udp, count=18, sip_increment=(3, 3), dip_increment=(3, 3), iface=iface,
                            udf_dependancies={'sip_increment': 'dip_increment'})
_set_ixia_udf_field(udf_id=1, initval='1', offset=24, bit_offset=0, counter_type='c32', step=1, count=1, continuous=False)[source]

Setup Ixia stream UDF.

Parameters:
  • udf_id (int) – UDF id
  • initval (str) – Initial value
  • offset (int) – offset value
  • bit_offset (int) – bit_offset value
  • counter_type (str) – number of bits to increment
  • step (int) – increment step
  • count (int) – increment count
  • continuous (bool) – continuous increment
Returns:

Tcl commands.

Return type:

list

_set_udf_dependence(key, value)[source]

Set UDF dependencies.

Parameters:
  • key (str) – increment name, e.g “vlan_increment”, “sipv6_increment”
  • value (str) – increment name, e.g “vlan_increment”, “sipv6_increment”
Returns:

Tcl commands

Return type:

list

_transmit_stream(chassis, card, port, ix_stream_id)[source]

Transmit Ixia stream.

Parameters:
  • chassis (int) – Chassis id
  • card (int) – Card id
  • port (int) – Port id
  • ix_stream_id (int) – Stream id
Raises:
  • AssertionError – error in executing tcl code
  • IxiaException – Link is down
Returns:

None

check()[source]

Check if TG object is alive and ready for processing.

Returns:None or raise and exception.
class_logger = None
cleanup(mode='complete')[source]

This method should do Ixia ports cleanup (remove streams etc).

Parameters:mode (str) – “fast” or “complete”. If mode == “fast”, method does not clear streams on the port, but stops them (str).
Returns:None or raise and exception.
clear_statistics(sniff_port_list)[source]

Clear statistics - number of frames.

Parameters:sniff_port_list (list) – List of interface names.
Returns:None
clear_streams()[source]

Stop and clear all traffic streams.

connect()[source]

Logs in to IXIA and takes ports ownership.

Raises:
Returns:

None

connect_port(iface)[source]

Simulate port link connecting (set it to admin up etc).

Parameters:iface (str) – Interface to connect.
Raises:NotImplementedError – not implemented
Returns:None or raise and exception.
create()[source]

Perform all necessary procedures to initialize TG device and prepare it for interaction.

Returns:None or raise and exception.

Notes

Method has to check –get_only option. Set of steps to configure TG device is related to particular TG type.

destroy()[source]

Perform all necessary procedures to uninitialize TG device.

Returns:None or raise and exception.

Notes

Method has to check –get_only and –leave_on options. Set of steps to unconfigure TG device is related to particular TG type. Method has to clear all connections and stop all captures and data streams.

disconnect(mode='fast')[source]

Logs out from IXIA and clears ports ownership.

Parameters:mode (str) – Type of mode to execute
Raises:AssertionError – error in executing tcl code
Returns:None
disconnect_port(iface)[source]

Simulate port link disconnecting (set it to admin down etc).

Parameters:iface (str) – Interface to disconnect.
Raises:NotImplementedError – not implemented
Returns:None or raise and exception.
get_filtered_frames_count(iface)[source]

Read statistics - number of received frames which fit filter criteria.

Parameters:iface (str) – Interface name.
Returns:Number of filtered frames.
Return type:int
get_port_qos_rxrate(iface, qos)[source]

Return port receiving rate for specific qos.

Parameters:
  • iface (str) – Interface name.
  • qos (int) – Qos value.
Returns:

Frames per second (int)

Return type:

int

get_port_rxrate(iface)[source]

Return port receiving rate.

Parameters:iface (str) – Interface name.
Returns:Frames per second.
Return type:int
get_port_txrate(iface)[source]

Return port transmission rate.

Parameters:iface (str) – Interface name.
Returns:Frames per second.
Return type:int
get_qos_frames_count(iface, prio)[source]

Get captured QoS frames count.

Parameters:
  • iface (str) – Interface name.
  • prio (int) – Priority.
Returns:

captured QoS frames count.

Return type:

int

get_received_frames_count(iface)[source]

Read statistics - number of received valid frames.

Parameters:iface (str) – Interface name.
Returns:Number of received frames.
Return type:int
get_sent_frames_count(iface)[source]

Read statistics - number of sent frames.

Parameters:iface (str) – Interface name.
Returns:Number of sent frames.
Return type:int
get_uds_3_frames_count(iface)[source]

Read statistics - number of non-filtered received frames (valid and invalid).

Parameters:iface (str) – Interface name.
Returns:Number of received frames
Return type:int
sanitize()[source]

This method has to clear all stuff which can cause device inconsistent state after exit or unexpected exception.

Notes

E.g. clear connections, stop threads. This method is called from pytest.softexit

send_stream(stream_id=None)[source]

Sends the stream created by ‘set_stream’ method.

Parameters:stream_id (int) – ID of the stream to be send.
Returns:timestamp.
Return type:float
set_flow_control(iface, mode)[source]

Enable/Disable flow control on the port.

Parameters:
  • iface (str) – Interface name.
  • mode (bool) – True/False.
Returns:

None

set_qos_stat_type(iface, ptype)[source]

Set the QoS counters to look for priority bits for given packets type.

Parameters:
  • iface (str) – Interface name.
  • ptype (str) – Priority type: VLAN/IP.
Returns:

None

set_stream(packet_def=None, count=1, inter=0, rate=99, sa_increment=None, da_increment=None, sip_increment=None, dip_increment=None, is_valid=False, arp_sa_increment=None, arp_sip_increment=None, igmp_ip_increment=None, lldp_sa_increment=None, vlan_increment=None, sudp_increment=None, dudp_increment=None, stcp_increment=None, dtcp_increment=None, continuous=False, iface=None, adjust_size=True, required_size=64, fragsize=None, build_packet=True, eth_type_increment=None, dscp_increment=None, protocol_increment=None, sipv6_increment=None, dipv6_increment=None, fl_increment=None, dhcp_si_increment=None, in_vlan_increment=None, tc_increment=None, nh_increment=None, isis_lspid_increment=None, cont_burst=False, force_errors=None, udf_dependancies=None)[source]

Set traffic stream with specified parameters on specified TG port.

Parameters:
  • packet_def (tuple(dict{dict})) – Packet definition. Tuple of dictionaries of dictionaries in format: ({layerX: {field1: value, field2: value}, {layerY: {field1:value, fieldN: value}})
  • count (int) – How many packets to send in a stream.
  • inter (int) – Interval between sending each packet.
  • rate (int) – Interface rate in percents.
  • continuous (bool) – Should stream be sent continuously or not. Continuous streams have to be started using start_streams method.
  • iface (str, tuple) – Interface to use for packet sending (type depends on particular tg ports type).
  • adjust_size (bool) – See description for _build_pypacker_packet function.
  • required_size (int, tuple) – Integer or tuple of parameters needed to be set when packet size should be incremented. Tuple examples: (‘Increment’, <step>, <min>, <max>), (‘Random’, <min>, <max>)
  • fragsize (int) – Max size of packet’s single frame
  • is_valid (bool) – Recalculate check sum and length for each packet layer (by default pypacker do this automatically in case length and check sum aren’t set). This parameter has to be set True with all incrementation parameters.
  • build_packet (bool) – Build packet from definition or use already built pypacker packet.
  • sa_increment (tuple) – Source MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • da_increment (tuple) – Destination MAC increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • sip_increment (tuple) – Source IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • dip_increment (tuple) – Destination IPv4 increment parameters. Tuple (<step>, <count>). Use count=0 for continuous increment.
  • arp_sa_increment (tuple) – Source MAC increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sip_increment.
  • arp_sip_increment (tuple) – Source IP increment parameters for ARP packet. Tuple (<step>, <count>). Has to be used in pair with arp_sa_increment.
  • igmp_ip_increment (tuple) – Destination IP increment parameters for IGMP packet. Tuple (<step>, <count>).
  • lldp_sa_increment (tuple) – Source MAC increment parameters for LLDP packet. Tuple (<step>, <count>).
  • vlan_increment (tuple) – VLAN increment parameters for tagged packet. Tuple (<step>, <count>).
  • sudp_increment (tuple) – UDP source port increment parameters.
  • dudp_increment (tuple) – UDP destination port increment parameters.
  • eth_type_increment (tuple) – Ethernet frame type increment parameters.
  • dscp_increment (tuple) – DSCP increment parameters.
  • protocol_increment (tuple) – IP protocol incrementation..
  • sipv6_increment (tuple) – Source IPv6 increment parameters.
  • dipv6_increment (tuple) – Destination IPv6 increment parameters.
  • fl_increment (tuple) – Flow label increment parameters.
  • dhcp_si_increment (tuple) – DHCP IP increment parameters.
  • in_vlan_increment (tuple) – Inner vlan ID increment parameters for double tagged frames. Tuple (<step>, <count>).
  • tc_increment (tuple) – IPv6 Traffic Class increment parameters.
  • nh_increment (tuple) – IPv6 Next Header increment parameters.
  • cont_burst (bool) – Should stream be sent as continuous burst or not. Continuous streams have to be started using start_streams method.
  • force_errors (str) – Emulate Errors for configured stream. Enum (“bad” /*streamErrorBadCRC, “none” /*streamErrorNoCRC, “dribble” /*streamErrorDribble, “align” /*streamErrorAlignment).
  • udf_dependancies (dict) – Set UDF dependencies in case one incerement is dependant from another. Dictionary {<dependant_increment> : <initial_increment>}
  • stcp_increment (tuple) – source TCP address increment
  • dtcp_increment (tuple) – destination TCP address increment
Returns:

stream id

Return type:

int

Notes

It’s not expected to configure a lot of incrementation options. Different traffic generator could have different limitations for these options.

Example:

stream_id_1 = tg.set_stream(pack_ip, count=100, iface=iface)
stream_id_2 = tg.set_stream(pack_ip, continuous=True, inter=0.1, iface=iface)
stream_id_3 = tg.set_stream(pack_ip_udp, count=5, protocol_increment=(3, 5), iface=iface)
stream_id_4 = tg.set_stream(pack_ip_udp, count=18, sip_increment=(3, 3), dip_increment=(3, 3), iface=iface,
                            udf_dependancies={'sip_increment': 'dip_increment'})
start_sniff(ifaces, sniffing_time=None, packets_count=0, filter_layer=None, src_filter=None, dst_filter=None)[source]

Starts sniffing on specified interfaces.

Parameters:
  • ifaces (list) – List of TG interfaces for capturing.
  • sniffing_time (int) – Time in seconds for sniffing.
  • packets_count (int) – Count of packets to sniff (no count limitation in case 0).
  • filter_layer (str) – Name of predefined sniffing filter criteria.
  • src_filter (str) – Sniff only packet with defined source MAC.
  • dst_filter (str) – Sniff only packet with defined destination MAC.
Returns:

None

Notes

This method introduces additional 1.5 seconds timeout after capture enabling. It’s required by Ixia sniffer to wait until capturing is started.

Example:

env.tg[1].start_sniff(['eth0', ], filter_layer='IP', src_filter='00:00:00:01:01:01', dst_filter='00:00:00:22:22:22')
start_streams(stream_list)[source]

Enable and start streams from the list simultaneously.

Parameters:stream_list (list[int]) – List of stream IDs.
Returns:None
stop_all_streams()[source]

Stop streams for all owned ports. ownedPortList variable creates on connect stage.

Raises:AssertionError – error in executing tcl code
Returns:None
stop_sniff(ifaces, force=False, drop_packets=False, sniff_packet_count=1000)[source]

Stops sniffing on specified interfaces and returns captured data.

Parameters:
  • ifaces (list) – List of interfaces where capturing has to be stopped.
  • force (bool) – Stop capturing even if time or packet count criteria isn’t achieved.
  • drop_packets (bool) – Don’t return sniffed data (used in case you need just read statistics).
  • sniff_packet_count (int) – Default number of packets to return (used to avoid test hanging in case storm).
Returns:

Dictionary where key = interface name, value = list of sniffed packets.

Return type:

dict

stop_streams(stream_list=None)[source]

Disable streams from the list.

Parameters:stream_list (list[int]) – Stream IDs to stop. In case stream_list is not set all running streams will be stopped.
Returns:None
tcl(cmd)[source]

Log end execute tcl code.

Parameters:cmd (str) – Tcl command
Returns:Result of execution
Return type:str

taf.testlib.Ixia.IxiaHLT

IxiaHLT.py

Python wrapper to IxNetworkTcl and HLTAPI Ixia modules

class taf.testlib.Ixia.IxiaHLT.IxiaHLTMixin(*args, **kwargs)[source]

Bases: taf.testlib.Ixia.IxiaHLT.IxiaMapper

IxNetwork interaction base class.

_IxiaHLTMixin__connect()

Perform connection to IxTcl and IxTclNetwork servers.

Raises:IxiaException – Connection error
Returns:None
_IxiaHLTMixin__disconnect(mode='fast')

Perform session cleanup.

Parameters:mode (str) – Type of mode to execute
Raises:IxiaException – Cleanup error.
Returns:None
_IxiaHLTMixin__init_protos()

Load protocol modules.

Returns:None
__init__(*args, **kwargs)[source]

Initialize IxiaHLTMixin class.

check()[source]

Check if TG object is alive and ready for processing.

Returns:None or raise and exception.
cleanup(mode='fast')[source]

This method should do Ixia ports cleanup (remove streams etc).

Parameters:mode (str) – “fast” or “complete”. If mode == “fast”, method does not clear streams on the port, but stops them.
Returns:None or raise and exception.
connect()[source]

Perform connection to IxTcl and IxTclNetwork servers.

Raises:IxiaException – Connection error
Returns:None
copy_local_file(local_path, remote_path)[source]

Copy file from local host to IxNetwork host.

Parameters:
  • local_path (str) – Local path to file
  • remote_path (str) – Remote path to file
Returns:

Result of execution.

Return type:

str

copy_remote_file(remote_path, local_path)[source]

Copy file from IxNetwork host to local host.

Parameters:
  • remote_path (str) – Remote path to file
  • local_path (str) – Local path to file
Returns:

Result of execution.

Return type:

str

create()[source]

Perform all necessary procedures to initialize TG device and prepare it for interaction.

Returns:None or raise and exception.

Notes

Method has to check –get_only option. Set of steps to configure TG device is related to particular TG type.

destroy()[source]

Perform all necessary procedures to uninitialize TG device.

Returns:None or raise and exception.

Note

Method has to check –get_only and –leave_on options. Set of steps to unconfigure TG device is related to particular TG type. Method has to clear all connections and stop all captures and data streams.

disconnect(mode='fast')[source]

Perform session cleanup.

Parameters:mode (str) – Type of mode to execute
Raises:IxiaException – Cleanup error.
Returns:None
iface_config(port, *args, **kwargs)[source]

Wrapper to Ixia ::ixia::interface_config function.

Parameters:port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
Raises:AssertionError – error in executing tcl code.
Returns:None
iface_update()[source]

Dynamically update list of assigned ports.

Returns:None
load_ixncfg(ixncfg_file)[source]

Load IxNetwork configuration.

Parameters:ixncfg_file (str) – Path to ixia configuration file
Raises:IxiaException – Load error
Returns:None
sanitize()[source]

This method has to clear all stuff which can cause device inconsistent state after exit or unexpected exception.

Note

E.g. clear connections, stop threads. This method is called from pytest.softexit

set_port_list(port_list=None)[source]

Set port_list variable in tcl namespace.

Parameters:port_list (list) – List of TG ports
Returns:None
traffic_config(*args, **kwargs)[source]

Wrapper to Ixia ::ixia::traffic_config function.

Raises:AssertionError – error in executing tcl code.
Returns:None
traffic_control(*args, **kwargs)[source]

Wrapper to Ixia ::ixia::traffic_control function.

Raises:AssertionError – error in executing tcl code.
Returns:None
traffic_stats(port, *args, **kwargs)[source]

Wrapper to Ixia ::ixia::traffic_stats function.

Parameters:port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
Raises:AssertionError – error in executing tcl code
Returns:None
traffic_stats_traffic_items(ti, *args, **kwargs)[source]

Wrapper to Ixia ::ixia::traffic_stats function.

Parameters:ti (str) – Traffic item
Raises:AssertionError – error in executing tcl code.
Returns:None

Note

This version is for traffic item stats.

vlan_traffic_stats(ports)[source]

Gets per-port stats and returns per-vlan flow stats.

Parameters:ports (dict) – TG port in format dict({id:(chassis, card, port)})
Returns:dictionary of combined rx and tx statistics for the same flow_name
Return type:dict
class taf.testlib.Ixia.IxiaHLT.IxiaMapper(config, opts)[source]

Bases: object

Tcl to Python functions mapper.

_IxiaMapper__ixia_tcl_wrapper(method, *args, **kwargs)

Execute tcl ::ixia::method.

Parameters:method (str) – Method name
Returns:Result of execution.
Return type:str
_IxiaMapper__register_methods()

Register all Ixia.tcl methods.

Returns:None
__init__(config, opts)[source]

Initialize IxiaMapper class.

Parameters:
  • config (dict) – Configuration information
  • opts (OptionParser) – py.test config.option object which contains all py.test cli options
_init_tcl()[source]

Initialize Tcl interpreter.

Returns:None
check_return_code()[source]

Check if ERROR is in return_code.

Returns:Error message or empty string.
Return type:str
class_logger = None
get_var(var_name)[source]

Get variable value string representation from tcl namespace.

Parameters:var_name (str) – Variable name
Returns:Value of variable.
Return type:str
puts(expr)[source]

Call tcl puts method.

Parameters:expr (str) – Expression
Returns:None
set_var(**kwargs)[source]

Set variable in tcl namespace.

Returns:None
tcl(code)[source]

Log end execute tcl code.

Parameters:code (str) – Tcl command
Returns:Result of execution.
Return type:str
class taf.testlib.Ixia.IxiaHLT.QuickTests(tcl)[source]

Bases: object

Class to represent IxNetwork QuickTests.

__init__(tcl)[source]

Initialize QuickTests class.

Parameters:tcl (Tkinter.Tcl) – Tcl interpreter
analyze_result(qt_name, qt_id, tc_name)[source]

Analyze QuickTest run status.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
  • tc_name (str) – test case name
Raises:

AssertionError – QuickTest is failed/Report is not generated.

Returns:

Result of execution.

Return type:

dict

class_logger = <logging.LoggerAdapter object>
copy_local_file(local_path, remote_path)

Copy file from local host to IxNetwork host.

Parameters:
  • local_path (str) – Local path to file
  • remote_path (str) – Remote path to file
Returns:

Result of execution.

Return type:

str

copy_remote_file(remote_path, local_path)

Copy file from IxNetwork host to local host.

Parameters:
  • remote_path (str) – Remote path to file
  • local_path (str) – Local path to file
Returns:

Result of execution.

Return type:

str

download_logs(r_path, l_path)[source]

Download QuickTest run logs.

Parameters:
  • r_path (str) – Path to report
  • l_path (str) – Name of logs directory to be written
Raises:

OSError – Error on folder creation.

Returns:

None

load_tclist()[source]

Loading list of QuickTests.

Returns:None
report(pdf=False)[source]

Enable/Disable report options.

Parameters:pdf (bool) – Enable/Disable PDF report
Returns:None
run(qt_name, qt_id, tc_name=None)[source]

Run QuickTest until completion.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
  • tc_name (str) – test case name
Returns:

Result of execution.

Return type:

dict

start(qt_name, qt_id)[source]

Start QuickTest without waiting for result.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
Returns:

Result of execution

Return type:

str

wait(qt_name, qt_id, tc_name=None)[source]

Wait for QuickTest to complete.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
  • tc_name (str) – test case name
Returns:

Result of execution.

Return type:

dict

taf.testlib.Ixia.IxLoad

IxLoad.py

IxLoad specific functionality

class taf.testlib.Ixia.IxLoad.IxLoad(config, opts)[source]

Bases: object

IXIA interaction base class.

__init__(config, opts)[source]

Initializes connection to IxLoad.

Parameters:
  • config (dict) – IxLoad related part of environment configuration
  • opts (OptionParser) – py.test config.option object which contains all py.test cli options
check()[source]

Check if TG object is alive and ready for processing

Returns:None or raise and exception.
class_logger = None
cleanup(mode='complete')[source]

This method should do IxLoad config cleanup.

Parameters:mode (str) – “fast” or “complete”. Not implemented
Returns:None
connect()[source]

Logs in to IXIA and takes ports ownership.

Returns:None
copy_local_file(local_path, remote_path)[source]

Copy local file to IxLoad host.

Parameters:
  • local_path (str) – Local path to file
  • remote_path (str) – Remote path to file
Returns:

None

create()[source]

Perform all necessary procedures to initialize TG device and prepare it for interaction.

Returns:None or raise and exception.

Notes

Method has to check –get_only option. Set of steps to configure TG device is related to particular TG type.

destroy()[source]

Perform all necessary procedures to uninitialize TG device.

Returns:None or raise and exception.

Note

Method has to check –get_only and –leave_on options. Set of steps to unconfigure TG device is related to particular TG type. Method has to clear all connections and stop all captures and data streams.

disconnect()[source]

Logs out from IXIA and clears ports ownership.

Returns:None
load_repo(repo=None)[source]

Loading rxf repo file or create new one.

Parameters:repo (str) – Repository name
Returns:None
logger_setup()[source]

Enable IxLoad logger.

Returns:None
sanitize()[source]

This method has to clear all stuff which can cause device inconsistent state after exit or unexpected exception.

Note

E.g. clear connections, stop threads. This method is called from pytest.softexit

tcl(cmd)[source]

Log end execute tcl code.

Parameters:cmd (str) – Tcl script
Returns:Result of execution
Return type:str
class taf.testlib.Ixia.IxLoad.IxLoadTests(tcl, res_path='')[source]

Bases: object

Class for managing IxLoad Tests.

cleanup()[source]

Cleanup list of IxLoad Tests.

Returns:None
load_tclist()[source]

Loading list of IxLoad Tests.

Returns:None
report(pdf=False)[source]

Enable/Disable report options.

Parameters:pdf (bool) – Enable/Disable PDF report
Returns:None
run(t_name, res_path=None)[source]

Run ixLoad test until completion.

Parameters:
  • t_name (str) – test case name
  • res_path (str) – Path to result
Returns:

Path to report

Return type:

str

start(t_name)[source]

Start ixLoad test without waiting for result.

Parameters:t_name (str) – test case name
Returns:None
class taf.testlib.Ixia.IxLoad.QuickTests(tcl)[source]

Bases: object

Class for managing QuickTests.

__init__(tcl)[source]

Initialize QuickTests class.

Parameters:tcl (Tkinter.Tcl) – Tcl interpreter
load_tclist()[source]

Loading list of QuickTests.

Returns:None
report(pdf=False)[source]

Enable/Disable report options.

Parameters:pdf (bool) – Enable/Disable PDF report
Returns:None
run(qt_name, qt_id)[source]

Run QuickTest until completion.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
Returns:

Result of execution

Return type:

str

start(qt_name, qt_id)[source]

Start QuickTest without waiting for result.

Parameters:
  • qt_name (str) – QuickTest name
  • qt_id (int) – QuickTest id
Returns:

Result of execution

Return type:

str

taf.testlib.Ixia.IxLoadHL

IxLoadHL.py

IxLoad HL API

class taf.testlib.Ixia.IxLoadHL.IxLoadHL(config, opts)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadTclAPI, taf.testlib.Ixia.IxLoadHL.IxLoadHelpersMixin

check()[source]
class_logger = <logging.LoggerAdapter object>
cleanup(mode='complete')[source]

This method should do IxLoad config cleanup.

Parameters:mode (str) – “fast” or “complete”. Not implemented.
create()[source]

Obligatory class for entry_type = tg.

create_test()[source]
create_trafficelement()[source]
destroy()[source]

Obligatory class for entry_type = tg.

new_testcontroller()[source]
sanitize()[source]

Clear ownership before exit.

set_chassischain(chassis_list)[source]
class taf.testlib.Ixia.IxLoadHL.IxLoadHelpersMixin[source]

Bases: object

The cass contains helpers methods for IxLoad configuration.

DNS_CFG = {'_Stale': False, 'timeout': 30, 'domain': ''}
GRAT_ARP_CFG = {'rateControlEnabled': False, '_Stale': False, 'enabled': True, 'forwardGratArp': False, 'maxFramesPerSecond': 0}
IP_RANGE_CFG = {'_Stale': False, 'mss': 1460, 'autoMacGeneration': True, 'gatewayIncrementMode': 'perSubnet', 'prefix': 24, 'count': 64, 'autoCountEnabled': False, 'randomizeAddress': False, 'ipType': 'IPv4', 'generateStatistics': False, 'gatewayAddress': '192.168.0.1', 'incrementBy': '0.0.0.1', 'gatewayIncrement': '0.0.0.0', 'ipAddress': '192.168.0.101', 'enabled': True, 'enableGatewayArp': False}
MAC_RANGE_CFG = {'mtu': 1500, '_Stale': False, 'mac': '00:C0:A8:00:65:00', 'incrementBy': '00:00:00:00:00:01', 'count': 64, 'enabled': True}
RRSEED_RANGE = (268435456, 2147483648)
TCP_CFG = {'tcp_vegas_beta': 6, 'llm_hdr_gap_ns': 10, 'tcp_rto_min': 200, 'tcp_sack': True, '_Stale': False, 'tcp_port_max': 65535, 'tcp_rmem_min': 4096, 'ip_no_pmtu_disc': True, 'tcp_syn_retries': 5, 'tcp_ecn': False, 'tcp_ipfrag_time': 30, 'llm_hdr_gap': 8, 'tcp_keepalive_intvl': 75, 'tcp_keepalive_probes': 9, 'delayed_acks': True, 'tcp_retrans_collapse': True, 'tcp_fack': True, 'tcp_tw_recycle': True, 'tcp_max_tw_buckets': 180000, 'tcp_max_syn_backlog': 1024, 'tcp_retries1': 3, 'tcp_rto_max': 120000, 'tcp_timestamps': True, 'tcp_tw_reuse': False, 'tcp_vegas_gamma': 2, 'tcp_low_latency': 0, 'tcp_frto': 0, 'tcp_westwood': 0, 'tcp_vegas_alpha': 2, 'disable_min_max_buffer_size': True, 'tcp_fin_timeout': 60, 'tcp_vegas_cong_avoid': 0, 'tcp_bic_low_window': 14, 'tcp_max_orphans': 8192, 'inter_packet_delay': 0, 'tcp_rmem_default': 4096, 'tcp_no_metrics_save': False, 'tcp_moderate_rcvbuf': 0, 'tcp_keepalive_time': 7200, 'tcp_abort_on_overflow': False, 'tcp_mem_low': 24576, 'tcp_bic_fast_convergence': 1, 'tcp_rfc1337': False, 'tcp_dsack': True, 'tcp_wmem_min': 4096, 'bestPerfSettings': False, 'tcp_adv_win_scale': 2, 'udp_port_randomization': False, 'tcp_port_min': 1024, 'accept_ra_default': False, 'delayed_acks_timeout': 0, 'tcp_reordering': 3, 'tcp_wmem_max': 262144, 'tcp_rmem_max': 262144, 'accept_ra_all': False, 'tcp_orphan_retries': 0, 'tcp_app_win': 31, 'delayed_acks_segments': 0, 'tcp_wmem_default': 4096, 'tcp_tw_rfc1323_strict': False, 'tcp_window_scaling': False, 'tcp_stdurg': False, 'tcp_mem_pressure': 32768, 'tcp_retries2': 5, 'tcp_mem_high': 49152, 'tcp_synack_retries': 5, 'tcp_bic': 0}
VLAN_RANGE_CFG = {'incrementStep': 1, 'innerEnable': False, 'innerIncrement': 1, 'innerPriority': 1, 'firstId': 1, 'innerFirstId': 1, '_Stale': False, 'uniqueCount': 4094, 'increment': 1, 'innerUniqueCount': 4094, 'enabled': False, 'innerTpid': '0x8100', 'idIncrMode': 2, 'innerIncrementStep': 1, 'priority': 1, 'tpid': '0x8100'}
add_ip_ranges(ip, ipr=None, macr=None, vlanr=None)[source]

Create and add IP(and lower MAC/VLAN) ranges to TG IP object.

Parameters:
  • ip – TG IP plugin object.
  • ipr – IP range.
  • macr – MAC range.
  • vlanr – Vlan range.
config_ethernet(network, **ethcfg)[source]

Performs standard L1 configuration for network object.

Parameters:
  • network (str) – RouteInterface network
  • ethcfg (kwargs) – configuration params for network object
  • elm (dict) – Optional ELM params (dict)
  • phy (dict) – Optional Phy params (dict)
config_http_client(http_client, sustain_time, objective_value, objective_type, dst, page_name)[source]

Config standard HTTP Client.

config_http_server(http_server, page_list=None)[source]

Perform standard HTTP server configuration.

config_network(network, name, tcp=None, grat_arp=None, dns=None, nsettings=None, nfilter=None)[source]

Configure ARP, TCP, DNS default network settings.

get_stat_files(res_path, dst_path, file_list, silent=False)[source]

Get stat files from IxLoad host.

Parameters:
  • res_path (str) – Origin folder.
  • dst_path (str) – Destination folder.
  • file_list (list[str]) – List of files to be copied.
  • silent (bool) – If True then an exception won’t be raised in case files aren’t downloaded.
wait_test_start(res_path, temp_dir=None, timeout=180, interval=10, file_list=None)[source]

Wait until test is started.

Note

Method will wait until report file is appear.

taf.testlib.Ixia.IxLoadTclAPI

IxLoadTclAPI.py

IxLoad Tcl API wrapper module

class taf.testlib.Ixia.IxLoadTclAPI.IxLoadChassisChain(tcl, ipaddr=None)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixChassisChain'
NAME = 'chassisChain'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadCookieObject(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'CookieObject'
NAME = 'CookieObject'
append_cookiecontent(cookiecontent)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadCustomPayloadObject(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'CustomPayloadObject'
NAME = 'CustomPayloadObject'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadDestinationForActivity(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'DestinationForActivity'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin(tcl)[source]

Bases: object

IXLOAD_CLASS = None
TCL_VARS = ''
clear(target)[source]
config(**kwargs)[source]
get_free_name()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadHTTPClient(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'HTTPClient'
add_command(**kwargs)[source]
add_header(data)[source]
append_agent_actionlist(agent_action)[source]
append_agent_headerlist(agent_header)[source]
config_agent(**kwargs)[source]
config_percentagecmdlist(**kwargs)[source]
config_timeline(**kwargs)[source]
init()[source]
modify_objectivevalue(value)[source]
new_timeline()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadHTTPServer(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'HTTPServer'
add_pageobject(response='200', **kwargs)[source]
add_payload(**kwargs)[source]
append_cookielist(cookie)[source]
append_pageobject(page)[source]
append_payloadlist(payload)[source]
append_responseheaderlist(responseheader)[source]
config_agent(**kwargs)[source]
config_timeline(**kwargs)[source]
init()[source]
new_response(code='200')[source]
new_timeline()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadIPRMacRange(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'MAC_R'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadIPRVlanIdRange(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'VLAN_R'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadNetTrafficNetwork(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'NetTrafficNetwork'
append_portlist(port)[source]
clear_plugins()[source]
new_l1plugin()[source]
new_plugin(plugin)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadNetworkL1Plugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'Ethernet'
init()[source]
new_l2plugin()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadPageObject(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'PageObject'
NAME = 'PageObject'
response = None
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadResponseHeader(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ResponseHeader'
NAME = 'RespondHeader'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadSETkDutBasic(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'DUT'
new_cfg_packetswitch()[source]
new_cfg_vip()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadSETkNetTraffic(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'Traffic_Network'
PORTOPERMODE = {'ThroughputAcceleration': 'kOperationModeThroughputAcceleration'}
config_traffic()[source]
get_activitydst(*args)[source]
new_activity(activity)[source]
new_network()[source]
set_activityendpoint(iprange, activity, activity_type, enable)[source]
set_portopermode(mode)[source]
set_tcpaccel(mode)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadScenario(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'Scenario'
append_columnlist(column)[source]
new_traffic_column()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadScenarioElementFactory(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'scenarioElementFactory'
create_dut()[source]
create_nettraffic()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadScenarioFactory(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'scenarioFactory'
create_scenario()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadStats[source]

Bases: list

Custom list class to support columns header names.

add_header(header)[source]
get(row_num=-1, col_names=None)[source]
headers = None
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadTclAPI(ipaddr, user)[source]

Bases: object

IxLoad Tcl API base wrapper class.

__init__(ipaddr, user)[source]

Initializes connection to IxLoad.

Parameters:
  • ipaddr (str) – IxLoad host IP address.
  • user (str) – IxLoad windows user.
class_logger = <logging.LoggerAdapter object>
connect()[source]

Logs in to IXIA and takes ports ownership.

Returns:None
copy_local_file(local_path, remote_path)[source]

Copy local file to IxLoad host.

copy_remote_file(remote_path, local_path)[source]

Copy remote file from IxLoad host to local host.

disconnect()[source]

Logs out from IXIA and clears ports ownership.

Returns:None
get_stats(stype='file')[source]
load_plugin(plugin)[source]
load_repo(repo=None)[source]

Loading rxf repo file or create new one.

logger_delete()[source]
logger_setup()[source]
retrieve_results(dst_path)[source]

Retrieve result csv files from IxLoad host to local dst_path.

tcl(cmd)[source]

Tcl wrapper.

update_stats(stype='file', stat_name=None)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadTestController(tcl, tcl_interpret, root_path='', res_path=None)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'testController'
apply(test)[source]
check_testexecution()[source]
class_logger = <logging.LoggerAdapter object>
cleanup()[source]
clear_stats()[source]
get_testserverhandle()[source]
run_test(test, test_name=None, stats=None)[source]
set_resultdir(root_path=None, res_dir=None)[source]
set_statcollector()[source]
status()[source]
stop(force=False)[source]
wait_test()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadTestServerHandle(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'TestServerHandle'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadTests(tcl, test_controller, res_path='')[source]

Bases: object

Class for managing IxLoad Tests.

cleanup()[source]
load_tclist()[source]

Loading list of IxLoad Tests.

report(pdf=False)[source]

Enable/Disable report options.

run(t_name, res_path=None)[source]

Run ixLoad test until completion.

start(t_name)[source]

Start ixLoad test without waiting for result.

class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixAdvancedIteration(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixAdvancedIteration'
NAME = 'ixAdvancedIteration'
add_segment(**kwargs)[source]
append_segmentlist(segment)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixCookieContent(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixCookieContent'
NAME = 'ixCookieContent'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixDutConfigPacketSwitch(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixDutConfigPacketSwitch'
NAME = 'ixDutConfigPacketSwitch'
add_networkrange(dst, **kwargs)[source]
append_networkrangelist(dst, networkrange)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixDutConfigVip(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixDutConfigVip'
NAME = 'ixDutConfigVip'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixDutNetworkRange(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixDutNetworkRange'
NAME = 'ixDutNetworkRange'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixEventHandlerSettings(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixEventHandlerSettings'
NAME = 'ixEventHandlerSettings'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixHttpCommand(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixHttpCommand'
NAME = 'ixHttpCommand'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixHttpHeaderString(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixHttpHeaderString'
NAME = 'ixHttpHeaderString'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixLinearTimeSegment(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixLinearTimeSegment'
NAME = 'Linear_Segment'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixMatchLongestTimeline(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixMatchLongestTimeline'
NAME = 'Timeline_Match_Longest'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetDnsPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetDnsPlugin'
NAME = 'DNS'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetDualPhyPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetDualPhyPlugin'
NAME = 'ixNetDualPhyPlugin'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetEthernetELMPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetEthernetELMPlugin'
NAME = 'ixNetEthernetELMPlugin'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetFilterPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetFilterPlugin'
NAME = 'Filter'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetGratArpPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetGratArpPlugin'
NAME = 'GratARP'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetIpV4V6Plugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetIpV4V6Plugin'
NAME = 'IP'
append_iprange(ip_range)[source]
new_distgroup()[source]
new_range()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetIpV4V6Range(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetIpV4V6Range'
NAME = 'IP_R'
get_macrange()[source]
get_vlanidrange()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetIxLoadSettingsPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetIxLoadSettingsPlugin'
NAME = 'Settings'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetL2EthernetPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetL2EthernetPlugin'
NAME = 'MAC_VLAN'
new_ipplugin()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetRangeGroup(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetRangeGroup'
NAME = 'DistGroup'
append_range(iprange)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixNetTCPPlugin(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixNetTCPPlugin'
NAME = 'TCP'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixTest(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixTest'
NAME = 'ixTest'
get_profiledir()[source]
get_scenario()[source]
get_scenarioelementfactory()[source]
get_scenariofactory()[source]
get_sessionspecificdata(_type)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixTestProfileDirectory(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'profileDirectory'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixTestSessionSpecificData(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'SessionSpecificData'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixTimeline(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixTimeline'
NAME = 'Timeline'
new_iteration()[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixTrafficColumn(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixTrafficColumn'
NAME = 'ixTrafficColumn'
append_elementlist(element)[source]
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadixViewOptions(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

IXLOAD_CLASS = 'ixViewOptions'
NAME = 'ixViewOptions'
class taf.testlib.Ixia.IxLoadTclAPI.IxLoadstatCollectorUtils(tcl)[source]

Bases: taf.testlib.Ixia.IxLoadTclAPI.IxLoadGenericObjectMixin

NAME = 'NS'
clear()[source]
init_tsh(tsh)[source]
start()[source]
stop()[source]

taf.testlib.Ixia.LACP

LACP.py

IxNetwork LACP protocol emulation functionality

Note

TCL procedures:

::ixia::emulation_lacp_control
::ixia::emulation_lacp_info
::ixia::emulation_lacp_link_config
class taf.testlib.Ixia.LACP.LACP(ixia)[source]

Bases: object

IxNet LACP configuration wrapper.

__init__(ixia)[source]

LACP class initialization.

Parameters:ixia (IxiaHLTMixin) – Ixia traffic generator
cleanup()[source]

Clean all TCL variables and lacp_dict.

Returns:None

Create/modify/delete/enable/disable a LACP link.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • link_handler_id (str) – LACP link name
Raises:

AssertionError – error in executing tcl code

Returns:

LACP links handler names

Return type:

dict

Note

See description of keyword arguments in ixia_lacp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_lacp_api.tcl

control(port, link_handler_id=None, **kwargs)[source]
Start/stop/restart protocol, start/stop sending PDU, send Marker Request,
update link parameters after the link has been modified.
Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • link_handler_id (str) – LACP link name
Raise:
AssertionError: error in executing tcl code
Returns:None

Note

See description of keyword arguments in ixia_lacp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_lacp_api.tcl

info(port, link_handler_id=None, **kwargs)[source]

Command to retrieve LACP statistics.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • link_handler_id (str) – LACP link name
Raises:

AssertionError – error in executing tcl code

Returns:

LACP statistics

Return type:

dict

Note

See description of keyword arguments in ixia_lacp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_lacp_api.tcl

taf.testlib.Ixia.OSPF

OSPF.py

IxNetwork OSPF protocol emulation functionality

Note

TCL procedures:

::ixia::emulation_ospf_config
::ixia::emulation_ospf_topology_route_config
::ixia::emulation_ospf_control
::ixia::emulation_ospf_lsa_config
::ixia::emulation_ospf_info
class taf.testlib.Ixia.OSPF.OSPF(ixia)[source]

Bases: object

IxNet OSPF configuration wrapper.

__init__(ixia)[source]

OSPF class initialization.

Parameters:ixia (IxiaHLTMixin) – Ixia traffic generator
config(port, *args, **kwargs)[source]

Configure OSPF routers.

Parameters:port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
Raises:AssertionError – error in executing tcl code
Returns:OSPF session handler name
Return type:str

Note

See description of keyword arguments in ixia_ospf_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_ospf_api.tcl

ospf_control(handle, *args, **kwargs)[source]

Turning OSPF onoff.

Parameters:handle (str) – OSPF session handler name
Raises:AssertionError – error in executing tcl code
Returns:None

Note

See description of keyword arguments in ixia_ospf_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_ospf_api.tcl

ospf_info(handle, **kwargs)[source]

Command to retrieve OSPF statistics.

Parameters:handle (str) – OSPF session handler name
Raises:AssertionError – error in executing tcl code
Returns:OSPF statistics
Return type:dict

Note

See description of keyword arguments in ixia_ospf_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_ospf_api.tcl

ospf_lsa_config(handle, *args, **kwargs)[source]

Configure OSPF LSA.

Parameters:handle (str) – OSPF session handler name
Raises:AssertionError – error in executing tcl code
Returns:OSPF LSA handler name
Return type:str

Note

See description of keyword arguments in ixia_ospf_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_ospf_api.tcl

topology_route_config(handle, *args, **kwargs)[source]

Configure OSPF routes topology.

Parameters:handle (str) – OSPF session handler name
Raises:AssertionError – error in executing tcl code
Returns:OSPF route handler name
Return type:str

Note

See description of keyword arguments in ixia_ospf_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_ospf_api.tcl

taf.testlib.Ixia.STP

STP.py

IxNetwork xSTP protocol emulation functionality

Notes

TCL procedures:: ::ixia::emulation_stp_bridge_config ::ixia::emulation_stp_control ::ixia::emulation_stp_info ::ixia::emulation_stp_lan_config ::ixia::emulation_stp_msti_config ::ixia::emulation_stp_vlan_config

class taf.testlib.Ixia.STP.STP(ixia)[source]

Bases: object

IxNet STP configuration wrapper.

__init__(ixia)[source]

STP class initialization.

Parameters:ixia (IxiaHLTMixin) – Ixia traffic generator
cleanup()[source]

Clean all TCL variables and stp_dictionary

Returns:None
configure_bridges(port, ifaces=None, bridge_handler_id=None, br_iface_handler_id=None, vlan_msti_handler_id=None, **kwargs)[source]

Configure/Modify STP bridges on port.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • ifaces (str) – STP interface handler name
  • bridge_handler_id (str) – STP bridge handler name
  • br_iface_handler_id (str) – STP bridge interface handler name
  • vlan_msti_handler_id (str) – STP bridge_msti_vlan handler name
Raises:
  • Exception – non-existent STP bridge or not defined STP bridge handler name to modify VLAN MSTI
  • AssertionError – error in executing tcl code
Returns:

stp bridges handler names, stp bridge interface handler names,

protocol interface handler names for a specific STP bridge

Return type:

tuple(dict,dict,dict)

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl

configure_lans(port, lan_bridge_handler_id=None, **kwargs)[source]

Create/modify/delete/enable/disable an emulated LAN for STP protocol.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • lan_bridge_handler_id (str) – STP bridge handler name
Raises:

AssertionError – error in executing tcl code

Returns:

STP control bridges handler names

Return type:

dict

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl

configure_msti(port, bridge_handler_id=None, msti_handler_id=None, **kwargs)[source]

Create/modify/delete/enable/disable a STP MSTI object.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • bridge_handler_id (str) – STP bridge handler name
  • msti_handler_id (str) – STP MSTI handler name
Raises:

AssertionError – error in executing tcl code

Returns:

STP MSTI bridges handler names

Return type:

dict

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl

configure_vlans(port, bridge_handler_id=None, vlan_handler_id=None, **kwargs)[source]

Create/modify/delete/enable/disable a STP VLAN object.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • bridge_handler_id (str) – STP bridge handler name
  • vlan_handler_id (str) – VLAN handler name
Raises:

AssertionError – error in executing tcl code

Returns:

STP VLAN bridges handler names

Return type:

dict

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl

control(port, bridge_handler_id=None, **kwargs)[source]

Start STP protocol on specified port/bridge.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • bridge_handler_id (str) – STP bridge handler name
Raises:

AssertionError – error in executing tcl code

Returns:

None

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl

info(port, bridge_handler_id=None, **kwargs)[source]

Command to retrieve STP statistics.

Parameters:
  • port (tuple(int)) – TG port in format tuple(chassisID, cardId, portId)
  • bridge_handler_id (str) – STP bridge handler name
Raises:

AssertionError – error in executing tcl code

Returns:

STP statistics

Return type:

dict

Note

See description of keyword arguments in ixia_stp_api.tcl

Full path: /opt/ixos/lib/hltapi/library/ixia_stp_api.tcl