From 9082225f22688c54e4b6f946e7a9fa15934349c7 Mon Sep 17 00:00:00 2001 From: cprabha Date: Mon, 29 Jan 2024 22:07:36 -0800 Subject: [PATCH] Adding 8port testbed (#2591) * Initial commit for 8port testbed * updated with string --- cloudbuild/virtual.sh | 1 + internal/fptest/runtests.go | 1 + proto/metadata.proto | 1 + proto/metadata_go_proto/metadata.pb.go | 25 +++--- topologies/atedut_8.binding | 117 +++++++++++++++++++++++++ topologies/atedut_8.testbed | 100 +++++++++++++++++++++ 6 files changed, 235 insertions(+), 10 deletions(-) create mode 100644 topologies/atedut_8.binding create mode 100644 topologies/atedut_8.testbed diff --git a/cloudbuild/virtual.sh b/cloudbuild/virtual.sh index 1d9cc0f0b03..fe742cbd8c8 100755 --- a/cloudbuild/virtual.sh +++ b/cloudbuild/virtual.sh @@ -86,6 +86,7 @@ function metadata_kne_topology() { kne_topology_file["TESTBED_DUT_ATE_4LINKS"]="${topo_prefix}/dutate.textproto" kne_topology_file["TESTBED_DUT_ATE_9LINKS_LAG"]="${topo_prefix}/dutate_lag.textproto" kne_topology_file["TESTBED_DUT_DUT_ATE_2LINKS"]="${topo_prefix}/dutdutate.textproto" + kne_topology_file["TESTBED_DUT_ATE_8LINKS"]="${topo_prefix}/dutate.textproto" for p in "${!kne_topology_file[@]}"; do if grep -q "testbed.*${p}$" "${metadata_test_path}"/metadata.textproto; then echo "${kne_topology_file[${p}]}" diff --git a/internal/fptest/runtests.go b/internal/fptest/runtests.go index d6aa487f6c8..608a77465e0 100644 --- a/internal/fptest/runtests.go +++ b/internal/fptest/runtests.go @@ -74,6 +74,7 @@ func testbedPathFromMetadata() (string, error) { mpb.Metadata_TESTBED_DUT_ATE_4LINKS: "atedut_4.testbed", mpb.Metadata_TESTBED_DUT_ATE_9LINKS_LAG: "atedut_9_lag.testbed", mpb.Metadata_TESTBED_DUT_DUT_ATE_2LINKS: "dutdutate.testbed", + mpb.Metadata_TESTBED_DUT_ATE_8LINKS: "atedut_8.testbed", } testbedFile, ok := testbedToFile[testbed] if !ok { diff --git a/proto/metadata.proto b/proto/metadata.proto index a3abbe66ccf..103e3d4ad8b 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -36,6 +36,7 @@ message Metadata { TESTBED_DUT_ATE_4LINKS = 4; TESTBED_DUT_ATE_9LINKS_LAG = 5; TESTBED_DUT_DUT_ATE_2LINKS = 6; + TESTBED_DUT_ATE_8LINKS = 7; } // Testbed on which the test is intended to run. Testbed testbed = 4; diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index e93a7f3de04..f5a6d9d8679 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -47,6 +47,7 @@ const ( Metadata_TESTBED_DUT_ATE_4LINKS Metadata_Testbed = 4 Metadata_TESTBED_DUT_ATE_9LINKS_LAG Metadata_Testbed = 5 Metadata_TESTBED_DUT_DUT_ATE_2LINKS Metadata_Testbed = 6 + Metadata_TESTBED_DUT_ATE_8LINKS Metadata_Testbed = 7 ) // Enum value maps for Metadata_Testbed. @@ -59,6 +60,7 @@ var ( 4: "TESTBED_DUT_ATE_4LINKS", 5: "TESTBED_DUT_ATE_9LINKS_LAG", 6: "TESTBED_DUT_DUT_ATE_2LINKS", + 7: "TESTBED_DUT_ATE_8LINKS", } Metadata_Testbed_value = map[string]int32{ "TESTBED_UNSPECIFIED": 0, @@ -68,6 +70,7 @@ var ( "TESTBED_DUT_ATE_4LINKS": 4, "TESTBED_DUT_ATE_9LINKS_LAG": 5, "TESTBED_DUT_DUT_ATE_2LINKS": 6, + "TESTBED_DUT_ATE_8LINKS": 7, } ) @@ -1623,7 +1626,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x4d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x4d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -2222,7 +2225,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, @@ -2235,14 +2238,16 @@ var file_metadata_proto_rawDesc = []byte{ 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, - 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, - 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, - 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, + 0x41, 0x54, 0x45, 0x5f, 0x38, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x07, 0x22, 0x6d, 0x0a, 0x04, + 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, + 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, 0x4e, + 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, + 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x47, + 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/topologies/atedut_8.binding b/topologies/atedut_8.binding new file mode 100644 index 00000000000..ac0ccba27b2 --- /dev/null +++ b/topologies/atedut_8.binding @@ -0,0 +1,117 @@ +# proto-file: github.com/openconfig/featureprofiles/blob/main/topologies/proto/binding.proto +# proto-message: openconfig.testing.Binding + +# This is an example static binding that demonstrates how to specify +# options to be used in conjunction with the atedut_*.testbed +# testbeds. + +# These options are inherited throughout the entire binding for both the +# DUT and the ATE, unless overridden by a specific device or protocol. +options { + username: "username" + password: "password" +} + +duts { + id: "dut" + name: "dut-hostname" # Change this to the device hostname. + + # Options inherited by all protocols on this device unless + # overridden by individual protocols. Remove if not needed. + options { + insecure: true + } + + # Options specific to gNMI. Remove if not needed. + gnmi { + target: "dut-proxy-hostname:6030" + } + + # Options specific to gNOI + gnoi { + max_recv_msg_size: 40000000 + } + + # Before this binding can be used with a topology, add ports mapping + # from its topology ID to the actual port name on the device. + ports { + id: "port1" + name: "Ethernet1/1" # Change this to the actual port name. + } + ports { + id: "port2" + name: "Ethernet2/1" # Change this to the actual port name. + } + ports { + id: "port3" + name: "Ethernet3/1" # Change this to the actual port name. + } + ports { + id: "port4" + name: "Ethernet4/1" # Change this to the actual port name. + } + ports { + id: "port5" + name: "Ethernet5/1" # Change this to the actual port name. + } + ports { + id: "port6" + name: "Ethernet6/1" # Change this to the actual port name. + } + ports { + id: "port7" + name: "Ethernet7/1" # Change this to the actual port name. + } + ports { + id: "port8" + name: "Ethernet8/1" # Change this to the actual port name. + } +} + +ates { + id: "ate" + name: "ate-hostname" # Change this to the Ixia chassis name. + + # Options specific to the IxNetwork API. Remove if not needed. + ixnetwork { + # Change this to the Web UI hostname, if it differs from the Ixia + # chassis name. + target: "ixia-hostname" + skip_verify: true + } + + # Before this binding can be used with a topology, add ports mapping + # from its topology ID to the actual port name on the device. + ports { + id: "port1" + name: "1/1" # Change this to the actual port name. + } + ports { + id: "port2" + name: "1/2" # Change this to the actual port name. + } + ports { + id: "port3" + name: "1/3" # Change this to the actual port name. + } + ports { + id: "port4" + name: "1/4" # Change this to the actual port name. + } + ports { + id: "port5" + name: "1/5" # Change this to the actual port name. + } + ports { + id: "port6" + name: "1/6" # Change this to the actual port name. + } + ports { + id: "port7" + name: "1/7" # Change this to the actual port name. + } + ports { + id: "port8" + name: "1/8" # Change this to the actual port name. + } +} diff --git a/topologies/atedut_8.testbed b/topologies/atedut_8.testbed new file mode 100644 index 00000000000..f7ba2158671 --- /dev/null +++ b/topologies/atedut_8.testbed @@ -0,0 +1,100 @@ +# proto-file: github.com/openconfig/ondatra/blob/main/proto/testbed.proto +# proto-message: ondatra.Testbed + +# This testbed provides a DUT and ATE with 8 links between them. + +duts { + id: "dut" + ports { + id: "port1" + } + ports { + id: "port2" + } + ports { + id: "port3" + } + ports { + id: "port4" + } + ports { + id: "port5" + } + ports { + id: "port6" + } + ports { + id: "port7" + } + ports { + id: "port8" + } +} + +ates { + id: "ate" + ports { + id: "port1" + } + ports { + id: "port2" + } + ports { + id: "port3" + } + ports { + id: "port4" + } + ports { + id: "port5" + } + ports { + id: "port6" + } + ports { + id: "port7" + } + ports { + id: "port8" + } +} + +links { + a: "dut:port1" + b: "ate:port1" +} + +links { + a: "dut:port2" + b: "ate:port2" +} + +links { + a: "dut:port3" + b: "ate:port3" +} + +links { + a: "dut:port4" + b: "ate:port4" +} + +links { + a: "dut:port5" + b: "ate:port5" +} + +links { + a: "dut:port6" + b: "ate:port6" +} + +links { + a: "dut:port7" + b: "ate:port7" +} + +links { + a: "dut:port8" + b: "ate:port8" +}