Skip to main content

snappi Extension for IxLoad

license Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build pypi python Total alerts Language grade: Python downloads

This extension allows executing test scripts written using snappi against
IxLoad, (one of) Keysight's implementation of Open Traffic Generator.

The repository is under active development.

To start contributing, please see contributing.md.

Install on a client

python -m pip install --upgrade "snappi[ixload]"

Start scripting

"""
Configure a raw TCP flow with,
- tx port as source to rx port as destination
- frame count 10000, each of size 128 bytes
- transmit rate of 1000 packets per second
Validate,
- frames transmitted and received for configured flow is as expected
"""

import snappi
# host is Ixload API Server
api = snappi.api(location='https://localhost:443', ext='ixload')
# new config
config = api.config()
# port location is chassis-ip;card-id;port-id
tx, rx = (
    config.ports
    .port(name='tx', location='192.168.0.1;2;1')
    .port(name='rx', location='192.168.0.1;2;2')
)
# configure layer 1 properties
(d1, d2) = config.devices.device(name="d1").device(name="d2")
(e1,) = d1.ethernets.ethernet(name="d1.e1")
e1.connection.port_name = "p1"
e1.mac = "70:9C:91:69:00:00"
(e2,) = d2.ethernets.ethernet(name="d2.e2")
e2.connection.port_name = "p2"
e2.mac = "7C:5D:68:26:00:00"
(ip1,) = e1.ipv4_addresses.ipv4(name="e1.ipv4")
ip1.address = "173.173.173.10"
ip1.gateway = "0.0.0.0"
ip1.step = "0.0.0.1"
ip1.count = 1

(ip2,) = e2.ipv4_addresses.ipv4(name="e2.ipv4")
ip2.address = "173.173.173.30"
ip2.gateway = "0.0.0.0"

(t1,) = d1.tcps.tcp(name="Tcp1")
t1.ip_interface_name = ip1.name
t1.adjust_tcp_buffers = False
t1.keep_alive_time = 7000

(t2,) = d2.tcps.tcp(name="Tcp2")
t2.ip_interface_name = ip2.name
t2.time_wait_recycle = False
t2.time_wait_rfc1323_strict = True
t2.keep_alive_time = 600

(http_1,) = d1.https.http(name="HTTP1")
http_1.tcp_name = t1.name   #UDP configs can be mapped http.transport = udp_1.name
http_1.enable_tos = False
http_1.priority_flow_control_class = "v10"
(http_client,) = http_1.clients.client()
http_client.cookie_jar_size = 100
http_client.version = "1"

(http_2,) = d2.https.http(name="HTTP2")
http_2.tcp_name = t2.name		#UDP configs can be mapped http.transport = udp_2.name
http_2.enable_tos = False
http_2.priority_flow_control_class = "v10"
(http_server,) = http_2.servers.server()
http_server.rst_timeout = 100
http_server.enable_http2 = False
http_server.port = 80

(get_a,) = http_client.methods.method().method()
(get1,) = get_a.get.get()
get1.destination = "Traffic2_HTTPServer1:80" 
get1.page = "./1b.html"
# push configuration
api.set_config(config)
# start traffic 

cs = api.control_state()
cs.app.state = 'start' #cs.app.state.START 
response1 = api.set_control_state(cs) 
print(response1)
cs.app.state = 'stop' #cs.app.state.START 
api.set_control_state(cs) 

Metadata

Release files for snappi-ixload 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snappi-ixload 0.0.8
File Size Uploaded Provenance
snappi_ixload-0.0.8.tar.gz 53.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for snappi-ixload 0.0.8
File Interpreter ABI Platform
snappi_ixload-0.0.8-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 126.3 kB

Release files / snappi_ixload-0.0.8.tar.gz

Download URL snappi_ixload-0.0.8.tar.gz
Size 53.5 kB
Tags Source
SHA-256 checksum
How to use checksums
530b186b66552a3b12195b33db3126a4f08c53a50ee7159168de94d9ce78943e
BLAKE2b-256 checksum
How to use checksums
9d924ea9a795fdcf78dc612ce25e76f24fbb0f8339d5c6798f6654c7cfdf23d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / snappi_ixload-0.0.8-py2.py3-none-any.whl

Download URL snappi_ixload-0.0.8-py2.py3-none-any.whl
Size 72.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d14a8a274c553e88d8c224322a047fd001994d19e4c5b94952a19590186fdb02
BLAKE2b-256 checksum
How to use checksums
735dcd97e4d26a085afb0cd496da729cecb477bce1a2d693b3f0bfb9618c3346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Security for snappi-ixload 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page