InterfaceEndpoint

Bases: BaseEndpoint

Provides interface-related configuration and status management endpoints for Alcatel-Lucent OmniSwitch using MIB-based REST API.

admin_disable(port)

Disable administrative state of the interface.

Parameters:
  • port (str) –

    Port or range string.

Returns:
  • ApiResult

    ApiResult with updated interface status.

autoneg_disable(port)

Disable auto-negotiation on the interface.

Parameters:
  • port (str) –

    Port or range string.

Returns:
  • ApiResult

    ApiResult with updated interface status.

autoneg_enable(port)

Enable auto-negotiation on the interface.

Parameters:
  • port (str) –

    Port or range string.

Returns:
  • ApiResult

    ApiResult with updated interface status.

clear_statistics(target, stat_type, cli_only=False)

Clear interface statistics counters (Layer 2 or TDR).

Parameters:
  • target (str) –

    Slot (e.g., “1/3”) or port/port-range (e.g., “1/3/1” or “1/3/1-4”).

  • stat_type (str) –

    “l2-statistics” or “tdr-statistics”.

  • cli_only (bool, default: False ) –

    Whether to include “cli” for l2-statistics.

Returns:
  • ApiResult

    ApiResult of the CLI command.

Raises:
  • ValueError

    If input is invalid.

clear_violation(target, is_linkagg=False)

Clears all the MAC address violation logs for a specified port or link aggregate.

Parameters:
  • target (str) –

    Port in the format ‘chassis/slot/port[-port2]’ or linkagg ID/range like ‘1-2’.

  • is_linkagg (bool, default: False ) –

    If True, clears violation for a linkagg; otherwise, clears for port(s).

Returns:

epp_disable(port)

Disable EPP on the interface.

Parameters:
  • port (str) –

    Port or range string.

Returns:
  • ApiResult

    ApiResult with updated interface status.

epp_enable(port)

Enable EPP on the interface.

Parameters:
  • port (str) –

    Port or range string.

Returns:
  • ApiResult

    ApiResult with updated interface status.

flood_control(limit=200)

Retrieve broadcast, unicast, and multicast storm control settings.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed storm control data from the switch.

get_interface(port)

Retrieve detailed status of a specific port.

Parameters:
  • port (str) –

    Port identifier string, e.g., “1/1/1”.

Returns:
  • Optional[dict]

    A dictionary of parsed interface details or None if the request fails.

globalPTPConfig()

Retrieve the global PTP (Precision Time Protocol) configuration.

Returns:
  • ApiResult( ApiResult ) –

    Parsed PTP configuration data from the switch.

globalPVR()

Retrieve global PVR configuration values.

Returns:
  • ApiResult( ApiResult ) –

    Parsed global PVR configuration from the switch.

Retrieve link monitoring settings per interface.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed link monitor configuration from the switch.

Retrieve real-time and cumulative link monitoring statistics for all interfaces.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed link monitor statistics from the switch.

list(limit=200)

Retrieve the list of ESM port configurations using the MIB-based REST API.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return.

Returns:
  • ApiResult( ApiResult ) –

    Parsed ESM port config data from the switch.

portMappingConfig(limit=200)

Retrieve port mapping table entries.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed port mapping data.

portMappingSession(limit=200)

Retrieve entries from the Port Mapping Session Table.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed port mapping session data.

port_mirroring_destination(limit=200)

Retrieve mirror destination port configuration.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of destination entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed mirror destination configuration from the switch.

port_mirroring_sessions(limit=200)

Retrieve mirror session configuration and status from the switch.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of sessions to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed mirror session data from the switch.

port_mirroring_source(limit=200)

Retrieve source port configuration for mirror sessions.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of source entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed mirror source port configuration from the switch.

port_monitoring_config(limit=200)

Retrieve monitor source port configuration from the switch.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed monitor source port data from the switch.

port_monitoring_session(limit=200)

Retrieve monitor session information.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed monitor session configuration from the switch.

port_violation_status(limit=200)

Retrieve port violation events with details like reason, action, and retry status.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of records to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed port violation data from the switch.

ptpPortConfig(limit=200)

Retrieve PTP administrative status for all switch ports.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed PTP port configuration data from the switch.

recovery_port_config(limit=200)

Retrieve PVR configuration for each interface using MIB-based GET.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed PVR configuration data from the switch.

setInterfaceAdminStatus(ifindex, admin_status=1)

Set the administrative status of a specific interface.

Parameters:
  • ifindex (str) –

    Interface index (e.g., “1001”).

  • admin_status (int, default: 1 ) –

    Desired administrative status (1 = up, 2 = down). Defaults to 1 (down).

Returns:
  • ApiResult( ApiResult ) –

    API response indicating success or failure.

setInterfaceAlias(ifindex, alias)

Set the Alias of a specific interface.

Parameters:
  • ifindex (str) –

    Interface index (e.g., “1001”).

  • Alias (str) –

    Alias of the interface

Returns:
  • ApiResult( ApiResult ) –

    API response indicating success or failure.

set_alias(port, alias)

Set or clear the alias (description) for a single port.

Parameters:
  • port (str) –

    A single port string (e.g., “1/1/1”).

  • alias (str) –

    Alias string (e.g., “Uplink to Core”) or empty “” to clear.

Returns:
  • ApiResult

    An ApiResult with the updated interface detail.

Raises:
  • ValueError

    If a port range is given (not supported by this command).

set_ddm_status(state)

Configures the Digital Diagnostics Monitoring (DDM) administrative status.

Parameters:
  • state (Literal['enable', 'disable']) –

    “enable” to turn on DDM monitoring; “disable” to turn it off.

Returns:
Raises:
  • ValueError

    If an invalid state is provided.

set_duplex(target, mode)

Set duplex mode for a port, port range, or slot.

Parameters:
  • target (str) –

    Port (e.g., “1/3/1”), port range (e.g., “1/3/1-4”), or slot (e.g., “1/3”).

  • mode (str) –

    One of “full”, “half”, or “auto”.

Returns:
  • ApiResult

    An ApiResult with updated interface status if applicable.

Raises:
  • ValueError

    If duplex mode is invalid.

set_eee(target, state)

Enables or disables Energy Efficient Ethernet (EEE) on the specified port(s) or slot.

Parameters:
  • target (str) –

    The interface scope. Accepts: - “slot x/y” - “port x/y/z” - “port x/y/z-a” (range of ports)

  • state (Literal['enable', 'disable']) –

    “enable” to turn on EEE, “disable” to turn it off.

Returns:
Raises:
  • ValueError

    If state is not “enable” or “disable”.

set_flood_limit(target, traffic_type, rate_mode, rate_value, low_threshold=None)

Configure flood limit settings for broadcast, multicast, unknown unicast, or all traffic types.

Parameters:
  • target (str) –

    Slot (e.g., “1/3”) or port/port-range (e.g., “1/3/1”, “1/3/1-4”).

  • traffic_type (str) –

    One of: “bcast”, “mcast”, “uucast”, “all”.

  • rate_mode (str) –

    One of: “pps”, “mbps”, “cap%”, “enable”, “disable”, “default”.

  • rate_value (Union[int, Literal['enable', 'disable', 'default']]) –

    The value for the selected rate_mode, or “enable”/”disable”/”default”.

  • low_threshold (Optional[int], default: None ) –

    Optional low threshold value (must be lower than rate_value, when applicable).

Returns:
Raises:
  • ValueError

    If input validation fails.

set_flood_limit_action(target, traffic_type, action)

Configure the action taken when flood rate limits are violated for a given traffic type.

Parameters:
  • target (str) –

    Slot (e.g., “1/3”) or port/port-range (e.g., “1/3/1”, “1/3/1-4”).

  • traffic_type (Literal['bcast', 'mcast', 'uucast', 'all']) –

    One of: “bcast”, “mcast”, “uucast”, “all”.

  • action (Literal['shutdown', 'trap', 'default']) –

    One of: “shutdown”, “trap”, “default”.

Returns:
Raises:
  • ValueError

    If any argument is invalid.

set_hybrid_mode(target, mode)

Configures the mode of a combo port to either fiber or copper.

Parameters:
  • target (str) –

    The interface scope. Accepts: - “slot x/y” - “port x/y/z” - “port x/y/z-a” (range of ports)

  • mode (Literal['fiber', 'copper']) –

    “fiber” or “copper”

Returns:
Raises:
  • ValueError

    If mode is not “fiber” or “copper”.

set_ingress_bandwidth(target, action)

Configures ingress bandwidth settings on the specified slot or port(s).

Parameters:
  • target (str) –

    Target slot (e.g., “1/3”) or port/port-range (e.g., “1/3/1”, “1/3/1-4”).

  • action (Union[Literal['enable', 'disable'], int]) –

    “enable”, “disable”, or an integer Mbps value.

Returns:
Raises:
  • ValueError

    If invalid action value.

set_interface(port, parameter, value)

Set an interface parameter and return updated status for all affected ports.

Parameters:
  • port (str) –

    Port or range string, e.g., “1/1/1” or “1/1/1-3”.

  • parameter (str) –

    One of “admin-state”, “autoneg”, or “epp”.

  • value (str) –

    “enable” or “disable”.

Returns:
  • ApiResult

    An ApiResult with a list of updated interface statuses.

Enables or disables link trap messages on the specified interface(s).

Parameters:
  • target (str) –

    Target slot (e.g., “1/3”) or port/port-range (e.g., “1/2/1”, “1/1/1-6”).

  • state (Literal['enable', 'disable']) –

    “enable” to generate trap messages when port changes state, “disable” otherwise.

Returns:
Raises:
  • ValueError

    If an invalid state is provided.

set_loopback(port, enable=True)

Enables or disables loopback mode for the specified front-panel port.

Parameters:
  • port (str) –

    The front-panel port(s) in the format: - “port x/y/z” - “port x/y/z-a” (range of ports)

  • enable (bool, default: True ) –

    True to enable loopback, False to disable using the ‘no’ form.

Returns:

set_max_frame_size(target, size)

Configure the maximum frame size on a port or slot.

Parameters:
  • target (str) –

    Target slot (e.g. “1/3”) or port/port-range (e.g. “1/3/1”, “1/3/1-4”).

  • size (int) –

    Frame size in bytes (valid range: 1518 to 9216).

Returns:
  • ApiResult

    ApiResult of the CLI command.

Raises:
  • ValueError

    If the target or size is invalid.

set_portgroup_speed(port_group_number, slot, group_range, speed)

Configures the speed of the ports within a port group.

Parameters:
  • port_group_number (int) –

    The port group number (e.g., 1, 2, 3…).

  • slot (str) –

    The chassis/slot identifier (e.g., “1/1”).

  • group_range (str) –

    The group or group range (e.g., “1”, “2-4”).

  • speed (Literal['auto', '25G', '10G']) –

    The desired speed for the port group (“auto”, “25G”, or “10G”).

Returns:

set_speed(target, speed)

Set the speed for one or more interfaces.

Parameters:
  • target (str) –

    Port or range string, e.g., “1/1/1” or “1/1/1-3”.

  • speed (str) –

    Allowed values include “10”, “100”, …, “100000”, “auto”, or “max 100”/”max 1000”/etc.

Returns:
  • ApiResult

    An ApiResult with updated interface status per affected port.

Raises:
  • ValueError

    If the speed value is invalid.

set_violation_recovery_maximum(scope, value, target=None)

Configures the maximum number of recovery attempts for MAC address violation recovery.

Parameters:
  • scope (Literal['global', 'slot', 'port']) –

    “global” applies to all ports, “slot” applies to a chassis/slot, “port” applies to a port or range.

  • value (Union[int, Literal['infinite', 'default']]) –

    Integer (0–50), “infinite”, or “default”.

  • target (Optional[str], default: None ) –

    Optional. Required for “slot” or “port”. E.g., ‘1/1’ (slot), ‘1/1/1’, or ‘1/1/1-3’ (ports).

Returns:

set_wait_to_restore(target, value)

Configures the wait-to-restore timer for the specified slot or port(s). This timer delays the notification of a link-up event.

Parameters:
  • target (str) –

    The target interface scope. Accepts: - “slot x/y” - “port x/y/z” - “port x/y/z-a” (range)

  • value (int) –

    Wait-to-restore timer in seconds (0 disables the timer).

Returns:
Raises:
  • ValueError

    If value is negative or target is improperly formatted.

set_wait_to_shutdown(target, value)

Configures the wait-to-shutdown timer for the specified slot or port(s). This timer delays the notification of a link-down event.

Parameters:
  • target (str) –

    The target interface scope. Accepts: - “slot x/y” - “port x/y/z” - “port x/y/z-a” (range)

  • value (int) –

    Wait-to-shutdown timer in seconds (0 disables the timer).

Returns:
Raises:
  • ValueError

    If value is negative or target is improperly formatted.

show_interface_accounting(port)

Retrieve detailed status or accounting of a specific port or port range.

Parameters:
  • port (str) –

    Port identifier string, e.g., “1/1/1”, “1/1/1-1/1/4”, or “1/1”.

  • accounting

    If True, retrieve accounting info instead of detailed status.

Returns:
  • ApiResult

    A dictionary (or list of dicts) of parsed interface data, or None if request fails.

show_interface_capability(port)

Retrieve detailed status or capability of a specific port or port range.

Parameters:
  • port (str) –

    Port identifier string, e.g., “1/1/1”, “1/1/1-1/1/4”, or “1/1”.

  • capability

    If True, retrieve capability info instead of detailed status.

Returns:
  • ApiResult

    A dictionary (or list of dicts) of parsed interface data, or None if request fails.

show_interface_counters(port)

Retrieve detailed status or counter of a specific port or port range.

Parameters:
  • port (str) –

    Port identifier string, e.g., “1/1/1”, “1/1/1-1/1/4”, or “1/1”.

  • accounting

    If True, retrieve counter info instead of detailed status.

Returns:
  • ApiResult

    A dictionary (or list of dicts) of parsed interface data, or None if request fails.

show_interface_counters_errors(port)

Retrieve detailed error counters of a specific port or port range.

Parameters:
  • port (str) –

    Port identifier string, e.g., “1/1/1”, “1/1/1-1/1/4”, or “1/1”.

  • counter (errors) –

    If True, retrieve error counter info instead of detailed status.

Returns:
  • ApiResult

    A dictionary (or list of dicts) of parsed interface data, or None if request fails.

statistic_collisions(limit=200)

Retrieve Ethernet collision stats using the MIB-based REST API.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed Ethernet collision statistics.

statistic_counter(limit=200)

Retrieve real-time interface traffic rates and pause frame stats.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed interface rate and pause frame stats from the switch.

statistic_errors_counter(limit=200)

Retrieve Ethernet error statistics such as alignment errors, FCS errors, and oversized/undersized frames.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed Ethernet error statistics from the switch.

statistic_packets(limit=200)

Retrieve interface statistics (standard + FC-specific) from ifTable.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed interface stats from the switch.

statistic_packets_counter(limit=200)

Retrieve high-capacity traffic and pause frame counters from alcetherStatsTable.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed traffic and pause frame statistics.

statistic_traffic(if_type=6, limit=200)

Retrieve high-capacity interface traffic statistics from ifXTable.

Parameters:
  • if_type (int, default: 6 ) –

    Interface type to filter (default 6 for Ethernet).

  • limit (int, default: 200 ) –

    Max number of entries to retrieve. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed traffic stats from the switch.

status(limit=200)

Retrieve detailed ESM port operational status using the MIB-based REST API.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed data from the switch response.

status_extended(limit=200)

Retrieve ESM port performance and ingress settings using MIB GET.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of results to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed data containing max frame size, speed, ingress rate limits, etc.

tdrStats(limit=200)

Retrieve cable diagnostics for all Ethernet switch ports.

Parameters:
  • limit (int, default: 200 ) –

    Maximum number of entries to return. Defaults to 200.

Returns:
  • ApiResult( ApiResult ) –

    Parsed TDR port diagnostics data from the switch.