Skip to main content

Keysight IxNetwork Open Traffic Generator

Build pypi python license Total alerts Language grade: Python

The Keysight IxNetwork implementation of the open-traffic-generator models.
To start contributing, please see contributing.md.

Getting Started

Install client package

python -m pip install --upgrade ixnetwork-open-traffic-generator

Start scripting

# for constructing traffic configuration
from abstract_open_traffic_generator import (
    port, flow, config, control, result
)
# for making API calls
from ixnetwork_open_traffic_generator.ixnetworkapi import IxNetworkApi

# provide API server and port addresses
api = IxNetworkApi(address='127.0.0.1', port=11009)
tx = port.Port(name='Tx Port', location='127.0.0.1;2;1')
rx = port.Port(name='Rx Port', location='127.0.0.1;2;2')

# configure one TCP flow (with default protocol headers) to send 10000 packets,
# each of 128 bytes at 10% of max line rate
flw = flow.Flow(
    name='Flow %s->%s' % (tx.name, rx.name),
    tx_rx=flow.TxRx(
        flow.PortTxRx(tx_port_name=tx.name, rx_port_name=rx.name)
    ),
    packet=[
        flow.Header(flow.Ethernet()),
        flow.Header(flow.Vlan()),
        flow.Header(flow.Ipv4()),
        flow.Header(flow.Tcp())
    ],
    size=flow.Size(128),
    rate=flow.Rate(value=10, unit='line'),
    duration=flow.Duration(flow.FixedPackets(packets=10000))
)

# push configuration and start transmitting flows
cfg = config.Config(ports=[tx, rx], flows=[flw])
api.set_state(control.State(control.ConfigState(config=cfg, state='set')))
api.set_state(control.State(control.FlowTransmitState(state='start')))

# fetch tx port stats and wait until total frames sent is correct or retry
# retry count is 0
retry = 5
request = result.PortRequest(port_names=[tx.name], column_names=['frames_tx'])

while sum([p['frames_tx'] for p in api.get_port_results(request)]) != 10000:
    assert retry > 0
    retry -= 1

Metadata

Release files for ixnetwork-open-traffic-generator 0.0.85

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

Source distribution (sdist)

Source distribution for ixnetwork-open-traffic-generator 0.0.85
File Size Uploaded Provenance
ixnetwork_open_traffic_generator-0.0.85.tar.gz 44.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ixnetwork-open-traffic-generator 0.0.85
File Interpreter ABI Platform
ixnetwork_open_traffic_generator-0.0.85-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 90.5 kB

Release files / ixnetwork_open_traffic_generator-0.0.85.tar.gz

Download URL ixnetwork_open_traffic_generator-0.0.85.tar.gz
Size 44.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b11adb122f803c27fe45644dedbe4389f40e792b4d80da017d7ec546965d5ef9
BLAKE2b-256 checksum
How to use checksums
3ac15439d272fcb841544c24e4a83e223dcb4e4aa9939654402e22a94f545ee3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.10

Release files / ixnetwork_open_traffic_generator-0.0.85-py2.py3-none-any.whl

Download URL ixnetwork_open_traffic_generator-0.0.85-py2.py3-none-any.whl
Size 46.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b1c92fb34765aacfd67cf1898a92fd11c85022896ba4d2852d92476b4a6889bd
BLAKE2b-256 checksum
How to use checksums
b2f1342288b1a466849a14dde6f3b8fdfec38a80505538d8368ab1a70b5d6b09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.10

Security for ixnetwork-open-traffic-generator 0.0.85

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.

Release history Release notifications | RSS feed

This release

0.0.85 This release

2 release files No provenance

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