diff --git a/2544.json b/2544.json deleted file mode 100644 index 0bc93ae..0000000 --- a/2544.json +++ /dev/null @@ -1,1197 +0,0 @@ -{ - "username": "hello", - "config": { - "test_configuration": { - "topology_config": { - "topology": "pairs", - "direction": "east_to_west" - }, - "frame_size_config": { - "frame_sizes": { - "packet_size_type": "ietf_default", - "custom_packet_sizes": [ - 512.0 - ], - "fixed_packet_start_size": 100, - "fixed_packet_end_size": 1500, - "fixed_packet_step_size": 100, - "varying_packet_min_size": 64, - "varying_packet_max_size": 1500, - "mixed_length_config": {}, - "mixed_sizes_weights": [ - 0, - 0, - 0, - 0, - 57, - 3, - 5, - 1, - 2, - 5, - 1, - 4, - 4, - 18, - 0, - 0 - ] - }, - "use_micro_tpld_on_demand": false, - "payload_type": "prbs", - "payload_pattern": "000000000000000000000000000000000000" - }, - "multi_stream_config": { - "enable_multi_stream": false, - "per_port_stream_count": 1, - "multi_stream_address_offset": 2, - "multi_stream_address_increment": 1, - "multi_stream_mac_base_address": "04:f4:bc" - }, - "test_execution_config": { - "flow_creation_config": { - "flow_creation_type": "stream_based", - "tid_allocation_scope": "config_scope", - "mac_base_address": "04:f4:bc" - }, - "port_scheduling_config": { - "enable_speed_reduction_sweep": false, - "use_port_sync_start": false, - "port_stagger_steps": 0 - }, - "outer_loop_mode": "packet_size", - "mac_learning_options": { - "mac_learning_mode": "every_trial", - "mac_learning_frame_count": 1, - "toggle_port_sync_config": { - "delay_after_sync_on_second": 1, - "toggle_port_sync": true, - "sync_off_duration_second": 1 - } - }, - "l23_learning_options": { - "learning_rate_pct": 1.0, - "learning_duration_second": 5000.0, - "arp_refresh_enabled": true, - "arp_refresh_period_second": 4000.0, - "use_gateway_mac_as_dmac": false - }, - "flow_based_learning_options": { - "use_flow_based_learning_preamble": false, - "flow_based_learning_frame_count": 1, - "delay_after_flow_based_learning_ms": 500 - }, - "reset_error_handling": { - "should_stop_on_los": true, - "delay_after_port_reset_second": 5 - }, - "repeat_test_until_stopped": false - } - }, - "protocol_segments": [ - { - "id": "79c4bfed-e33a-4a41-af45-5d7a84d3f445", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1111111111111111", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "807738dc-ddd3-4cf9-8ee9-24ebc5ce9533", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1000000100000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "vlan", - "fields": [ - { - "name": "PCP", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "CFI/DEI", - "value": "0", - "bit_length": 1, - "hw_modifier": null, - "value_range": null - }, - { - "name": "VLAN Tag", - "value": "000000000000", - "bit_length": 12, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1111111111111111", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "35004318-cd8e-45de-aff0-13e739e396e9", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1001000100000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "vlan", - "fields": [ - { - "name": "PCP", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "CFI/DEI", - "value": "0", - "bit_length": 1, - "hw_modifier": null, - "value_range": null - }, - { - "name": "VLAN Tag", - "value": "000000000000", - "bit_length": 12, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1000000100000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "vlan", - "fields": [ - { - "name": "PCP", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "CFI/DEI", - "value": "0", - "bit_length": 1, - "hw_modifier": null, - "value_range": null - }, - { - "name": "VLAN Tag", - "value": "000000000000", - "bit_length": 12, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1111111111111111", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "fe83268c-7947-4cb6-95a6-532a558a602e", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "0000100000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv4", - "fields": [ - { - "name": "Version", - "value": "0100", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Length", - "value": "0101", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "DSCP", - "value": "000000", - "bit_length": 6, - "hw_modifier": null, - "value_range": null - }, - { - "name": "ECN", - "value": "00", - "bit_length": 2, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Total Length", - "value": "0000000000010100", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Identification", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flags", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Fragment Offset", - "value": "0000000000000", - "bit_length": 13, - "hw_modifier": null, - "value_range": null - }, - { - "name": "TTL", - "value": "01111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Protocol", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Checksum", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": 10 - } - ] - }, - { - "id": "23aac7f8-b863-4d38-b2d3-3893e7d3f0f2", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "0000100000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv4", - "fields": [ - { - "name": "Version", - "value": "0100", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Length", - "value": "0101", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "DSCP", - "value": "000000", - "bit_length": 6, - "hw_modifier": null, - "value_range": null - }, - { - "name": "ECN", - "value": "00", - "bit_length": 2, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Total Length", - "value": "0000000000010100", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Identification", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flags", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Fragment Offset", - "value": "0000000000000", - "bit_length": 13, - "hw_modifier": null, - "value_range": null - }, - { - "name": "TTL", - "value": "01111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Protocol", - "value": "00010001", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Checksum", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": 10 - }, - { - "type": "udp", - "fields": [ - { - "name": "Src Port", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest Port", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Length", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Checksum", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "21499fa3-1774-4bbe-8809-3f1f7bb27e36", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1000011011011101", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv6", - "fields": [ - { - "name": "Version", - "value": "0110", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Traffic Class", - "value": "00000000", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flow Label", - "value": "00000000000000000000", - "bit_length": 20, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Payload Length", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Next Header", - "value": "00111011", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Hop Limit", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "d25155be-eaff-418f-8f1d-b7953b044f5f", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "0000100000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv4", - "fields": [ - { - "name": "Version", - "value": "0100", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Length", - "value": "0101", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "DSCP", - "value": "000000", - "bit_length": 6, - "hw_modifier": null, - "value_range": null - }, - { - "name": "ECN", - "value": "00", - "bit_length": 2, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Total Length", - "value": "0000000000010100", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Identification", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flags", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Fragment Offset", - "value": "0000000000000", - "bit_length": 13, - "hw_modifier": null, - "value_range": null - }, - { - "name": "TTL", - "value": "01111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Protocol", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Checksum", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": 10 - }, - { - "type": "ipv6", - "fields": [ - { - "name": "Version", - "value": "0110", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Traffic Class", - "value": "00000000", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flow Label", - "value": "00000000000000000000", - "bit_length": 20, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Payload Length", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Next Header", - "value": "00111011", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Hop Limit", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - } - ] - }, - { - "id": "dff84ff7-de27-4e2b-ab22-144c1194e9ae", - "segments": [ - { - "type": "ethernet", - "fields": [ - { - "name": "Dst MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src MAC addr", - "value": "000000000000000000000000000000000000000000000000", - "bit_length": 48, - "hw_modifier": null, - "value_range": null - }, - { - "name": "EtherType", - "value": "1000011011011101", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv6", - "fields": [ - { - "name": "Version", - "value": "0110", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Traffic Class", - "value": "00000000", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flow Label", - "value": "00000000000000000000", - "bit_length": 20, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Payload Length", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Next Header", - "value": "00111011", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Hop Limit", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IPv6 Addr", - "value": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "bit_length": 128, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": null - }, - { - "type": "ipv4", - "fields": [ - { - "name": "Version", - "value": "0100", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Length", - "value": "0101", - "bit_length": 4, - "hw_modifier": null, - "value_range": null - }, - { - "name": "DSCP", - "value": "000000", - "bit_length": 6, - "hw_modifier": null, - "value_range": null - }, - { - "name": "ECN", - "value": "00", - "bit_length": 2, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Total Length", - "value": "0000000000010100", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Identification", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Flags", - "value": "000", - "bit_length": 3, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Fragment Offset", - "value": "0000000000000", - "bit_length": 13, - "hw_modifier": null, - "value_range": null - }, - { - "name": "TTL", - "value": "01111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Protocol", - "value": "11111111", - "bit_length": 8, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Header Checksum", - "value": "0000000000000000", - "bit_length": 16, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Src IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - }, - { - "name": "Dest IP Addr", - "value": "00000000000000000000000000000000", - "bit_length": 32, - "hw_modifier": null, - "value_range": null - } - ], - "checksum_offset": 10 - } - ] - } - ], - "ports_configuration": [ - { - "port_slot": 0, - "peer_slot": 0, - "port_group": "east", - "port_speed_mode": "auto", - "ip_address": null, - "ip_gateway_mac_address": "000000000000", - "reply_arp_requests": true, - "reply_ping_requests": true, - "remote_loop_mac_address": "000000000000", - "inter_frame_gap": 20, - "speed_reduction_ppm": 0, - "pause_mode_enabled": 0, - "latency_offset_ms": 0, - "fec_mode": "off", - "port_rate_cap_enabled": false, - "port_rate_cap_value": 1000.0, - "port_rate_cap_profile": "physical_port_rate", - "port_rate_cap_unit": "1e6_bps", - "auto_neg_enabled": true, - "anlt_enabled": false, - "mdi_mdix_mode": "auto", - "broadr_reach_mode": "slave", - "protocol_segment_profile_id": "79c4bfed-e33a-4a41-af45-5d7a84d3f445" - }, - { - "port_slot": 1, - "peer_slot": 1, - "port_group": "west", - "port_speed_mode": "auto", - "ip_address": null, - "ip_gateway_mac_address": "000000000000", - "reply_arp_requests": true, - "reply_ping_requests": true, - "remote_loop_mac_address": "000000000000", - "inter_frame_gap": 20, - "speed_reduction_ppm": 0, - "pause_mode_enabled": 0, - "latency_offset_ms": 0, - "fec_mode": "off", - "port_rate_cap_enabled": false, - "port_rate_cap_value": 1000.0, - "port_rate_cap_profile": "physical_port_rate", - "port_rate_cap_unit": "1e6_bps", - "auto_neg_enabled": true, - "anlt_enabled": false, - "mdi_mdix_mode": "auto", - "broadr_reach_mode": "slave", - "protocol_segment_profile_id": "79c4bfed-e33a-4a41-af45-5d7a84d3f445" - } - ], - "test_types_configuration": { - "throughput_test": { - "enabled": true, - "common_options": { - "duration_type": "time", - "duration": 10.0, - "duration_unit": "seconds", - "repetition": 1 - }, - "rate_iteration_options": { - "search_type": "binary_search", - "result_scope": "common_result", - "initial_value_pct": 100.0, - "minimum_value_pct": 0.1, - "maximum_value_pct": 100.0, - "value_resolution_pct": 0.5 - }, - "use_pass_criteria": false, - "pass_threshold_throughput_pct": 0.0, - "acceptable_loss_pct": 0.0, - "collect_latency_jitter": false - }, - "latency_test": { - "enabled": false, - "common_options": { - "duration_type": "time", - "duration": 1.0, - "duration_unit": "seconds", - "repetition": 1 - }, - "rate_sweep_options": { - "start_value_pct": 50.0, - "end_value_pct": 100.0, - "step_value_pct": 50.0 - }, - "latency_mode": "last_to_last", - "use_relative_to_throughput": true - }, - "frame_loss_rate_test": { - "enabled": false, - "common_options": { - "duration_type": "time", - "duration": 1.0, - "duration_unit": "seconds", - "repetition": 1 - }, - "rate_sweep_options": { - "start_value_pct": 50.0, - "end_value_pct": 100.0, - "step_value_pct": 50.0 - }, - "use_gap_monitor": false, - "gap_monitor_start_microsec": 0, - "gap_monitor_stop_frames": 0, - "use_pass_criteria": false, - "pass_criteria_loss": 0.0, - "pass_criteria_loss_type": "percent" - }, - "back_to_back_test": { - "enabled": false, - "common_options": { - "repetition": 1 - }, - "rate_sweep_options": { - "start_value_pct": 50.0, - "end_value_pct": 100.0, - "step_value_pct": 50.0 - }, - "burst_size_iteration_options": { - "burst_resolution": 100.0 - } - } - } - }, - "port_identities": [ - { - "tester_id": "2906f8d041e9fd07191d6a37ef5785b2", - "module_index": 5, - "port_index": 0 - }, - { - "tester_id": "2906f8d041e9fd07191d6a37ef5785b2", - "module_index": 5, - "port_index": 1 - } - ] -} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 092c9d9..fc2f593 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2022 Xena Networks + Copyright 2023 Xena Networks Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/config.py b/config.py deleted file mode 100644 index 3c9285a..0000000 --- a/config.py +++ /dev/null @@ -1,2 +0,0 @@ -INPUT_DATA_PATH = 'test/2.v2544' -JSON_PATH = 'test/hello.json' \ No newline at end of file diff --git a/doc/output_format_2544.py b/doc/output_format_2544.py deleted file mode 100644 index bfc557a..0000000 --- a/doc/output_format_2544.py +++ /dev/null @@ -1,193 +0,0 @@ -LATENCY_OUTPUT = { - "test_suite_type": ..., - "result_state": ..., - "test_case_type": ..., - "tx_rate_percent": ..., - "tx_rate_nominal_percent": ..., - "is_final": ..., - "frame_size": ..., - "repetition": ..., - "total": { - "tx_counter": {"frames", "l1_bps", "fps"}, - "rx_counter": {"frames"}, - "fcs_error_frames": ..., - }, - "port_data": { - "__all__": { - "port_id": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "latency": {"average", "minimum", "maximum"}, - "jitter": {"average", "minimum", "maximum"}, - "stream_statistic": { - "__all__": { - "src_port_id": ..., - "dest_port_id": ..., - "src_port_addr": ..., - "dest_port_addr": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "latency": {"average", "minimum", "maximum"}, - "jitter": {"average", "minimum", "maximum"}, - } - }, - } - }, -} - -FRAME_LOSS_OUTPUT = { - "test_suite_type": ..., - "test_case_type": ..., - "result_state": ..., - "tx_rate_percent": ..., - "is_final": ..., - "frame_size": ..., - "repetition": ..., - "total": { - "tx_counter": {"frames", "l1_bps", "fps"}, - "rx_counter": {"frames", "l1_bps", "fps"}, - "rx_loss_frames": ..., - "rx_loss_percent": ..., - "fcs_error_frames": ..., - }, - "port_data": { - "__all__": { - "port_id": ..., - "tx_counter": {"frames", "l1_bps", "fps"}, - "rx_counter": {"frames", "l1_bps", "fps"}, - "stream_statistic": { - "__all__": { - "src_port_id": ..., - "dest_port_id": ..., - "src_port_addr": ..., - "dest_port_addr": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "loss_frames": ..., - } - }, - } - }, -} - - -THROUGHPUT_PER_PORT = { - "test_suite_type": ..., - "test_case_type": ..., - "result_state": ..., - "is_final": ..., - "frame_size": ..., - "repetition": ..., - "rate_result_scope": ..., - "total": { - "tx_counter": {"frames", "l1_bps", "l2_bps", "fps"}, - "rx_counter": {"frames"}, - "rx_loss_frames": ..., - "rx_loss_percent": ..., - "fcs_error_frames": ..., - "tx_rate_l1_bps_theor": ..., - "tx_rate_fps_theor": ..., - "ber": ..., - }, - "port_data": { - "__all__": { - "rate": ..., - "port_id": ..., - "actual_rate_percent": ..., - "tx_counter": {"frames", "l1_bps", "l2_bps", "fps"}, - "rx_counter": {"frames", "l1_bps", "l2_bps", "fps"}, - "loss_frames": ..., - "loss_ratio": ..., - "stream_statistic": { - "__all__": { - "src_port_id": ..., - "dest_port_id": ..., - "src_port_addr": ..., - "dest_port_addr": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "loss_frames": ..., - } - }, - } - }, -} - -THROUGHPUT_COMMON = { - "test_suite_type": ..., - "test_case_type": ..., - "result_state": ..., - "is_final": ..., - "frame_size": ..., - "repetition": ..., - "tx_rate_percent": ..., - "rate_result_scope": ..., - "total": { - "tx_counter": {"frames", "l1_bps", "fps"}, - "rx_counter": {"frames", "l1_bps", "fps"}, - "rx_loss_frames": ..., - "rx_loss_percent": ..., - "fcs_error_frames": ..., - "tx_rate_l1_bps_theor": ..., - "tx_rate_fps_theor": ..., - "ber": ..., - }, - "port_data": { - "__all__": { - "port_id": ..., - "tx_counter": {"frames", "l1_bps", "l2_bps", "fps"}, - "rx_counter": {"frames", "l1_bps", "l2_bps", "fps"}, - "loss_frames": ..., - "loss_ratio": ..., - "stream_statistic": { - "__all__": { - "src_port_id": ..., - "dest_port_id": ..., - "src_port_addr": ..., - "dest_port_addr": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "loss_frames": ..., - } - }, - } - }, -} - - -BACKTOBACKOUTPUT = { - "test_suite_type": ..., - "test_case_type": ..., - "result_state": ..., - "tx_rate_percent": ..., - "is_final": ..., - "frame_size": ..., - "repetition": ..., - "total": { - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "tx_burst_frames": ..., - "tx_burst_bytes": ..., - "rx_loss_frames": ..., - "rx_loss_percent": ..., - "fcs_error_frames": ..., - }, - "port_data": { - "__all__": { - "port_id": ..., - "burst_frames": ..., - "burst_bytes_count": ..., - "stream_statistic": { - "__all__": { - "src_port_id": ..., - "dest_port_id": ..., - "src_port_addr": ..., - "dest_port_addr": ..., - "tx_counter": {"frames"}, - "rx_counter": {"frames"}, - "loss_frames": ..., - } - }, - } - }, -} diff --git a/main.py b/main.py deleted file mode 100644 index 3768dd7..0000000 --- a/main.py +++ /dev/null @@ -1,113 +0,0 @@ -from __future__ import annotations -import asyncio -import json -import platform -import pydantic -from xoa_core import types, controller -from xoa_converter.entry import converter -from xoa_converter.types import TestSuiteType -from rich.live import Live -from rich.table import Table -from rich.console import Console -from typing import Dict, List, Any, cast -from pathlib import Path -from loguru import logger - - -DEBUG = True -BASE_PATH = Path.cwd() -PLUGINS_PATH = BASE_PATH -INPUT_DATA_PATH = BASE_PATH / "test" / "1.v3918" -INPUT_DATA_PATH = BASE_PATH / "test" / "1.v2544" -JSON_PATH = BASE_PATH / "test" / "hello.json" -T_SUITE_NAME = "RFC-3918" -T_SUITE_NAME = "RFC-2544" - - -class T3918Displayer: - console = Console() - - @classmethod - def generate_table(cls, results: Dict) -> List[Table]: - """Make a new table.""" - all_tables = [] - total_table = Table() - total_table_row = [] - for k, v in results.items(): - if k not in {"Source Ports", "Destination Ports"}: - total_table.add_column(k, no_wrap=True) - total_table_row.append(str(v)) - else: - for p in v: - port_table = Table() - port_table_row = [] - for t, m in p.items(): - port_table.add_column(t, no_wrap=True) - port_table_row.append(str(m)) - port_table.add_row(*port_table_row) - all_tables.append(port_table) - - total_table.add_row(*total_table_row) - all_tables.append(total_table) - - return all_tables - - @classmethod - def display(cls, result: Dict) -> None: - cls.console.clear() - tables = cls.generate_table(result) - for table in tables: - with Live(console=cls.console, screen=False, refresh_per_second=1) as live: - live.update(table) - - -def set_windows_loop_policy(): - plat = platform.system().lower() - if plat == "windows": - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - - -async def subscribe(ctrl: controller.MainController, source: str) -> None: - async for msg in ctrl.listen_changes(source, _filter={types.EMsgType.STATISTICS}): - # T2544Displayer.display(json.loads(msg.payload.json())) - print(msg.payload) - pass - - -async def start_test( - ctrl: controller.MainController, config: dict[str, Any], test_suite_name: str -) -> None: - exec_id = ctrl.start_test_suite(test_suite_name, config, debug_connection=DEBUG) - await subscribe(ctrl, exec_id) - - -async def main() -> None: - new = [ - types.Credentials( - product=types.EProductType.VALKYRIE, - host="demo.xenanetworks.com", - password=cast(pydantic.SecretStr, "xena"), - ), - ] - c = await controller.MainController() - c.register_lib(str(PLUGINS_PATH)) - - await asyncio.gather(*[c.add_tester(t) for t in new]) - asyncio.create_task(subscribe(c, types.PIPE_EXECUTOR)) - - with open(INPUT_DATA_PATH) as f: - app_data = f.read() - info = c.get_test_suite_info(T_SUITE_NAME) - if not info: - logger.error("Test suite is not recognised.") - return None - new_data = converter(TestSuiteType(T_SUITE_NAME), app_data) - with open(JSON_PATH, "w") as f: - f.write(new_data) - config = json.loads(new_data) - await start_test(c, config, T_SUITE_NAME) - - -if __name__ == "__main__": - set_windows_loop_policy() - asyncio.run(main())