pe_commands module

Impairment Port Commands

class PE_FCSDROP[source]

Bases: object

The action on packets with FCS errors on a port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, the action on packets with FCS errors on a port

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, the action on packets with FCS errors on a port

get()[source]

Get the status of whether the action on packets with FCS errors on a port is enabled.

Returns:

whether the action on packets with FCS errors on a port is enabled

Return type:

PE_FCSDROP.GetDataAttr

set(on_off)[source]

Set the status of whether the action on packets with FCS errors on a port is enabled.

Parameters:

on_off (OnOff) – whether the action on packets with FCS errors on a port is enabled

set_off()

Disable the action on packets with FCS errors on a port.

set_on()

Enable the action on packets with FCS errors on a port.

class PE_TPLDMODE[source]

Bases: object

The action indicates the TPLD mode to be used per port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, indicating the TPLD mode.

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, indicating the TPLD mode.

get()[source]

Get the TPLD mode of the port.

Returns:

indicating the TPLD mode

Return type:

PE_TPLDMODE.GetDataAttr

set(mode)[source]

Set the TPLD mode of the port.

Parameters:

mode (TPLDMode) – indicating the TPLD mode

set_micro()

Set the TPLD mode to Micro.

set_normal()

Set the TPLD mode to Normal.

class PE_COMMENT[source]

Bases: object

Flow description.

class GetDataAttr[source]

Bases: ResponseBodyStruct

comment

string, containing the description of the flow.

class SetDataAttr[source]

Bases: RequestBodyStruct

comment

string, containing the description of the flow.

get()[source]

Get the flow description.

Returns:

the description of the flow

Return type:

PE_COMMENT.GetDataAttr

set(comment)[source]

Set the flow description.

Parameters:

comment (str) – the description of the flow

class PE_INDICES[source]

Bases: object

Get the flow indices. Currently the number of flows is 8.

class GetDataAttr[source]

Bases: ResponseBodyStruct

flow0_id

integer, id of flow 0.

flow1_id

integer, id of flow 1.

flow2_id

integer, id of flow 2.

flow3_id

integer, id of flow 3.

flow4_id

integer, id of flow 4.

flow5_id

integer, id of flow 5.

flow6_id

integer, id of flow 6.

flow7_id

integer, id of flow 7.

get()[source]

Get the flow indices of a port. Currently the number of flows is fixed to 8.

Returns:

the flow indices of a port

Return type:

PE_INDICES.GetDataAttr

class PE_LATENCYRANGE[source]

Bases: object

Retrieve minimum and maximum configurable latency per flow in nanoseconds.

class GetDataAttr[source]

Bases: ResponseBodyStruct

max

long integer, maximum configurable latency per flow in nanoseconds.

min

long integer, minimum configurable latency per flow in nanoseconds.

get()[source]

Get the minimum and maximum configurable latency per flow in nanoseconds.

Returns:

minimum and maximum configurable latency per flow in nanoseconds.

Return type:

PE_LATENCYRANGE.GetDataAttr

class PE_CORRUPT[source]

Bases: object

Configures impairment corruption type.

Note

IP / TCP / UDP corruption modes are not supported on default flow (0)

class GetDataAttr[source]

Bases: ResponseBodyStruct

corruption_type

coded byte, specifying corruption type.

class SetDataAttr[source]

Bases: RequestBodyStruct

corruption_type

coded byte, specifying corruption type.

get()[source]

Get the impairment corruption type of a flow.

Returns:

the impairment corruption type of a flow.

Return type:

PE_CORRUPT.GetDataAttr

set(corruption_type)[source]

Set the impairment corruption type.

Parameters:

corruption_type (CorruptionType) – corruption type

set_ber()

Set the corruption type to Bit Error Rate.

set_eth()

Set the corruption type to Ethernet.

set_ip()

Set the corruption type to IP.

set_off()

Set the corruption type to OFF.

set_tcp()

Set the corruption type to TCP.

set_udp()

Set the corruption type to UDP.

class PE_MISORDER[source]

Bases: object

Configures the misordering depth in number of packets.

Note

probability * (depth + 1) should be less than 1,000,000. (see PED_FIXED)

class GetDataAttr[source]

Bases: ResponseBodyStruct

depth

integer, specifies the misordering depth (Range 1 - 32). Default value. probability * (depth + 1) should be less than 1,000,000. (see PED_FIXED)

class SetDataAttr[source]

Bases: RequestBodyStruct

depth

integer, specifies the misordering depth (Range 1 - 32). Default value. probability * (depth + 1) should be less than 1,000,000. (see PED_FIXED)

get()[source]

Get the misordering depth in number of packets of a flow.

Returns:

the misordering depth (Range 1 - 32). Default value.

Return type:

PE_MISORDER.GetDataAttr

set(depth)[source]

Set the misordering depth in number of packets of a flow. Note: probability [see PED_FIXED] * (depth + 1) should be less than 1,000,000.

Parameters:

depth (int) – the misordering depth (Range 1 - 32). Default value.

class PE_BANDPOLICER[source]

Bases: object

Configures the bandwidth policer.

class GetDataAttr[source]

Bases: ResponseBodyStruct

cbs

integer, policer committed burst burst in bytes (range 0 to 4194304), default is 0.

cir

integer, policer committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

mode

coded byte, sets policer mode.

on_off

coded byte, enables/disables policer. Note: PED_ENABLE is not supported for the policer.

class SetDataAttr[source]

Bases: RequestBodyStruct

cbs

integer, policer committed burst size in bytes (range 0 to 4194304), default is 0.

cir

integer, policer committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

mode

coded byte, sets policer mode.

on_off

coded byte, enables/disables policer. Note: PED_ENABLE is not supported for the policer.

get()[source]

Get the bandwidth policer configuration.

Returns:

enabled/disabled, policer mode, committed information rate, and committed burst size.

Return type:

PE_BANDPOLICER.GetDataAttr

set(on_off, mode, cir, cbs)[source]

Set the bandwidth policer configuration.

Parameters:
  • on_off (OnOff) – enables/disables policer. Note: PED_ENABLE is not supported for the policer.

  • mode (PolicerMode) – policer mode

  • cir (int) – policer committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

  • cbs (int) – policer committed burst burst in bytes (range 0 to 4194304), default is 0.

class PE_BANDSHAPER[source]

Bases: object

Configures the bandwidth shaper. L1 (0) (Shaper performed at Layer 1 level. I.e. including the preamble and min interpacket gap) L2 (1) (Shaper performed at Layer 2 level. I.e. excluding the preamble and min interpacket gap) Default value: L2 (0)

class GetDataAttr[source]

Bases: ResponseBodyStruct

buffer_size

integer, shaper buffer size in bytes (range 0 to 2097152), default is 0.

cbs

integer, shaper committed burst size in bytes (range 0 to 4194304), default is 0.

cir

integer, shaper committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

mode

coded byte, sets shaper mode.

on_off

coded byte, enables/disables shaper.

class SetDataAttr[source]

Bases: RequestBodyStruct

buffer_size

integer, shaper buffer size in bytes (range 0 to 2097152), default is 0.

cbs

integer, shaper committed burst size in bytes (range 0 to 4194304), default is 0.

cir

integer, shaper committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

mode

coded byte, sets shaper mode.

on_off

coded byte, enables/disables shaper.

get()[source]

Get the bandwidth shaper configuration.

Returns:

the bandwidth shaper configuration, including on/off, mode, CIR, CBS, and shaper buffer size.

Return type:

PE_BANDSHAPER.GetDataAttr

set(on_off, mode, cir, cbs, buffer_size)[source]

Set the bandwidth shaper configuration.

Parameters:
  • on_off (OnOff) – enables/disables shaper

  • mode (PolicerMode) – shaper mode

  • cir (int) – shaper committed information rate in units of 100 kbps (range 0 to 1000000), default is 0.

  • cbs (int) – shaper committed burst size in bytes (range 0 to 4194304), default is 0.

  • buffer_size (int) – shaper buffer size in bytes (range 0 to 2097152), default is 0.

Impairment Port Statistics Commands

class PE_CLEAR[source]

Bases: object

Clear all the impairment (duplicate, drop, mis-ordered, corrupted, latency and jitter) statistics for a Chimera port and flows on the port. The byte and packet counts will restart at zero.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clear all the impairment (duplicate, drop, mis-ordered, corrupted, latency and jitter) statistics for a Chimera port and flows on the port. The byte and packet counts will restart at zero.

class PE_DUPTOTAL[source]

Bases: object

Obtains statistics concerning all the packets duplicated between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets duplicated in all flows.

ratio

long integer, ratio of number of packets duplicated in all flows, expressed in ppm.

get()[source]

Get statistics concerning all the packets duplicated between this receive port and its partner TX port.

Returns:

number of packets duplicated in all flows, ratio of number of packets duplicated in all flows, expressed in ppm.

Return type:

PE_DUPTOTAL.GetDataAttr

class PE_MISTOTAL[source]

Bases: object

Obtains statistics concerning all the packets mis-ordered between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets mis-ordered in all flows.

ratio

long integer, number of packets mis-ordered in all flows, expressed in ppm.

get()[source]

Get statistics concerning all the packets mis-ordered between this receive port and its partner TX port.

Returns:

number of packets mis-ordered in all flows, number of packets mis-ordered in all flows, expressed in ppm.

Return type:

PE_MISTOTAL.GetDataAttr

class PE_CORTOTAL[source]

Bases: object

Obtains statistics concerning all the packets corrupted on between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

fcs_corrupted_pkt_count

long integer, number of packets with Ethernet FCS corrupted in all flows.

fcs_corrupted_pkt_ratio

long integer, ratio of number of packets with Ethernet FCS corrupted in all flows, expressed in ppm.

ip_corrupted_pkt_count

long integer, number of packets with IP header checksum corrupted in all flows.

ip_corrupted_pkt_ratio

long integer, ratio of number of packets with IP Header checksum corrupted in all flows, expressed in ppm.

tcp_corrupted_pkt_count

long integer, number of packets with TCP checksum corrupted in all flows.

tcp_corrupted_pkt_ratio

long integer, ratio of number of packets with TCP checksum corrupted in all flows, expressed in ppm.

total_corrupted_pkt_count

long integer, number of packets corrupted in all flows.

total_corrupted_pkt_ratio

long integer, ratio of number of packets corrupted in all flows, expressed in ppm.

udp_corrupted_pkt_count

long integer, number of packets with UDP checksum corrupted in all flows.

udp_corrupted_pkt_ratio

long integer, ratio of number of packets with UDP checksum corrupted in all flows, expressed in ppm.

get()[source]

Get statistics concerning all the packets corrupted on between this receive port and its partner TX port.

Returns:

number of packets corrupted in all flows; number of packets with Ethernet FCS corrupted in all flows; number of packets with IP header checksum corrupted in all flows; number of packets with UDP checksum corrupted in all flows; number of packets with TCP checksum corrupted in all flows; ratio of number of packets corrupted in all flows, expressed in ppm; ratio of number of packets with Ethernet FCS corrupted in all flows expressed in ppm; ratio of number of packets with IP Header checksum corrupted in all flows, expressed in ppm; ratio of number of packets with UDP checksum corrupted in all flows, expressed in ppm; ratio of number of packets with TCP checksum corrupted in all flows, expressed in ppm

Return type:

PE_CORTOTAL.GetDataAttr

class PE_JITTERTOTAL[source]

Bases: object

Obtains statistics concerning all the packets jittered between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets jittered in all flows.

ratio

long integer, ratio of number of packets jittered in all flows expressed in ppm.

get()[source]

Get statistics concerning all the packets jittered between this receive port and its partner TX port.

Returns:

number of packets jittered in all flows, ratio of number of packets jittered in all flows expressed in ppm.

Return type:

PE_JITTERTOTAL.GetDataAttr

class PE_LATENCYTOTAL[source]

Bases: object

Obtains statistics concerning all the packets delayed this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets delayed in all flows.

ratio

long integer, ratio of number of packets delayed in all flows, expressed in ppm.

get()[source]

Get statistics concerning all the packets delayed this receive port and its partner TX port.

Returns:

number of packets delayed in all flows, and ratio of number of packets delayed in all flows, expressed in ppm.

Return type:

PE_LATENCYTOTAL.GetDataAttr

class PE_DROPTOTAL[source]

Bases: object

Obtains statistics concerning all the packets dropped between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_drop_count_bandwidth

long integer, total number of packets dropped due to bandwidth control in all flows.

pkt_drop_count_other

long integer, total number of packets dropped for other reasons in all flows.

pkt_drop_count_programmed

long integer, total number of packets dropped as programmed in all flows.

pkt_drop_count_total

long integer, total number of packets dropped in all flows.

pkt_drop_ratio_bandwidth

long integer, ratio of number of packets dropped due to bandwidth control in all flows, expressed in ppm.

pkt_drop_ratio_other

long integer, ratio of number of packets dropped for other reasons in all flows, expressed in ppm.

pkt_drop_ratio_programmed

long integer, ratio of number of packets dropped as programmed in all flows, expressed in ppm.

pkt_drop_ratio_total

long integer, ratio of number of packets dropped in all flows, expressed in ppm.

get()[source]

Get statistics concerning all the packets dropped between this receive port and its partner TX port.

Returns:

total number of packets dropped in all flows, total number of packets dropped as programmed in all flows, total number of packets dropped due to bandwidth control in all flows, total number of packets dropped for other reasons in all flows, ratio of number of packets dropped in all flows, expressed in ppm, ratio of number of packets dropped as programmed in all flows, expressed in ppm, ratio of number of packets dropped due to bandwidth control in all flows, expressed in ppm, ratio of number of packets dropped for other reasons in all flows, expressed in ppm.

Return type:

PE_DROPTOTAL.GetDataAttr

Impairment Flow Statistics Commands

class PE_FLOWDROPTOTAL[source]

Bases: object

Obtains statistics concerning all the packets dropped in a flow between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_drop_count_bandwidth

long integer, total number of packets dropped due to bandwidth control for the flow.

pkt_drop_count_other

long integer, total number of packets dropped for other reasons for the flow.

pkt_drop_count_programmed

long integer, total number of packets dropped as programmed for the flow.

pkt_drop_count_total

long integer, total number of packets dropped for the flow.

pkt_drop_ratio_bandwidth

long integer, ratio of number of packets dropped due to bandwidth control for the flow, expressed in ppm.

pkt_drop_ratio_other

long integer, ratio of number of packets dropped for other reasons for the flow, expressed in ppm.

pkt_drop_ratio_programmed

long integer, ratio of number of packets dropped as programmed for the flow, expressed in ppm.

pkt_drop_ratio_total

long integer, ratio of number of packets dropped for the flow, expressed in ppm.

get()[source]

Get statistics concerning all the packets dropped in a flow between this receive port and its partner TX port.

Returns:

total number of packets dropped for the flow, total number of packets dropped as programmed for the flow, total number of packets dropped due to bandwidth control for the flow, total number of packets dropped for other reasons for the flow, ratio of number of packets dropped for the flow, expressed in ppm, ratio of number of packets dropped as programmed for the flow, expressed in ppm, ratio of number of packets dropped due to bandwidth control for the flow, expressed in ppm, ratio of number of packets dropped for other reasons for the flow, expressed in ppm.

Return type:

PE_FLOWDROPTOTAL.GetDataAttr

class PE_FLOWLATENCYTOTAL[source]

Bases: object

Obtains statistics concerning all the packets delayed between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets delayed in the flow.

ratio

long integer, ratio of number of packets delayed in the flow, expressed in ppm.

get()[source]

Get statistics concerning all the packets delayed between this receive port and its partner TX port.

Returns:

number of packets delayed in the flow, ratio of number of packets delayed in the flow, expressed in ppm.

Return type:

PE_FLOWLATENCYTOTAL.GetDataAttr

class PE_FLOWDUPTOTAL[source]

Bases: object

Obtains statistics concerning all the packets duplicated in a flow between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets duplicated for the flow.

ratio

long integer, ratio of number of packets duplicated for the flow - expressed in ppm.

get()[source]

Get statistics concerning all the packets duplicated in a flow between this receive port and its partner TX port.

Returns:

number of packets duplicated for the flow, ratio of number of packets duplicated for the flow - expressed in ppm.

Return type:

PE_FLOWDUPTOTAL.GetDataAttr

class PE_FLOWMISTOTAL[source]

Bases: object

Obtains statistics concerning all the packets mis-ordered in a flow between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets mis-ordered for the flow.

ratio

long integer, ratio of number of packets, expressed in ppm.

get()[source]

Get statistics concerning all the packets mis-ordered in a flow between this receive port and its partner TX port.

Returns:

number of packets mis-ordered for the flow, ratio of number of packets, expressed in ppm.

Return type:

PE_FLOWMISTOTAL.GetDataAttr

class PE_FLOWCORTOTAL[source]

Bases: object

Obtains statistics concerning all the packets corrupted in a flow between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

fcs_corrupted_pkt_count

long integer, number of packets with Ethernet FCS corrupted for the flow.

fcs_corrupted_pkt_ratio

long integer, ratio of number of packets with Ethernet FCS corrupted for the flow expressed in ppm.

ip_corrupted_pkt_count

long integer, number of packets with IP header checksum corrupted for the flow.

ip_corrupted_pkt_ratio

long integer, ratio of number of packets with IP Header checksum corrupted for the flow expressed in ppm.

tcp_corrupted_pkt_count

long integer, number of packets with TCP checksum corrupted for the flow.

tcp_corrupted_pkt_ratio

long integer, ratio of number of packets with TCP checksum corrupted for the flow expressed in ppm.

total_corrupted_pkt_count

long integer, number of packets corrupted for the flow.

total_corrupted_pkt_ratio

long integer, ratio of number of packets corrupted for the flow expressed in ppm.

udp_corrupted_pkt_count

long integer, number of packets with UDP checksum corrupted for the flow.

udp_corrupted_pkt_ratio

long integer, ratio of number of packets with UDP checksum corrupted for the flow expressed in ppm.

get()[source]

Get statistics concerning all the packets corrupted in a flow between this receive port and its partner TX port.

Returns:

number of packets corrupted for the flow, number of packets with Ethernet FCS corrupted for the flow, number of packets with IP header checksum corrupted for the flow, number of packets with UDP checksum corrupted for the flow, number of packets with TCP checksum corrupted for the flow, ratio of number of packets corrupted for the flow expressed in ppm, ratio of number of packets with Ethernet FCS corrupted for the flow expressed in ppm, ratio of number of packets with IP Header checksum corrupted for the flow expressed in ppm, ratio of number of packets with UDP checksum corrupted for the flow expressed in ppm, ratio of number of packets with TCP checksum corrupted for the flow expressed in ppm.

Return type:

PE_FLOWCORTOTAL.GetDataAttr

class PE_FLOWJITTERTOTAL[source]

Bases: object

Obtains statistics concerning all the packets jittered in a flow between this receive port and its partner TX port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

pkt_count

long integer, number of packets jittered in the flow.

ratio

long integer, ratio of number of packets jittered in the flow, expressed in ppm.

get()[source]

Get statistics concerning all the packets jittered in a flow between this receive port and its partner TX port.

Returns:

number of packets jittered in the flow, ratio of number of packets jittered in the flow, expressed in ppm

Return type:

PE_FLOWJITTERTOTAL.GetDataAttr

class PE_FLOWCLEAR[source]

Bases: object

Clear all the impairment (duplicate, drop, mis-ordered, corrupted, latency and jitter) statistics on a particular flow on the port. The byte and packet counts will restart at zero.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clear all the impairment (duplicate, drop, mis-ordered, corrupted, latency and jitter) statistics on a particular flow on the port. The byte and packet counts will restart at zero.