IxNetwork Low Level API

raw JSON →
9.30.2212.8 verified Fri May 01 auth: no python

IxNetwork Low Level API provides a Python interface to control and automate Ixia's IxNetwork test platform. Version 9.30.2212.8 is the latest, with irregular releases tied to appliance firmware. Supports HTTP/REST and WebSocket connections to IxNetwork servers for traffic generation, protocol emulation, and chassis management.

pip install ixnetwork
error ModuleNotFoundError: No module named 'ixnetwork'
cause Package not installed or installed in wrong environment.
fix
Run pip install ixnetwork in the correct Python environment.
error IxNetError: Connection refused or timeout
cause Server IP/port unreachable, firewall blocking, or incorrect credentials.
fix
Verify server address, port (default 443), network connectivity, and credentials.
error AttributeError: module 'ixnetwork' has no attribute 'IxNetwork'
cause Import statement is incorrect or the package version is too old.
fix
Use exact import: from ixnetwork import IxNetwork. Upgrade package: pip install --upgrade ixnetwork.
breaking Version 9.30+ removed support for Python 2.7 and older TLS protocols. Ensure your environment uses Python 3.6+ and the server TLS 1.2+.
fix Upgrade to Python 3.6+ and ensure server TLS 1.2 is enabled.
breaking The `connect` method changed default `apiKey` parameter from optional to required in some versions. If not using API key, pass empty string.
fix Always pass `apiKey` parameter (e.g., `apiKey=''` if not used).
gotcha Session management is manual: you must call `ixNet.disconnect()` to release server resources. Not doing so leads to stale sessions and resource leaks.
fix Use `ixNet.disconnect()` in a finally block or context manager pattern.

Basic connection to an IxNetwork server. Requires ip/hostname, credentials. The `connect` call is synchronous and returns session IDs.

from ixnetwork import IxNetwork

ixNet = IxNetwork()
ixNet.connect('10.0.0.1', username='admin', password='admin', apiKey=os.environ.get('IXN_API_KEY', ''))
print(ixNet.getSessionIds())