Skip to content

Commit

Permalink
dutdutate testbed (#2105)
Browse files Browse the repository at this point in the history
* Initial commit for adding dutdutate testbed

* commit after Make

* Add trailing new line

---------

Co-authored-by: Greg Dennis <[email protected]>
  • Loading branch information
cprabha and greg-dennis authored Sep 10, 2023
1 parent 5544470 commit ce47e05
Show file tree
Hide file tree
Showing 11 changed files with 389 additions and 3 deletions.
1 change: 1 addition & 0 deletions cloudbuild/virtual.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function metadata_kne_topology() {
kne_topology_file["TESTBED_DUT_ATE_2LINKS"]="${topo_prefix}/dutate.textproto"
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"
for p in "${!kne_topology_file[@]}"; do
if grep -q "testbed.*${p}$" "${metadata_test_path}"/metadata.textproto; then
echo "${kne_topology_file[${p}]}"
Expand Down
1 change: 1 addition & 0 deletions internal/fptest/runtests.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func testbedPathFromMetadata() (string, error) {
mpb.Metadata_TESTBED_DUT_ATE_2LINKS: "atedut_2.testbed",
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",
}
testbedFile, ok := testbedToFile[testbed]
if !ok {
Expand Down
1 change: 1 addition & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message Metadata {
TESTBED_DUT_ATE_2LINKS = 3;
TESTBED_DUT_ATE_4LINKS = 4;
TESTBED_DUT_ATE_9LINKS_LAG = 5;
TESTBED_DUT_DUT_ATE_2LINKS = 6;
}
// Testbed on which the test is intended to run.
Testbed testbed = 4;
Expand Down
11 changes: 8 additions & 3 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions topologies/dutdutate.testbed
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# proto-file: github.com/openconfig/ondatra/blob/main/proto/testbed.proto
# proto-message: ondatra.Testbed

# This testbed provides 2 DUTs and ATE connected serially.
# This is used for control plane testing, not traffic testing.

duts {
id: "dut1"
ports {
id: "port1"
}
ports {
id: "port2"
}
}

duts {
id: "dut2"
ports {
id: "port1"
}
}

ates {
id: "ate"
ports {
id: "port1"
}
}

links {
a: "dut1:port1"
b: "ate:port1"
}

links {
a: "dut1:port2"
b: "dut2:port1"
}
56 changes: 56 additions & 0 deletions topologies/kne/arista/ceos/dutdutate.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "arista-ceos-dutdut"
nodes: {
name: "dut1"
vendor: ARISTA
model: "ceos"
os: "eos"
config: {
image: "ceos:latest"
file: "config.cfg"
config_path: "/mnt/flash"
config_file: "startup-config"
cert: {
self_signed: {
cert_name: "gnmiCert.pem"
key_name: "gnmiCertKey.pem"
key_size: 4096
}
}
}
}
nodes: {
name: "dut2"
vendor: ARISTA
model: "ceos"
os: "eos"
config: {
image: "ceos:latest"
file: "config.cfg"
config_path: "/mnt/flash"
config_file: "startup-config"
cert: {
self_signed: {
cert_name: "gnmiCert.pem"
key_name: "gnmiCertKey.pem"
key_size: 4096
}
}
}
}
nodes: {
name: "otg"
vendor: KEYSIGHT
version: "0.0.1-9999" # Please update this with the local version from ixiatg-configmap.yaml
}
links: {
a_node: "otg"
a_int: "eth1"
z_node: "dut1"
z_int: "eth1"
}
links: {
a_node: "dut1"
a_int: "eth2"
z_node: "dut2"
z_int: "eth1"
}
56 changes: 56 additions & 0 deletions topologies/kne/cisco/8000e/dutdutate.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "cisco-8000e-dutdut"
nodes: {
name: "dut1"
vendor: CISCO
model: "8201"
os: "ios-xr"
config: {
image: "8000e:latest"
file: "config.cfg"
}
interfaces: {
key: "eth1"
value: {
name: "FourHundredGigE0/0/0/0"
}
}
interfaces: {
key: "eth2"
value: {
name: "FourHundredGigE0/0/0/1"
}
}
}
nodes: {
name: "dut2"
vendor: CISCO
model: "8201"
os: "ios-xr"
config: {
image: "8000e:latest"
file: "config.cfg"
}
interfaces: {
key: "eth1"
value: {
name: "FourHundredGigE0/0/0/0"
}
}
}
nodes: {
name: "otg"
vendor: KEYSIGHT
version: "0.0.1-9999" # Please update this with the local version from ixiatg-configmap.yaml
}
links: {
a_node: "otg"
a_int: "eth1"
z_node: "dut1"
z_int: "eth1"
}
links: {
a_node: "dut1"
a_int: "eth2"
z_node: "dut2"
z_int: "eth1"
}
56 changes: 56 additions & 0 deletions topologies/kne/cisco/xrd/dutdutate.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "cisco-xrd-dutdut"
nodes: {
name: "dut1"
vendor: CISCO
model: "xrd"
os: "ios-xr"
config: {
image: "xrd:latest"
file: "config.cfg"
}
interfaces: {
key: "eth1"
value: {
name: "GigabitEthernet0/0/0/0"
}
}
interfaces: {
key: "eth2"
value: {
name: "GigabitEthernet0/0/0/1"
}
}
}
nodes: {
name: "dut2"
vendor: CISCO
model: "xrd"
os: "ios-xr"
config: {
image: "xrd:latest"
file: "config.cfg"
}
interfaces: {
key: "eth1"
value: {
name: "GigabitEthernet0/0/0/0"
}
}
}
nodes: {
name: "otg"
vendor: KEYSIGHT
version: "0.0.1-9999" # Please update this with the local version from ixiatg-configmap.yaml
}
links: {
a_node: "otg"
a_int: "eth1"
z_node: "dut"
z_int: "eth1"
}
links: {
a_node: "dut1"
a_int: "eth2"
z_node: "dut2"
z_int: "eth1"
}
75 changes: 75 additions & 0 deletions topologies/kne/juniper/cptx/dutdutate.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "juniper-cptx-dutdutate"
nodes: {
name: "dut1"
vendor: JUNIPER
model: "cptx"
os: "evo"
config: {
image: "cptx:latest"
config_path: "/home/evo/configdisk"
config_file: "juniper.conf"
file: "config.cfg"
cert: {
self_signed: {
cert_name: "grpc-server-cert"
key_name: "N/A"
key_size: 4096
}
}
}
interfaces: {
key: "eth4"
value: {
name: "et-0/0/0:0"
}
}
interfaces: {
key: "eth12"
value: {
name: "et-0/0/1:0"
}
}
}
nodes: {
name: "dut2"
vendor: JUNIPER
model: "cptx"
os: "evo"
config: {
image: "cptx:latest"
config_path: "/home/evo/configdisk"
config_file: "juniper.conf"
file: "config.cfg"
cert: {
self_signed: {
cert_name: "grpc-server-cert"
key_name: "N/A"
key_size: 4096
}
}
}
interfaces: {
key: "eth12"
value: {
name: "et-0/0/1:0"
}
}
}
nodes: {
name: "otg"
vendor: KEYSIGHT
version: "0.0.1-9999" # Please update this with the local version from ixiatg-configmap.yaml
}
links: {
a_node: "otg"
a_int: "eth1"
z_node: "dut1"
z_int: "eth4"
}
links: {
a_node: "dut1"
a_int: "eth12"
z_node: "dut2"
z_int: "eth12"
}

Loading

0 comments on commit ce47e05

Please sign in to comment.