-
Notifications
You must be signed in to change notification settings - Fork 59
IxNetwork Sample Scripts
Hubert Gee edited this page Jan 22, 2018
·
1 revision
For starters, use any of the following sample scripts. They're all conceptually the same, but using different protocols:
- l2l3RestNgpf.py
- bgpRestNgpf.py
- ospfRestNgpf.py
Other sample scripts:
- This sample script loads an exported JSON config file.
- Reassign chassis/ports if necessary so you could use the saved config file on any testbed.
- Start/verify protocols, start traffic and verify stats.
- Requires IxNetwork version 8.40.
jsonConfigImportExportSamples.py
How to export a configuration into a JSON format file.
How to import/load a JSON config file.
How to import JSON data object.
(This does not write to the JSON config file. This imports the data object.)
- How to use XPATH to modify IxNetwork configurations.
- How to modify multiple configurations simultaneously.
- How to add a new Traffic Item by importing just the code fragments object.
How to write modifications on the JSON config file:
- How to modify configurations using dictionary style.
- How to write modications to the JSON config file.
- How to add additional configurations to a JSON config file:
- Such as adding additional Traffic Items.
- This sample script loads a binary .ixncfg config file.
- Reassign chassis/ports if necessary so you could use the saved config file on any testbed.
- Start/verify protocols, start traffic and verify stats.
- This sample script shows you how to use ReST APIs to create raw Traffic Items.
- By adding individual packet headers such as Ethernet, IPv4, etc.
- Note: Raw traffic is supported on the Linux API server starting with version 8.40.
- This sample script shows you how to use ReST API to configure egress tracking.
- For example: Packet entering the DUT with VLAN ID 101, and coming out of the DUT as VLAN ID 203.
This sample script demonstrates:
- REST API configurations using two back-to-back Ixia ports.
- Connecting to Windows IxNetwork API server or Linux API server.
- Verify port ownership.
- Load a saved NGPF Quick Test config file.
- Reassign Ports: Exclude calling assignPorts if it's unecessary.
- Verify port states.
- Apply Quick Test
- Start Quick Test
- Monitor Quick Test progress
- Get stats
- Configures two Topology Groups with two Ixia ports back-to-back.
- Create IPv4 Device Groups.
- Start/verify protocols, start traffic and get stats.
- Configures two Topology Groups with two Ixia ports back-to-back.
- Create BGP Device Groups.
- Start/verify protocols, start traffic and get stats.
- Configures two Topology Groups with two Ixia ports back-to-back.
- Create OSPF Device Groups.
- Start/verify protocols, start traffic and get stats.
- Configures two Topology Groups with two Ixia ports back-to-back.
- Create VxLAN Device Groups.
- Start/verify protocols, start traffic and get stats.
- Configures two Topology Groups: LACP/IPv4/OSPF
- Start protocols
- Verify LACP protocol sessions
- Verify OSPF protocol sessions
- Create a Traffic Item
- Apply Traffic, start traffic and get stats
ReST API
Linux API Server
Tutorial Video