8.3.3.2. Port

This module contains the impairment port commands.


class P_EMULATE[source]

Bases: object

The action determines if emulation functionality is enabled or disabled

get()[source]

Get whether the Chimera port’s emulation functionality is enabled.

Returns:

whether the Chimera port’s emulation functionality is enabled

Return type:

P_EMULATE.GetDataAttr

set(action)[source]

Set whether the Chimera port’s emulation functionality is enabled.

Parameters:

action (OnOff) – whether the Chimera port’s emulation functionality is enabled

set_off()

Disable the Chimera port’s emulation functionality.

set_on()

Enable the Chimera port’s emulation functionality.

class P_LOADMODE[source]

Bases: object

The action determines if config load mode is enabled or disabled for the Chimera port.

get()[source]

Get the status of config load mode of the Chimera port.

Returns:

the status of config load mode on the Chimera port

Return type:

P_LOADMODE.GetDataAttr

set(on_off)[source]

Set the status of config load mode of the Chimera port.

Parameters:

on_off (OnOff) – whether config load is enabled on the Chimera port

set_off()

Disable config load on the Chimera port.

set_on()

Enable config load on the Chimera port.

class PE_FCSDROP[source]

Bases: object

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.

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.

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.

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.

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)

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)

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.

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)

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.

The other port commands are the same as Valkyrie Port Commands.