-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
2,159 additions
and
2,714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
package presubmit_test | ||
|
||
import ( | ||
// "context" | ||
// "io" | ||
"sort" | ||
"testing" | ||
|
||
"github.com/google/go-cmp/cmp" | ||
// gpb "github.com/openconfig/gribi/v1/proto/service" | ||
"github.com/openconfig/ondatra" | ||
kinit "github.com/openconfig/ondatra/knebind/init" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
ondatra.RunTests(m, kinit.Init) | ||
} | ||
|
||
// lookupTelemetry checks for system telemetry for a DUT. | ||
func lookupTelemetry(t *testing.T, dut *ondatra.DUTDevice) { | ||
t.Helper() | ||
sys := dut.Telemetry().System().Lookup(t) | ||
if !sys.IsPresent() { | ||
t.Fatalf("No System telemetry for %v", dut) | ||
} | ||
} | ||
|
||
func TestGNMICEOS(t *testing.T) { | ||
dut := ondatra.DUT(t, "ceos") | ||
lookupTelemetry(t, dut) | ||
} | ||
|
||
func TestGNMICTPX(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNMISRL(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNMIXRD(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNOICEOS(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNOICTPX(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNOISRL(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGNOIXRD(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
// fetchAFTEntries checks for AFT entries using gRIBI for a DUT. | ||
// func fetchAFTEntries(t *testing.T, dut *ondatra.DUTDevice) { | ||
// t.Helper() | ||
// c := dut.RawAPIs().GRIBI().New(t) | ||
// req := &gpb.GetRequest{ | ||
// NetworkInstance: &gpb.GetRequest_All{}, | ||
// Aft: gpb.AFTType_ALL, | ||
// } | ||
// stream, err := c.Get(context.Background(), req) | ||
// if err != nil { | ||
// t.Fatalf("gRIBI Get request failed: %v", err) | ||
// } | ||
// for { | ||
// resp, err := stream.Recv() | ||
// if err == io.EOF { | ||
// break | ||
// } | ||
// if err != nil { | ||
// t.Fatalf("failed to recv from stream: %v", err) | ||
// } | ||
// t.Logf("Got AFT entries: %v", resp.GetEntry()) | ||
// } | ||
// } | ||
|
||
func TestGRIBICEOS(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGRIBICTPX(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGRIBISRL(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestGRIBIXRD(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestP4RTCEOS(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestP4RTCPTX(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestP4RTSRL(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestP4RTXRD(t *testing.T) { | ||
t.Skip() | ||
} | ||
|
||
func TestOTG(t *testing.T) { | ||
ate := ondatra.ATE(t, "otg") | ||
cfg := ate.OTG().NewConfig(t) | ||
cfg.Ports().Add().SetName("port1") | ||
cfg.Ports().Add().SetName("port2") | ||
cfg.Ports().Add().SetName("port3") | ||
cfg.Ports().Add().SetName("port4") | ||
ate.OTG().PushConfig(t, cfg) | ||
|
||
portNames := ate.OTG().Telemetry().PortAny().Name().Get(t) | ||
sort.Strings(portNames) | ||
if want := []string{"port1", "port2", "port3", "port4"}; !cmp.Equal(portNames, want) { | ||
t.Errorf("Telemetry got port names %v, want %v", portNames, want) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
duts { | ||
id: "ceos" | ||
vendor: ARISTA | ||
ports { | ||
id: "port1" | ||
} | ||
ports { | ||
id: "port2" | ||
} | ||
ports { | ||
id: "port3" | ||
} | ||
ports { | ||
id: "port4" | ||
} | ||
} | ||
duts { | ||
id: "cptx" | ||
vendor: JUNIPER | ||
ports { | ||
id: "port1" | ||
} | ||
ports { | ||
id: "port2" | ||
} | ||
ports { | ||
id: "port3" | ||
} | ||
ports { | ||
id: "port4" | ||
} | ||
} | ||
duts { | ||
id: "srl" | ||
vendor: NOKIA | ||
ports { | ||
id: "port1" | ||
} | ||
ports { | ||
id: "port2" | ||
} | ||
ports { | ||
id: "port3" | ||
} | ||
ports { | ||
id: "port4" | ||
} | ||
} | ||
duts { | ||
id: "xrd" | ||
vendor: CISCO | ||
ports { | ||
id: "port1" | ||
} | ||
ports { | ||
id: "port2" | ||
} | ||
ports { | ||
id: "port3" | ||
} | ||
ports { | ||
id: "port4" | ||
} | ||
} | ||
ates { | ||
id: "otg" | ||
vendor: IXIA | ||
ports { | ||
id: "port1" | ||
} | ||
ports { | ||
id: "port2" | ||
} | ||
ports { | ||
id: "port3" | ||
} | ||
ports { | ||
id: "port4" | ||
} | ||
} | ||
links { | ||
a: "ceos:port1" | ||
b: "otg:port1" | ||
} | ||
links { | ||
a: "cptx:port1" | ||
b: "otg:port2" | ||
} | ||
links { | ||
a: "srl:port1" | ||
b: "otg:port3" | ||
} | ||
links { | ||
a: "xrd:port1" | ||
b: "otg:port4" | ||
} | ||
links { | ||
a: "ceos:port2" | ||
b: "cptx:port2" | ||
} | ||
links { | ||
a: "ceos:port3" | ||
b: "srl:port2" | ||
} | ||
links { | ||
a: "ceos:port4" | ||
b: "xrd:port2" | ||
} | ||
links { | ||
a: "cptx:port3" | ||
b: "srl:port3" | ||
} | ||
links { | ||
a: "cptx:port4" | ||
b: "xrd:port3" | ||
} | ||
links { | ||
a: "srl:port4" | ||
b: "xrd:port4" | ||
} |
Oops, something went wrong.