Skip to content

xenanetworks/tdl-xoa-python-script-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDL XOA Python Script Example Library

Important

xoa-driver package has been discontinued and is replaced by tdl-xoa-driver. Please pip uninstall xoa-driver from your environment and pip install tdl-xoa-driver. The functions and imports remain the same so you don't need to change your script souce code.

Introduction

This repository includes examples of using tdl-xoa-driver

Read TDL XOA Driver User Doc

Python Requirement

Python>=3.11

What Example Folder Contains

Each folder contains at least three files:

  • Python3 script file - this is where the example code locates
  • requirements.txt - dependencies to run the code. You should pip install -r requirements.txt (for Windows) or pip3 install -r requirements.txt (for Linux/macOS) to update your Python3 environment (either global or virtual) to have the necessary dependencies.

Script Descriptions

Quick Start


Async Wrapper for Non-Async Python

  • async_wrapper: The APIs provided by tdl-xoa-driver are async functions. This means any function that uses the tdl-xoa-driver must be declared as async. This might be a problem for you if your existing framework doesn't support async functions. To solve this "incompatibility" issue, we have made an async wrapper class XenaAsyncWrapper for you to wrap tdl-xoa-driver's async function inside and use it as a regular Python function.

    With XenaAsyncWrapper, you can develop your own Robot Framework library using APIs from the tdl-xoa-driver.


Port Configuration and CLI

  • xpc_cli_integration: XenaManager's port configuration (.xpc) and CLI integration with XOA Python API. Demonstrates How to load .xpc file or send CLI commands via XOA Python API.

CLI Python3 Wrapper

  • cli_py3_wrapper: CLI wrapper for Python>=3.11 and a script example.
  • cli_wrappers: different language wrapper for CLI commands, e.g. Java, Tcl, Perl, etc.

Robot Framework Library Example

  • robot_framework: You can develop your own Robot Framework library using APIs from tdl-xoa-driver to communicate with the test equipment. In this example, we are demonstrating How you can use tdl-xoa-driver and XenaAsyncWrapper to develop a simple library for Robot.

Automated Test Suite

  • rfc2544_tests: How to run Xena2544 configuration using XOA Python for GUI-less test suite automation.
  • anlt_test_methodology: Auto-negotiation and link training test methodology.
  • cable_perf_optimization: Provides an automated optimization framework that uses PRBS-based BER testing to dial in RX Output Equalization and TX Input Equalization for the best possible signal integrity, aligning with IEEE 802.3ck and CMIS standards.

Various Statistics


Port and Stream Configuration

  • modifier: How to add modifiers on a stream.
  • filter: How to add filters on a port.
  • freya_tx_tap_tuning: Set and get the port TX taps in three different format, applicable to Z800 Freya only.
  • header_builder: Use the headers module to build packet headers.
  • ip_streams_arp_ndp_table: Configure port's ARP/NDP table based on the IP streams configured on it.
  • simple_arp: Simple ARP example to resolve the MAC address of a port.
  • pcap_replay_capture: How to replay frames from a pcap and capture traffic into another pcap file.
  • thor_ppm_anlt_stream: Demonstrates How to change media configuration, perform PPM sweep and AN&LT on Thor modules.
  • stream_sync: How to synchronize the streams on a port to the script client cache.
  • chassis_uptime: Read system uptime.

Schedule Traffic based on ToD

  • gps_tod: Schedule traffic based on Time of Day (ToD).

PFC Configuration

  • pfc: Create a PFC stream on the port to suppress a specific traffic class of the TX port traffic to a target fraction of the port speed.

DHCP Server & Client IPv4

  • dhcp_server_dhcp_client: This project contains two main scripts dhcp_client_main.py and dhcp_server_main.py. As their name indicates, they leverage tdl-xoa-driver to run DHCP server and client services over Teledyne Lecroy Xena's testers.

Emulate Various Scenarios


Transceiver Access


Misc.