Ixia NGPF

The ixiangpf module is the trafficgen implementation that uses ixnetwork_ngpf to interface with Ixia devices.

The IxiaNgpf class can connect to Ixia traffic generator devices that are running IxNetwork API server versions 7.50 or higher.

Usage:

devices:
    ixia8:
        type: tgn
        os: 'ixiangpf'
        connections:
            tgn:
                class: genie.trafficgen.TrafficGen
                ixnetwork_api_server_ip: 192.0.0.1 # Remote VM IP
                ixnetwork_tcl_port: 8012
                ixnetwork_version: '9.20'
                ixia_chassis_ip: 1.1.1.1 # IxOS
                ixia_license_server_ip: 192.0.0.1 # Remote VM IP
                ixia_port_list: ['1/1', '1/2']

IxiaNgpf Class

class genie.trafficgen.ixiangpf.implementation.IxiaNgpf(device, *args, **kwargs)[source]

Bases: genie.trafficgen.ixianative.implementation.IxiaNative

__init__ instantiates a single connection instance.

connect()[source]

Connect to Ixia

isconnected()[source]

Decorator to make sure session to device is active

There is limitation on the amount of time the session can be active to IxNetwork API server. However, there are no way to verify if the session is still active unless we test sending a command.

test(x, y=1, z=None)[source]

Test method

topology_config(topology_name='', port_handle='', topology_handle='', mode='config', device_group_name='', device_group_multiplier='10', device_group_enabled='1')[source]

Configure topology under Scenario e.g.

_result_ = self.ixiangpf.topology_config(
    topology_name      = """Topology 1""",
    port_handle        = "1/3/10",
)
multivalue_config(pattern='counter', counter_start='1.1.1.1', counter_step='0.0.0.1', counter_direction='increment', nest_step='0.1.0.0', nest_owner='topology_handle', nest_enabled='1')[source]

Generic NGPF multivalue_config function can be used for Layer2 MAC addresses and Layer3 IPv4/6 etc.

interface_config_ethernet(protocol_name='Ethernet 1', protocol_handle='deviceGroup_handle', mtu='1500', src_mac_addr='multivalue_handle', vlan='0', vlan_id='1', vlan_id_step='0', vlan_id_count='1', vlan_tpid='0x8100', vlan_user_priority='0', vlan_user_priority_step='0', use_vpn_parameters='0', site_id='0')[source]

Configure an interface with Ethernet information Important input is the mac address information multivalue_handle returned from multivalue_config()

interface_config_ipv4(protocol_name='IPv4 1', protocol_handle='ethernet_handle', ipv4_multiplier='1', ipv4_resolve_gateway='1', ipv4_manual_gateway_mac='00.00.00.00.00.01', ipv4_manual_gateway_mac_step='00.00.00.00.00.00', ipv4_enable_gratarprarp='0', ipv4_gratarprarp='gratarp', gateway='10.10.10.1', gateway_step='0.0.0.0', intf_ip_addr='multivalue_handle', netmask='255.255.255.0', wait_time=10)[source]

Configure an interface with IPv4 information Input ethernet_handle from interface_config_ethernet() and IP information from multivalue_config()

test_control(action='start_all_protocols', handle='', wait_time=10)[source]

Various actions: common ones include start_all_protocols stop_all_protocols -action CHOICES start_all_protocols

CHOICES stop_all_protocols CHOICES restart_down CHOICES start_protocol CHOICES stop_protocol CHOICES abort_protocol CHOICES apply_on_the_fly_changes CHOICES check_link_state CHOICES get_all_qt_handles CHOICES get_available_qt_types CHOICES get_qt_handles_for_type CHOICES qt_remove_test CHOICES qt_apply_config CHOICES qt_start CHOICES qt_run CHOICES qt_stop CHOICES qt_wait_for_test CHOICES is_done CHOICES wait CHOICES get_result CHOICES qt_get_input_params CHOICES configure_all

traffic_config(mode='create', emulation_src_handle='topo1_hndl', emulation_dst_handle='topo2_hndl', src_dest_mesh='one_to_one', route_mesh='one_to_one', track_by='traffic_item', bidirectional='1', name='Traffic_Item_1', frame_size='512', rate_pps='1000', circuit_endpoint_type='ipv4')[source]

Create traffic items with streams

traffic_control(action='stop', handle='', wait_time=10, packet_loss_duration_enable=False)[source]

Valid values are: “sync_run|run|manual_trigger|stop|poll|reset|destroy|clear_stats|regenerate|apply”

traffic_stats(mode='traffic_item', wait_time=5)[source]

Valid values for mode are: “all|aggregate|flow|l23_test_summary|stream|streams|traffic_item|L47_traffic_item” There’s more too check the TCL documentation for all

Returns a dictionary with all the stats