Пример #1
0
def main():
    print("""
#Description: Setup fusion streams
#Procedure:
#1 - Load the fusion streams configuration on the local and remote h100.
#1.1 - Validate all analyzer interfaces have oper-status=up.
#1.2 - Validate no counters are being incremented.
""")

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        help=
        "Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml"
    )
    args = parser.parse_args()

    tree = etree.parse(args.config)
    network = tree.xpath('/nc:config/nd:networks/nd:network',
                         namespaces=namespaces)[0]

    conns = tntapi.network_connect(network)
    yconns = tntapi.network_connect_yangrpc(network)

    mylinks = tntapi.parse_network_links(network)

    filter = testsuiteapi.get_filter()

    print("#Running ...")
    print(
        "#1 - Load the fusion streams configuration on the local and remote h100."
    )
    step_1(network, conns, yconns, filter=filter)
Пример #2
0
def main():
    print("""
#Description: Stat traffic
#Procedure:
#1 - Start traffic generators on the local and middle h100 ge0-9 interfaces.
#1.1 - Validate counters are being incremented.
""")

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        help=
        "Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml"
    )
    args = parser.parse_args()

    tree = etree.parse(args.config)
    network = tree.xpath('/nc:config/nd:networks/nd:network',
                         namespaces=namespaces)[0]

    conns = tntapi.network_connect(network)
    yconns = tntapi.network_connect_yangrpc(network)

    mylinks = tntapi.parse_network_links(network)

    filter = testsuiteapi.get_filter()

    print("#Running ...")
    print(
        "#1 - Start traffic generators on the local and middle h100 ge0-9 interfaces."
    )
    step_1(network, conns, yconns, filter=filter)
Пример #3
0
def main():
	print("""
<test-spec>
===Objective===
In iterrative steps reproduce the configuration example presented as part of the User Guide Complex Loopback Example
===Procedure===
Only the analyzer.ge0 (1G) and analyzer.xe0 (10G) generators are used. Note there is significant difference from the original userguide example. The 1G traffic is GST and the 10G generator is SM.
In itterative steps loopbacks are created so that the SM traffic forms a serpentine going through a loopback on each of the ge1-ge9 interfaces and the xe0 (n1) while GST is multicasted to all ge1-ge9 interfaces and after contention returned to the origin.
After each iterrative step the traffic generated should return with the corresponding traffic class properties.
===DUT configuration===
This testcase is enhancing the [[H100_r.1.6_NETCONF/YANG_usecase_examples_using_the_low_level_Fusion_core_model#Complex_loopback_example]] configuration by adding identical data paths for ge4-9 interfaces.

====Steps====
# Create near-end loopbacks on xe0 and ge0-9.
# Configure the DUT to aggregte ingress SM traffic from ep0 to np1 with vlan tag vlan-id=vlan_id_base(=100)+1 and forward ingress from np1 with vlan tag to ep0 after removing the tag.
## Generate traffic on ep0 and validate traffic returns without losses.
# Change the configuration so that ingress traffic on np1 with vlan tag is forwarded to ep1 instead of ep0. Create near-end loopback on ep1. Configure multiplexed sm/gst mode and forward ingress SM traffic to np1 with vlan-id=vlan_id_base+1 and forward the returning ingress traffic back to ep0.
##assert(delta["analyzer"]['xe0'].testframe_payload_errors==0)
##assert(delta["analyzer"]['xe0'].out_pkts>=1000000)
##assert(delta["analyzer"]['xe0'].out_pkts==delta["analyzer"]['xe0'].in_pkts+sum)
##assert(delta["analyzer"]['xe0'].out_pkts==delta["analyzer"]['xe0'].in_pkts)
##assert(delta["analyzer"]['xe0'].testframe_sequence_errors<=1)
##assert(delta["analyzer"]['ge0'].testframe_payload_errors==0)
##assert(delta["analyzer"]['ge0'].out_pkts>=1000000)
##assert(delta["analyzer"]['ge0'].in_pkts>=1000000)
##assert((delta["analyzer"]['ge0'].in_pkts+delta["local"]['ge15'].fusion_np_tx_gst_multicast_contentions)==delta["analyzer"]['ge0'].out_pkts)
##assert(step==2 or delta["analyzer"]['ge0'].out_pkts==(sum(delta["local"][interface].fusion_ep_to_np0_gst_multicast_contentions))/(step-2)))
##assert(gst_pdv<400)
# Repeat the previous step for all remaining ge2-9 ports.

===Results===
# N.A.
===Acceptance criteria===
# N.A.

</test-spec>
""")

	parser = argparse.ArgumentParser()
	parser.add_argument("--config", help="Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml")
	args = parser.parse_args()


	tree=etree.parse(args.config)
	network = tree.xpath('/nc:config/nd:networks/nd:network', namespaces=namespaces)[0]

	conns = tntapi.network_connect(network)
	yconns = tntapi.network_connect_yangrpc(network)
	mylinks = tntapi.parse_network_links(network)

	filter = testsuiteapi.get_filter()

	init(network, conns, yconns, filter)
	step_1(network, conns, yconns, filter)
	for step in range(1,10):
		step_common(network, conns, yconns, filter, step+1)
	terminate(network, conns, yconns, filter)
Пример #4
0
def main():
    print("""
<test-spec>
===Objective===
Test validating fusion-ep-to-np1-sm-buf-overflows counter registers all SM packets lost due to buffer overflows.
===Procedure===
Generate point-to-point packet streams with TPID=ABCD from remote.ep0-9 to local.ep0-9. Each stream should be as close as possible to the 100% throughput limit so that packet loss due to buf overflow is guaranteed to happen when GST stream with minimal length packets are enabled on remote.ge5-9.
===DUT configuration===
This testcase is enhancing the [[VCU-110_Prototype_r1.6#FPGA_Setup]] configuration by adding identical data paths for ge5-9 interfaces.

====Steps====
# Create near-end loopbacks and generate SM streams of 1500 octet packets and 12 octet interframe gaps from remote.ge0-4 and GST streams of 64 octet frames with 12 octet interframe gaps form remote remote.ge5-ge9
## Assert for name:ge0-4  delta["remot"][name].out_pkts==delta["remote"][name].in_pkts>=1000000
## Assert for name:ge0-4  delta["local"][name].out_pkts==delta["remote"][name].in_pkts
## Assert delta["remote"][name].fusion_ep_to_np1_sm_buf_overflows==0
# Identical to Step 2 but generate SM traffic on all interfaces
## Assert for name:ge0-4  delta["remot"][name].out_pkts==delta["remote"][name].in_pkts>=1000000
## Assert for name:ge0-4  delta["local"][name].out_pkts==delta["remote"][name].in_pkts-delta["remote"][name].fusion_ep_to_np1_sm_buf_overflows
# Repeat the first step.
===Results===
# N.A.
===Acceptance criteria===
# assert((local_pkts_received-remote_pkts_sent==sm_buf_overflows)

</test-spec>
""")

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        help=
        "Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml"
    )
    args = parser.parse_args()

    tree = etree.parse(args.config)
    network = tree.xpath('/nc:config/nd:networks/nd:network',
                         namespaces=namespaces)[0]

    conns = tntapi.network_connect(network)
    yconns = tntapi.network_connect_yangrpc(network)
    mylinks = tntapi.parse_network_links(network)

    filter = testsuiteapi.get_filter()

    init(network, conns, yconns, filter=filter)
    step_1(network, conns, filter=filter)
    step_2(network, conns, yconns, filter=filter)
    step_3(network, conns, filter=filter)
    terminate(network, conns, yconns, filter=filter)
Пример #5
0
def main():
    print("""
<test-spec>
===Objective===
Test validating fusion-np-tx-gst-multicast-contentions counter registers all GST packets lost due to contention.
===Procedure===
Generate point-to-point packet streams with TPID=88F7 from both local.ep0 and remote.ep0 to local.n0. Each stream should be above the 50% throughput limit of n0 (1Gb) so that packet loss due to contention is guaranteed to happen.
===DUT configuration===
This testcase is using the [[VCU-110_Prototype_r1.6#FPGA_Setup]] configuration and it is not changed during the test.

====Steps====
# Generate timing critical stream of 1000000 64 octet packets and 640 octet interframe gaps from timing slaves (analyzer.xe0, analyzer.xe1)
## Assert delta["analyzer"]["xe0"].out_unicast_pkts>=1000000
## Assert delta["analyzer"]["xe1"].out_unicast_pkts>=1000000
## Assert delta["analyzer"]["ge0"].in_unicast_pkts>=1000000
## Assert delta["analyzer"]["ge0"].in_unicast_pkts==delta["analyzer"]["xe0"].out_unicast_pkts+delta["analyzer"]["xe1"].out_unicast_pkts-delta["local"]["ge15"].fusion_np_tx_gst_multicast_contentions
## Return local_pkts_sent - delta["analyzer"]["xe0"].out_unicast_pkts
## Return remote_pkts_sent - delta["analyzer"]["xe1"].out_unicast_pkts
## Return total_pkts_received - delta["analyzer"]["ge0"].in_unicast_pkts
## Return contentions - delta["local"]["ge15"].fusion_np_tx_gst_multicast_contentions

===Results===
# N.A.
===Acceptance criteria===
# assert((local_pkts_sent+remote_pkts_sent-total_pkts_received)==contentions)

</test-spec>
""")

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        help=
        "Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml"
    )
    args = parser.parse_args()

    tree = etree.parse(args.config)
    network = tree.xpath('/nc:config/nd:networks/nd:network',
                         namespaces=namespaces)[0]

    conns = tntapi.network_connect(network)
    mylinks = tntapi.parse_network_links(network)

    filter = testsuiteapi.get_filter()

    init(network, conns, filter=filter)
    (local_pkts_sent, remote_pkts_sent, total_pkts_received,
     contentions) = step_1(network, conns, filter=filter)

    print("# Test report:")
    print(
        "local-pkts-sent=%(local_pkts_sent)d, remote-pkts-sent=%(remote_pkts_sent)d, total-pkts-received=%(total_pkts_received)d, contentions=%(contentions)d"
        % {
            'local_pkts_sent': local_pkts_sent,
            'remote_pkts_sent': remote_pkts_sent,
            'total_pkts_received': total_pkts_received,
            'contentions': contentions
        })

    #Acceptance criteria
    assert ((local_pkts_sent + remote_pkts_sent -
             total_pkts_received) == contentions)
Пример #6
0
def main():
	print("""
<test-spec>
===Objective===
Delay symmetry requirements test. Validate the forward and return paths master-slave are symmetric in terms of delay for all possible master-slave traffic paths.
===Procedure===
Generate point-to-point packet streams with TPID=88F7. There should be enough interframe gap to avoid contention and validate zero packet loss.
===DUT configuration===
This testcase is using the [[VCU-110_Prototype_r1.6#FPGA_Setup]] configuration and it is not changed during the test.

====Steps====
# Generate timing critical stream of 1000000 64 octet packets and 1024 octet interframe gaps from timing master (analyzer.ge0) and measure the min and max latencies at the timing slave ports (analyzer.xe0,xe1,analyzer.ge1)
## Assert delta["analyzer"]["ge0"].out_unicast_pkts>=1000000
## Assert delta["analyzer"]["xe0"].in_unicast_pkts==delta["analyzer"]["ge0"].out_unicast_pkts
## Assert delta["analyzer"]["xe1"].in_unicast_pkts==delta["analyzer"]["ge0"].out_unicast_pkts
## Assert delta["analyzer"]["ge1"].in_unicast_pkts==delta["analyzer"]["ge0"].out_unicast_pkts
## Return lat_ge0_xe[0-1]_min, lat_ge0_ge1_min - Minimum latencies from ge0 to xe0, xe1, ge1.
# Generate timing critical stream of 1000000 64 octet packets and 10240 octet interframe gaps from timing slave (analyzer.xe0) and measure the min and max latencies at the timing master port (analyzer.ge0)
## Assert delta["analyzer"][name].out_unicast_pkts>=1000000.
## Assert delta["analyzer"]["ge0"].in_unicast_pkts==delta["analyzer"]["xe0"].out_unicast_pkts.
## Return lat_xe0_ge0_min - Minimum latency measured from xe0 to ge0
# Same as Step 2 for xe1.
# Same as Step 2 for ge1 and generate interframe gap of 1024 octets instead of 10240.

===Results===
# Local,Remote,Remote NP0  abs-[to/from]-delay - absolute delay for the forward path from timing master to local slave.
# Local,Remote,Remote NP0 asymmetry-delta-delay - difference between the to and from paths.

===Acceptance criteria===
# abs(lat_ge0_xe0_min-lat_xe0_ge0_min)<500)
# abs(lat_ge0_xe1_min-lat_xe1_ge0_min)<500)
</test-spec>
""")

	parser = argparse.ArgumentParser()
	parser.add_argument("--config", help="Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml")
	args = parser.parse_args()


	tree=etree.parse(args.config)
	network = tree.xpath('/nc:config/nd:networks/nd:network', namespaces=namespaces)[0]

	conns = tntapi.network_connect(network)
	mylinks = tntapi.parse_network_links(network)

	filter = testsuiteapi.get_filter()


        init(network, conns, filter=filter)
	(lat_ge0_xe0_min, lat_ge0_xe1_min, lat_ge0_ge1_min)=step_1(network, conns, filter=filter)
	lat_xe0_ge0_min=step_2(network, conns, filter=filter)
	lat_xe1_ge0_min=step_3(network, conns, filter=filter)
	lat_ge1_ge0_min=step_4(network, conns, filter=filter)

        print("# Test report:")
        print("# Local edge port: abs-to-delay=%(to)d ns, abs-from-delay=%(from)d ns, asymmetry-delta-delay=%(delta)d ns"%{'to':lat_ge0_xe0_min,'from':lat_xe0_ge0_min,'delta':abs(lat_ge0_xe0_min-lat_xe0_ge0_min)})
        print("# Remote edge port: abs-to-delay=%(to)d ns, abs-from-delay=%(from)d ns, asymmetry-delta-delay=%(delta)d ns"%{'to':lat_ge0_xe1_min,'from':lat_xe1_ge0_min,'delta':abs(lat_ge0_xe1_min-lat_xe1_ge0_min)})
        print("# Remote network 0: abs-to-delay=%(to)d ns, abs-from-delay=%(from)d ns, asymmetry-delta-delay=%(delta)d ns"%{'to':lat_ge0_ge1_min,'from':lat_ge1_ge0_min,'delta':abs(lat_ge0_ge1_min-lat_ge1_ge0_min)})

	#Acceptance criteria
	assert(abs(lat_ge0_xe0_min-lat_xe0_ge0_min)<500)
	assert(abs(lat_ge0_xe1_min-lat_xe1_ge0_min)<500)
Пример #7
0
def main():
    print("""
<test-spec>
#Description: Bulk traffic test
#Procedure:
#1 - Generate bulk traffic stream of 1000000 1500 octet packets and 12 octet interframe gaps to both local.e0 and remote.e0 (analyzer.xe0,xe1)
#1.1 - Validate more that 99.5% of the packets are received at their destinations.
#1.2 - Validate there are no testframe payload errors.
===Objective===
Bulk traffic test. Send bidirectional SM traffic with maximal utilization between the local and remote node. 
===Procedure===
Generate point-to-point packet streams >1000000 frames with TPID=ABCD 1500 octet frames and 12 octets interframe gap. There should be zero packet loss.
===DUT configurations===
This testcase is depending on already loaded [[VCU-110_Prototype_r1.6#FPGA_Setup]] configuration and it is not modified during the test.

====Steps====
# Generate bidirectional bulk traffic stream of 1000000 1500 octet packets and 12 octet interframe gaps TPID=ABCD from-to local.e0 and remote.e0 (analyzer.xe0,xe1)
## Validate more that 99.5% of the packets are received at their destinations.
### Assert delta["analyzer"]["ge0"].in_unicast_pkts==0
### Assert delta["analyzer"]["ge1"].in_unicast_pkts==0
### Assert delta["analyzer"]["xe0"].out_unicast_pkts>=1000000
### Assert delta["analyzer"]["xe1"].out_unicast_pkts>=1000000
### Assert assert(delta["analyzer"]["xe1"].out_unicast_pkts-delta["analyzer"]["xe0"].in_unicast_pkts == delta["local"]["ge0"].fusion_np1_to_ep_sm_drop_reinsert_buf_overflows)
### Assert assert(delta["analyzer"]["xe0"].out_unicast_pkts-delta["analyzer"]["xe1"].in_unicast_pkts == delta["remote"]["ge0"].fusion_np1_to_ep_sm_drop_reinsert_buf_overflows)
### Assert assert(100*float(delta["analyzer"]["xe1"].out_unicast_pkts-delta["analyzer"]["xe0"].in_unicast_pkts)/delta["analyzer"]["xe1"].out_unicast_pkts < 0.5)
## Validate there are no testframe payload errors.
### Assert delta["analyzer"]["xe0"].testframe_pkts==delta["analyzer"]["xe0"].in_unicast_pkts
### Assert delta["analyzer"]["xe0"].testframe_payload_errors==0
### Assert delta["analyzer"]["xe1"].testframe_pkts==delta["analyzer"]["xe1"].in_unicast_pkts
### Assert delta["analyzer"]["xe1"].testframe_payload_errors==0
===Acceptance criteria===
Step validations pass.
===Results===
# Packet loss Local->Remote
# Packet loss Remote->Local
</test-spec>
""")

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--config",
        help=
        "Path to the netconf configuration *.xml file defining the configuration according to ietf-networks, ietf-networks-topology and netconf-node models e.g. ../networks.xml"
    )
    args = parser.parse_args()

    tree = etree.parse(args.config)
    network = tree.xpath('/nc:config/nd:networks/nd:network',
                         namespaces=namespaces)[0]

    conns = tntapi.network_connect(network)
    mylinks = tntapi.parse_network_links(network)

    filter = testsuiteapi.get_filter()

    print("Running ...")
    print(
        "#1 - Generate bulk traffic stream of 1000000 1500 octet packets and 12 octet interframe gaps to both local.e0 and remote.e0 (analyzer.xe0,xe1)"
    )
    (pkt_loss_local_remote, pkt_loss_remote_local) = step_1(network,
                                                            conns,
                                                            filter=filter)

    print("# Test report:")
    print(
        "# Packet loss: pkt_loss_local_remote=%(pkt_loss_local_remote)f, pkt_loss_remote_local=%(pkt_loss_remote_local)f"
        % {
            'pkt_loss_local_remote': pkt_loss_local_remote,
            'pkt_loss_remote_local': pkt_loss_remote_local
        })