From 981ca565cd863d2fa3c842b388c5c018e5707997 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 11 Sep 2023 10:58:00 -0700 Subject: [PATCH 1/4] Clean test requirement issue template (#2113) * add new test req tmpl * refine min DUT platform description * clean test req issue template * make a better example link --- .../ISSUE_TEMPLATE/new_test_requirement.md | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/new_test_requirement.md b/.github/ISSUE_TEMPLATE/new_test_requirement.md index b2072b92ae5..a384d423733 100644 --- a/.github/ISSUE_TEMPLATE/new_test_requirement.md +++ b/.github/ISSUE_TEMPLATE/new_test_requirement.md @@ -1,56 +1,5 @@ --- name: New featureprofiles test requirement -<<<<<<< Updated upstream -about: Use this template to document the requirements for a new test to be implemented. -title: '' -labels: enhancement -assignees: '' - ---- - -# TestID-x.y: Short name of test here - -## Summary - -Write a few sentences or paragraphs describing the purpose and scope of the test. - -## Procedure - -* Test #1 - Name of test - * Step 1 - * Step 2 - * Step 3 - -* Test #2 - New of test - * Step 1 - * Step 2 - * Step 3 - - -## Config Parameter Coverage - -Add list of OpenConfig 'config' paths used in this test, if any. - -## Telemetry Parameter Coverage - -Add list of OpenConfig 'state' paths used in this test, if any. - -## Protocol/RPC Parameter Coverage - -Add list of OpenConfig RPC's (gNMI, gNOI, gNSI, gRIBI) used in the list - -For example: -* gNMI - * Set - * Subscribe -* gNOI - * System - * KillProcess - * Healthz - * Get - * Check - * Artifact -======= about: Use this template to create an issue to assign and track implemenation of the code for a test. title: '' labels: enhancement @@ -63,5 +12,4 @@ assignees: '' * Add a label for the test priority according to the test requirements. (p0, p1, p2) * Add a link in this issue description to the README.md for the test requirements. For example: -Implement code for [Test name here]() ->>>>>>> Stashed changes +Implement code for [Test name here](https://github.com/openconfig/featureprofiles/blob/main/feature/example/tests/topology_test/README.md) From 5902d56306d104e93d3919bd6f90a06a15d44043 Mon Sep 17 00:00:00 2001 From: mananpat-cisco Date: Mon, 11 Sep 2023 15:16:05 -0400 Subject: [PATCH 2/4] FP-1.1 deviation removed (#2071) * FP-1.1 deviation removed * removed typo --- .../metadata.textproto | 1 - .../power_admin_down_up_test.go | 18 +++++------------- internal/deviations/deviations.go | 6 ------ proto/metadata.proto | 4 +--- proto/metadata_go_proto/metadata.pb.go | 13 ++----------- 5 files changed, 8 insertions(+), 34 deletions(-) diff --git a/feature/platform/tests/power_admin_down_up_test/metadata.textproto b/feature/platform/tests/power_admin_down_up_test/metadata.textproto index 1f3d179befd..7f89a50f234 100644 --- a/feature/platform/tests/power_admin_down_up_test/metadata.textproto +++ b/feature/platform/tests/power_admin_down_up_test/metadata.textproto @@ -35,7 +35,6 @@ platform_exceptions: { vendor: CISCO } deviations: { - component_power_down_returns_inactive_state: true skip_fabric_card_power_admin: true skip_controller_card_power_admin: true } diff --git a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go index 986e4c6cbbb..733aef03bf3 100644 --- a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go +++ b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go @@ -146,19 +146,11 @@ func powerDownUp(t *testing.T, dut *ondatra.DUTDevice, name string, cType oc.E_P } t.Logf("Component %s, power-admin-state after %f minutes: %v", name, time.Since(start).Minutes(), power) - if deviations.ComponentPowerDownReturnsInactiveState(dut) { - oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_INACTIVE).Val() - if !ok { - t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_INACTIVE) - } - t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper) - } else { - oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED).Val() - if !ok { - t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED) - } - t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper) + oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED).Val() + if !ok { + t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED) } + t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper) start = time.Now() t.Logf("Starting %s POWER_ENABLE", name) gnmi.Replace(t, dut, config, oc.Platform_ComponentPowerType_POWER_ENABLED) @@ -171,7 +163,7 @@ func powerDownUp(t *testing.T, dut *ondatra.DUTDevice, name string, cType oc.E_P t.Logf("Component %s, power-admin-state after %f minutes: %v", name, time.Since(start).Minutes(), power) } - oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE).Val() + oper, ok = gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE).Val() if !ok { t.Errorf("Component %s oper-status after POWER_ENABLED, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE) } diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index 40e47c5f16f..ed7f7267f8c 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -505,12 +505,6 @@ func SkipFabricCardPowerAdmin(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetSkipFabricCardPowerAdmin() } -// ComponentPowerDownReturnsInactiveState returns whether the device should allow the component power Down state inactive. -// Default value is false and expected component power down state is shutdown. -func ComponentPowerDownReturnsInactiveState(dut *ondatra.DUTDevice) bool { - return lookupDUTDeviations(dut).GetComponentPowerDownReturnsInactiveState() -} - // ISISRequireSameL1MetricWithL2Metric returns true for devices that require configuring // the same ISIS Metrics for Level 1 when configuring Level 2 Metrics. func ISISRequireSameL1MetricWithL2Metric(dut *ondatra.DUTDevice) bool { diff --git a/proto/metadata.proto b/proto/metadata.proto index 66920f7d097..a614b68f6a9 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -278,8 +278,6 @@ message Metadata { bool os_component_parent_is_chassis = 88; // Device does not support fabric power-admin-state leaf. bool skip_fabric_card_power_admin = 89; - // Device returns component state inactive during power down. - bool component_power_down_returns_inactive_state = 90; // Devices require configuring the same ISIS Metrics for Level 1 when // configuring Level 2 Metrics. bool isis_require_same_l1_metric_with_l2_metric = 91; @@ -331,7 +329,7 @@ message Metadata { bool isis_counter_part_changes_unsupported = 107; // Reserved field numbers and identifiers. - reserved 84, 9, 28; + reserved 84, 9, 28, 90; } message PlatformExceptions { diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index e0f9386124e..5415cb33625 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 -// protoc v3.21.12 +// protoc-gen-go v1.30.0 +// protoc v3.19.3 // source: metadata.proto package metadata_go_proto @@ -545,8 +545,6 @@ type Metadata_Deviations struct { OsComponentParentIsChassis bool `protobuf:"varint,88,opt,name=os_component_parent_is_chassis,json=osComponentParentIsChassis,proto3" json:"os_component_parent_is_chassis,omitempty"` // Device does not support fabric power-admin-state leaf. SkipFabricCardPowerAdmin bool `protobuf:"varint,89,opt,name=skip_fabric_card_power_admin,json=skipFabricCardPowerAdmin,proto3" json:"skip_fabric_card_power_admin,omitempty"` - // Device returns component state inactive during power down. - ComponentPowerDownReturnsInactiveState bool `protobuf:"varint,90,opt,name=component_power_down_returns_inactive_state,json=componentPowerDownReturnsInactiveState,proto3" json:"component_power_down_returns_inactive_state,omitempty"` // Devices require configuring the same ISIS Metrics for Level 1 when // configuring Level 2 Metrics. IsisRequireSameL1MetricWithL2Metric bool `protobuf:"varint,91,opt,name=isis_require_same_l1_metric_with_l2_metric,json=isisRequireSameL1MetricWithL2Metric,proto3" json:"isis_require_same_l1_metric_with_l2_metric,omitempty"` @@ -1183,13 +1181,6 @@ func (x *Metadata_Deviations) GetSkipFabricCardPowerAdmin() bool { return false } -func (x *Metadata_Deviations) GetComponentPowerDownReturnsInactiveState() bool { - if x != nil { - return x.ComponentPowerDownReturnsInactiveState - } - return false -} - func (x *Metadata_Deviations) GetIsisRequireSameL1MetricWithL2Metric() bool { if x != nil { return x.IsisRequireSameL1MetricWithL2Metric From 88b828f8b750d8f94aa86e8335a9b25e09392d41 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 11 Sep 2023 12:34:55 -0700 Subject: [PATCH 3/4] Update telemetry_inventory_test.go (#1694) Component type chassis is expected to return mfg-name Co-authored-by: sachendras <44847441+sachendras@users.noreply.github.com> --- .../tests/telemetry_inventory_test/telemetry_inventory_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/platform/tests/telemetry_inventory_test/telemetry_inventory_test.go b/feature/platform/tests/telemetry_inventory_test/telemetry_inventory_test.go index 9a8136eba04..22c55846f79 100644 --- a/feature/platform/tests/telemetry_inventory_test/telemetry_inventory_test.go +++ b/feature/platform/tests/telemetry_inventory_test/telemetry_inventory_test.go @@ -129,7 +129,7 @@ func TestHardwareCards(t *testing.T) { nameValidation: true, partNoValidation: true, serialNoValidation: true, - mfgNameValidation: false, + mfgNameValidation: true, mfgDateValidation: false, hwVerValidation: true, fwVerValidation: false, From c40bd73e961a3ee3036a1e7cfd61820acb936ca8 Mon Sep 17 00:00:00 2001 From: Greg Dennis <5436032+greg-dennis@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:35:29 -0400 Subject: [PATCH 4/4] Use simplified RawAPIs calls to fetch default clients (#2104) * Use simplified RawAPIs calls to fetch default/existing clients * Fix route_removal_during_failover_tests --- .../bgp_graceful_restart_test.go | 6 +++--- .../bgp_2byte_4byte_asn_policy_test.go | 2 +- .../bgp_long_lived_graceful_restart_test.go | 10 +++++----- .../dut_daemon_failure/dut_daemon_failure_test.go | 2 +- .../route_addition_during_failover_test.go | 4 ++-- .../route_removal_during_failover_test.go | 5 +++-- .../dut_daemon_failure/dut_daemon_failure_test.go | 2 +- .../route_addition_during_failover_test.go | 4 ++-- .../route_removal_during_failover_test.go | 5 +++-- .../isis/ate_tests/internal/session/session.go | 2 +- .../isis/otg_tests/internal/session/session.go | 2 +- feature/experimental/p4rt/README.md | 2 +- .../p4rt/ate_tests/base_p4rt/base_p4rt_test.go | 4 ++-- .../google_discovery_protocol_packetin_test.go | 4 ++-- .../google_discovery_protocol_packetout_test.go | 4 ++-- .../ate_tests/lldp_packetin_test/lldp_packetin_test.go | 4 ++-- .../lldp_packetout_test/lldp_packetout_test.go | 4 ++-- .../p4rt_daemon_failure_test.go | 2 +- .../ate_tests/performance_test/performance_test.go | 2 +- .../traceroute_packetin_test.go | 4 ++-- .../traceroute_packetout_test.go | 2 +- .../p4rt/otg_tests/base_p4rt/base_p4rt_test.go | 4 ++-- .../google_discovery_protocol_packetin_test.go | 4 ++-- .../google_discovery_protocol_packetout_test.go | 4 ++-- .../otg_tests/lldp_packetin_test/lldp_packetin_test.go | 4 ++-- .../lldp_packetout_test/lldp_packetout_test.go | 4 ++-- .../p4rt_daemon_failure_test.go | 2 +- .../otg_tests/performance_test/performance_test.go | 2 +- .../traceroute_packetin_test.go | 4 ++-- .../traceroute_packetout_test.go | 2 +- .../metadata_validation_test.go | 2 +- .../p4rt/tests/p4rt_election/p4rt_election_test.go | 2 +- .../tls_authentication_over_grpc_test.go | 2 +- .../system_generic_health_check_test.go | 2 +- .../tunnel_acl_based_test/tun_acl_dscp_test.go | 2 +- feature/gnoi/os/tests/osinstall/osinstall_test.go | 4 ++-- .../packet_link_qualification_test.go | 10 +++++----- .../chassis_reboot_status_and_cancel_test.go | 4 ++-- .../per_component_reboot_test.go | 6 +++--- feature/gnoi/system/tests/ping_test/ping_test.go | 2 +- .../system/tests/traceroute_test/traceroute_test.go | 2 +- feature/gribi/ate_tests/get_rpc_test/get_rpc_test.go | 2 +- .../ate_tests/gribi_scaling/gribi_scaling_test.go | 2 +- .../gribigo_compliance_test/gribigo_compliance_test.go | 2 +- .../hierarchical_weight_resolution_test.go | 2 +- .../gribi/ate_tests/ipv4_entry_test/ipv4_entry_test.go | 2 +- .../ate_tests/ordering_ack_test/ordering_ack_test.go | 2 +- .../route_removal_via_flush_test.go | 2 +- .../supervisor_failure_test/supervisor_failure_test.go | 2 +- .../port_flap_rebalanced_test.go | 2 +- .../weighted_balancing_test/weighted_balancing_test.go | 2 +- feature/gribi/otg_tests/get_rpc_test/get_rpc_test.go | 2 +- .../otg_tests/gribi_scaling/gribi_scaling_test.go | 2 +- .../gribigo_compliance_test/gribigo_compliance_test.go | 2 +- .../gribi/otg_tests/ipv4_entry_test/ipv4_entry_test.go | 2 +- .../otg_tests/ordering_ack_test/ordering_ack_test.go | 2 +- .../route_removal_via_flush_test.go | 2 +- .../supervisor_failure_test/supervisor_failure_test.go | 2 +- .../port_flap_rebalanced_test.go | 2 +- .../weighted_balancing_test/weighted_balancing_test.go | 2 +- .../core_lldp_tlv_population_test.go | 2 +- .../core_lldp_tlv_population_test.go | 2 +- .../ate_tests/cli_origin_test/cli_origin_test.go | 2 +- .../metadata/tests/annotation_test/annotation_test.go | 2 +- internal/components/components.go | 2 +- internal/fptest/networkinstance.go | 2 +- internal/gribi/gribi.go | 2 +- 67 files changed, 99 insertions(+), 97 deletions(-) diff --git a/feature/bgp/gracefulrestart/ate_tests/bgp_graceful_restart_test/bgp_graceful_restart_test.go b/feature/bgp/gracefulrestart/ate_tests/bgp_graceful_restart_test/bgp_graceful_restart_test.go index c50e12c5931..443b9ee4a83 100644 --- a/feature/bgp/gracefulrestart/ate_tests/bgp_graceful_restart_test/bgp_graceful_restart_test.go +++ b/feature/bgp/gracefulrestart/ate_tests/bgp_graceful_restart_test/bgp_graceful_restart_test.go @@ -582,7 +582,7 @@ func configACLNative(t testing.TB, d *ondatra.DUTDevice, name string) { }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { t.Fatalf("Unexpected error configuring SRL ACL: %v", err) } @@ -618,7 +618,7 @@ func configAdmitAllACLNative(t testing.TB, d *ondatra.DUTDevice, name string) { }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbDelRequest); err != nil { t.Fatalf("Unexpected error removing SRL ACL: %v", err) } @@ -667,7 +667,7 @@ func configACLInterfaceNative(t *testing.T, d *ondatra.DUTDevice, ifName string) }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { t.Fatalf("Unexpected error configuring interface ACL: %v", err) } diff --git a/feature/experimental/bgp/ate_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go b/feature/experimental/bgp/ate_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go index 0f5f7945fa4..7565490b256 100644 --- a/feature/experimental/bgp/ate_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go +++ b/feature/experimental/bgp/ate_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go @@ -220,7 +220,7 @@ func juniperCLI() string { func configureRegexPolicy(t *testing.T, dut *ondatra.DUTDevice) { t.Helper() var config string - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) switch dut.Vendor() { case ondatra.JUNIPER: diff --git a/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go b/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go index af303cfb796..788f59da58e 100644 --- a/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go +++ b/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go @@ -725,7 +725,7 @@ func configACLNative(t testing.TB, d *ondatra.DUTDevice, name string) { }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { t.Fatalf("Unexpected error configuring SRL ACL: %v", err) } @@ -761,7 +761,7 @@ func configAdmitAllACLNative(t testing.TB, d *ondatra.DUTDevice, name string) { }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbDelRequest); err != nil { t.Fatalf("Unexpected error removing SRL ACL: %v", err) } @@ -810,7 +810,7 @@ func configACLInterfaceNative(t *testing.T, d *ondatra.DUTDevice, ifName string) }, }, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { t.Fatalf("Unexpected error configuring interface ACL: %v", err) } @@ -906,7 +906,7 @@ func findProcessByName(t *testing.T, dut *ondatra.DUTDevice, pName string) uint6 // gNOIKillProcess kills a daemon on the DUT, given its name and pid. func gNOIKillProcess(t *testing.T, dut *ondatra.DUTDevice, pName string, pID uint32) { t.Helper() - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) killRequest := &gnps.KillProcessRequest{Name: pName, Pid: pID, Signal: gnps.KillProcessRequest_SIGNAL_TERM, Restart: true} killResponse, err := gnoiClient.System().KillProcess(context.Background(), killRequest) t.Logf("Got kill process response: %v\n\n", killResponse) @@ -1275,7 +1275,7 @@ func TestTrafficWithGracefulRestart(t *testing.T) { }) t.Run("Disable LLGR on dut.", func(t *testing.T) { - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) config := disableLLGRConf(dut, dutAS) t.Logf("Push the CLI config:%s", dut.Vendor()) gpbSetRequest := buildCliConfigRequest(config) diff --git a/feature/experimental/gribi/ate_tests/dut_daemon_failure/dut_daemon_failure_test.go b/feature/experimental/gribi/ate_tests/dut_daemon_failure/dut_daemon_failure_test.go index d9daa2d65cf..466384a9c26 100644 --- a/feature/experimental/gribi/ate_tests/dut_daemon_failure/dut_daemon_failure_test.go +++ b/feature/experimental/gribi/ate_tests/dut_daemon_failure/dut_daemon_failure_test.go @@ -254,7 +254,7 @@ func verifyGRIBIGet(ctx context.Context, t *testing.T, clientA *gribi.Client, du // gNOIKillProcess kills a daemon on the DUT, given its name and pid. func gNOIKillProcess(ctx context.Context, t *testing.T, args *testArgs, pName string, pID uint32) { - gnoiClient := args.dut.RawAPIs().GNOI().Default(t) + gnoiClient := args.dut.RawAPIs().GNOI(t) killRequest := &gnps.KillProcessRequest{Name: pName, Pid: pID, Signal: gnps.KillProcessRequest_SIGNAL_TERM, Restart: true} killResponse, err := gnoiClient.System().KillProcess(context.Background(), killRequest) t.Logf("Got kill process response: %v\n\n", killResponse) diff --git a/feature/experimental/gribi/ate_tests/route_addition_during_failover_test/route_addition_during_failover_test.go b/feature/experimental/gribi/ate_tests/route_addition_during_failover_test/route_addition_during_failover_test.go index a8f0efda170..43d3557f15d 100644 --- a/feature/experimental/gribi/ate_tests/route_addition_during_failover_test/route_addition_during_failover_test.go +++ b/feature/experimental/gribi/ate_tests/route_addition_during_failover_test/route_addition_during_failover_test.go @@ -497,7 +497,7 @@ func TestRouteAdditionDuringFailover(t *testing.T) { ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) dp1 := dut.Port(t, "port1") ap1 := ate.Port(t, "port1") top := ate.Topology().New() @@ -597,7 +597,7 @@ func TestRouteAdditionDuringFailover(t *testing.T) { awaitSwitchoverReady(t, dut, primaryBeforeSwitch) t.Logf("Controller %q is ready for switchover before test.", primaryBeforeSwitch) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/experimental/gribi/ate_tests/route_removal_during_failover_test/route_removal_during_failover_test.go b/feature/experimental/gribi/ate_tests/route_removal_during_failover_test/route_removal_during_failover_test.go index 7ef08309d2b..f4502988093 100644 --- a/feature/experimental/gribi/ate_tests/route_removal_during_failover_test/route_removal_during_failover_test.go +++ b/feature/experimental/gribi/ate_tests/route_removal_during_failover_test/route_removal_during_failover_test.go @@ -34,6 +34,7 @@ import ( "github.com/openconfig/gribigo/constants" "github.com/openconfig/gribigo/fluent" "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/binding" "github.com/openconfig/ondatra/gnmi" "github.com/openconfig/ondatra/gnmi/oc" "github.com/openconfig/ondatra/raw" @@ -455,7 +456,7 @@ func TestRouteRemovalDuringFailover(t *testing.T) { ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) dp1 := dut.Port(t, "port1") ap1 := ate.Port(t, "port1") top := ate.Topology().New() @@ -557,7 +558,7 @@ func TestRouteRemovalDuringFailover(t *testing.T) { switchoverReady(t, dut, primaryBeforeSwitch) t.Logf("Controller %q is ready for switchover before test.", primaryBeforeSwitch) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + var gnoiClient binding.GNOIClients = dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go b/feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go index 38f69ab1563..487594133b7 100644 --- a/feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go +++ b/feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go @@ -250,7 +250,7 @@ func verifyGRIBIGet(ctx context.Context, t *testing.T, clientA *gribi.Client, du // gNOIKillProcess kills a daemon on the DUT, given its name and pid. func gNOIKillProcess(ctx context.Context, t *testing.T, args *testArgs, pName string, pID uint32) { - gnoiClient := args.dut.RawAPIs().GNOI().Default(t) + gnoiClient := args.dut.RawAPIs().GNOI(t) killRequest := &gnps.KillProcessRequest{Name: pName, Pid: pID, Signal: gnps.KillProcessRequest_SIGNAL_TERM, Restart: true} killResponse, err := gnoiClient.System().KillProcess(context.Background(), killRequest) t.Logf("Got kill process response: %v\n\n", killResponse) diff --git a/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go b/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go index 60093394e79..2bdd4ce46bc 100644 --- a/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go +++ b/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go @@ -524,7 +524,7 @@ func TestRouteAdditionDuringFailover(t *testing.T) { ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) dp1 := dut.Port(t, "port1") ap1 := ate.Port(t, "port1") top := ate.OTG().NewConfig(t) @@ -628,7 +628,7 @@ func TestRouteAdditionDuringFailover(t *testing.T) { awaitSwitchoverReady(t, dut, primaryBeforeSwitch) t.Logf("Controller %q is ready for switchover before test.", primaryBeforeSwitch) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go b/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go index f0d4371a399..7245992929f 100644 --- a/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go +++ b/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go @@ -37,6 +37,7 @@ import ( "github.com/openconfig/gribigo/constants" "github.com/openconfig/gribigo/fluent" "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/binding" "github.com/openconfig/ondatra/gnmi" "github.com/openconfig/ondatra/gnmi/oc" "github.com/openconfig/ondatra/raw" @@ -478,7 +479,7 @@ func TestRouteRemovalDuringFailover(t *testing.T) { ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) dp1 := dut.Port(t, "port1") ap1 := ate.Port(t, "port1") top := ate.OTG().NewConfig(t) @@ -588,7 +589,7 @@ func TestRouteRemovalDuringFailover(t *testing.T) { switchoverReady(t, dut, primaryBeforeSwitch) t.Logf("Controller %q is ready for switchover before test.", primaryBeforeSwitch) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + var gnoiClient binding.GNOIClients = dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/experimental/isis/ate_tests/internal/session/session.go b/feature/experimental/isis/ate_tests/internal/session/session.go index b36c1d4e747..ef94d56e1cf 100644 --- a/feature/experimental/isis/ate_tests/internal/session/session.go +++ b/feature/experimental/isis/ate_tests/internal/session/session.go @@ -169,7 +169,7 @@ func New(t testing.TB) (*TestSession, error) { s := &TestSession{} s.DUT = ondatra.DUT(t, "dut") var err error - s.DUTClient, err = ygnmi.NewClient(s.DUT.RawAPIs().GNMI().Default(t), ygnmi.WithTarget(s.DUT.ID())) + s.DUTClient, err = ygnmi.NewClient(s.DUT.RawAPIs().GNMI(t), ygnmi.WithTarget(s.DUT.ID())) if err != nil { return nil, fmt.Errorf("unable to connect to gNMI on %v: %w", s.DUT, err) } diff --git a/feature/experimental/isis/otg_tests/internal/session/session.go b/feature/experimental/isis/otg_tests/internal/session/session.go index de05b0f5631..fa1accdf2ef 100644 --- a/feature/experimental/isis/otg_tests/internal/session/session.go +++ b/feature/experimental/isis/otg_tests/internal/session/session.go @@ -188,7 +188,7 @@ func New(t testing.TB) (*TestSession, error) { s := &TestSession{} s.DUT = ondatra.DUT(t, "dut") var err error - s.DUTClient, err = ygnmi.NewClient(s.DUT.RawAPIs().GNMI().Default(t), ygnmi.WithTarget(s.DUT.ID())) + s.DUTClient, err = ygnmi.NewClient(s.DUT.RawAPIs().GNMI(t), ygnmi.WithTarget(s.DUT.ID())) if err != nil { return nil, fmt.Errorf("unable to connect to gNMI on %v: %w", s.DUT, err) } diff --git a/feature/experimental/p4rt/README.md b/feature/experimental/p4rt/README.md index dd0dcbf2e26..f673b15bac5 100644 --- a/feature/experimental/p4rt/README.md +++ b/feature/experimental/p4rt/README.md @@ -14,7 +14,7 @@ This document specifies the requirements for p4rt test implementation. function, which sets up the `StreamTermErr` channel required to check errors when the p4rt stream terminates. -4. Tests should make use of Ondatra Raw API `dut.RawAPIs().P4RT().Default(t)` +4. Tests should make use of Ondatra Raw API `dut.RawAPIs().P4RT(t)` during client instantiation. 5. Tests should log Stream Termination errors populated in the diff --git a/feature/experimental/p4rt/ate_tests/base_p4rt/base_p4rt_test.go b/feature/experimental/p4rt/ate_tests/base_p4rt/base_p4rt_test.go index f8bb019b351..3fa0d375b61 100644 --- a/feature/experimental/p4rt/ate_tests/base_p4rt/base_p4rt_test.go +++ b/feature/experimental/p4rt/ate_tests/base_p4rt/base_p4rt_test.go @@ -311,12 +311,12 @@ func TestP4rtConnect(t *testing.T) { // Setup two different clients for different FAPs client1 := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := client1.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := client1.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } client2 := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := client2.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := client2.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go b/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go index f549e625466..30b8f2d5753 100644 --- a/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go +++ b/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go @@ -411,12 +411,12 @@ func TestPacketIn(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go b/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go index e4812973740..6df9267e4e9 100644 --- a/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go +++ b/feature/experimental/p4rt/ate_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go @@ -367,12 +367,12 @@ func TestPacketOut(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/lldp_packetin_test/lldp_packetin_test.go b/feature/experimental/p4rt/ate_tests/lldp_packetin_test/lldp_packetin_test.go index 9508483e38f..ec9b8545922 100644 --- a/feature/experimental/p4rt/ate_tests/lldp_packetin_test/lldp_packetin_test.go +++ b/feature/experimental/p4rt/ate_tests/lldp_packetin_test/lldp_packetin_test.go @@ -389,12 +389,12 @@ func TestPacketIn(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/lldp_packetout_test/lldp_packetout_test.go b/feature/experimental/p4rt/ate_tests/lldp_packetout_test/lldp_packetout_test.go index 1ea543b77b3..e89353a0ab4 100644 --- a/feature/experimental/p4rt/ate_tests/lldp_packetout_test/lldp_packetout_test.go +++ b/feature/experimental/p4rt/ate_tests/lldp_packetout_test/lldp_packetout_test.go @@ -361,12 +361,12 @@ func TestPacketOut(t *testing.T) { gnmi.Replace(t, dut, gnmi.OC().Lldp().Enabled().Config(), false) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go b/feature/experimental/p4rt/ate_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go index b6722e0f136..089654803df 100644 --- a/feature/experimental/p4rt/ate_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go +++ b/feature/experimental/p4rt/ate_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go @@ -287,7 +287,7 @@ func TestP4RTDaemonFailure(t *testing.T) { t.Fatal(err) } - c := dut.RawAPIs().GNOI().Default(t) + c := dut.RawAPIs().GNOI(t) req := &syspb.KillProcessRequest{ Name: p4rtD, Pid: uint32(pID), diff --git a/feature/experimental/p4rt/ate_tests/performance_test/performance_test.go b/feature/experimental/p4rt/ate_tests/performance_test/performance_test.go index f2be1d9ccb7..703d1863e7a 100644 --- a/feature/experimental/p4rt/ate_tests/performance_test/performance_test.go +++ b/feature/experimental/p4rt/ate_tests/performance_test/performance_test.go @@ -632,7 +632,7 @@ func TestP4rtPerformance(t *testing.T) { configureDeviceID(t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/traceroute_packetin_test/traceroute_packetin_test.go b/feature/experimental/p4rt/ate_tests/traceroute_packetin_test/traceroute_packetin_test.go index 67b56c2eda9..4312320a864 100644 --- a/feature/experimental/p4rt/ate_tests/traceroute_packetin_test/traceroute_packetin_test.go +++ b/feature/experimental/p4rt/ate_tests/traceroute_packetin_test/traceroute_packetin_test.go @@ -269,12 +269,12 @@ func TestPacketIn(t *testing.T) { top.Push(t).StartProtocols(t) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/ate_tests/traceroute_packetout_test/traceroute_packetout_test.go b/feature/experimental/p4rt/ate_tests/traceroute_packetout_test/traceroute_packetout_test.go index 37c97568032..798b792f1f5 100644 --- a/feature/experimental/p4rt/ate_tests/traceroute_packetout_test/traceroute_packetout_test.go +++ b/feature/experimental/p4rt/ate_tests/traceroute_packetout_test/traceroute_packetout_test.go @@ -243,7 +243,7 @@ func TestPacketOut(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go b/feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go index 400af57bcf6..8d411987577 100644 --- a/feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go +++ b/feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go @@ -313,12 +313,12 @@ func TestP4rtConnect(t *testing.T) { // Setup two different clients for different FAPs client1 := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := client1.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := client1.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } client2 := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := client2.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := client2.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go b/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go index c860aa4644c..f6faf84a0c4 100644 --- a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go +++ b/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go @@ -478,12 +478,12 @@ func TestPacketIn(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go b/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go index 2bf70ba3eea..cf236a684d8 100644 --- a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go +++ b/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go @@ -378,12 +378,12 @@ func TestPacketOut(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go b/feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go index fb2fd9acd37..d01f7cf1bba 100644 --- a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go +++ b/feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go @@ -394,12 +394,12 @@ func TestPacketIn(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go b/feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go index 4d74fba8703..5c8e6ab6d4a 100644 --- a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go +++ b/feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go @@ -360,12 +360,12 @@ func TestPacketOut(t *testing.T) { gnmi.Replace(t, dut, gnmi.OC().Lldp().Enabled().Config(), false) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go b/feature/experimental/p4rt/otg_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go index f38ddbbd5e6..edbdbfdd46c 100644 --- a/feature/experimental/p4rt/otg_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go +++ b/feature/experimental/p4rt/otg_tests/p4rt_daemon_failure_test/p4rt_daemon_failure_test.go @@ -282,7 +282,7 @@ func TestP4RTDaemonFailure(t *testing.T) { t.Fatal(err) } - c := dut.RawAPIs().GNOI().Default(t) + c := dut.RawAPIs().GNOI(t) req := &syspb.KillProcessRequest{ Name: p4rtD, Pid: uint32(pID), diff --git a/feature/experimental/p4rt/otg_tests/performance_test/performance_test.go b/feature/experimental/p4rt/otg_tests/performance_test/performance_test.go index 1fa83a304d3..aa8ed8c19ce 100644 --- a/feature/experimental/p4rt/otg_tests/performance_test/performance_test.go +++ b/feature/experimental/p4rt/otg_tests/performance_test/performance_test.go @@ -638,7 +638,7 @@ func TestP4rtPerformance(t *testing.T) { configureDeviceID(t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go index c54ae2ccb68..c9838ed294a 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go +++ b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go @@ -262,12 +262,12 @@ func TestPacketIn(t *testing.T) { ate.OTG().StartProtocols(t) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } follower := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := follower.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := follower.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go b/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go index 8443069b6a8..6c3d1a8f7b6 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go +++ b/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go @@ -249,7 +249,7 @@ func TestPacketOut(t *testing.T) { configureDeviceID(ctx, t, dut) leader := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := leader.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := leader.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go b/feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go index f67a6aaefff..5c9c3e1ff92 100644 --- a/feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go +++ b/feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go @@ -39,7 +39,7 @@ func TestP4RTMetadata(t *testing.T) { configurePortID(t, dut) c := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := c.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := c.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } diff --git a/feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go b/feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go index 2de3b602d4c..5fb2c81ab05 100644 --- a/feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go +++ b/feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go @@ -101,7 +101,7 @@ func configurePortID(t *testing.T, dut *ondatra.DUTDevice) { // Create client connection func clientConnection(t *testing.T, dut *ondatra.DUTDevice) *p4rt_client.P4RTClient { clientHandle := p4rt_client.NewP4RTClient(&p4rt_client.P4RTClientParameters{}) - if err := clientHandle.P4rtClientSet(dut.RawAPIs().P4RT().Default(t)); err != nil { + if err := clientHandle.P4rtClientSet(dut.RawAPIs().P4RT(t)); err != nil { t.Fatalf("Could not initialize p4rt client: %v", err) } return clientHandle diff --git a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go b/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go index 9f1484ed7b8..869abffbda2 100644 --- a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go +++ b/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go @@ -168,7 +168,7 @@ func createNativeUser(t testing.TB, dut *ondatra.DUTDevice, user string, pass st }, }, } - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), SetRequest); err != nil { t.Fatalf("Unexpected error configuring User: %v", err) } diff --git a/feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go b/feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go index 46ec8f358cd..6dc01fc1f6d 100644 --- a/feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go +++ b/feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go @@ -136,7 +136,7 @@ func removeElement(list []string, element string) []string { func TestCheckForCoreFiles(t *testing.T) { dut := ondatra.DUT(t, "dut") timestamp := uint64(time.Now().UTC().Unix()) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) coreFileCheck(t, dut, gnoiClient, timestamp, true) } diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go index 8761e7e0a5a..cff964de4c2 100644 --- a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go +++ b/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go @@ -138,7 +138,7 @@ func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { configureNetworkInstance(t) t.Logf("Configure the DUT with static route ...") configStaticRoute(t, dut, prefix, nexthop) - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) var config string t.Logf("Push the CLI config:\n%s", dut.Vendor()) switch dut.Vendor() { diff --git a/feature/gnoi/os/tests/osinstall/osinstall_test.go b/feature/gnoi/os/tests/osinstall/osinstall_test.go index 2c8b22ad73c..cd38346da74 100644 --- a/feature/gnoi/os/tests/osinstall/osinstall_test.go +++ b/feature/gnoi/os/tests/osinstall/osinstall_test.go @@ -84,8 +84,8 @@ func TestOSInstall(t *testing.T) { tc := testCase{ reader: reader, dut: dut, - osc: dut.RawAPIs().GNOI().Default(t).OS(), - sc: dut.RawAPIs().GNOI().Default(t).System(), + osc: dut.RawAPIs().GNOI(t).OS(), + sc: dut.RawAPIs().GNOI(t).System(), } noReboot := deviations.OSActivateNoReboot(dut) tc.fetchStandbySupervisorStatus(ctx, t) diff --git a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go index 6147d42f08b..e9d57f8d4a6 100644 --- a/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go +++ b/feature/gnoi/packet_link_qualification/tests/packet_link_qualification_test/packet_link_qualification_test.go @@ -125,7 +125,7 @@ func TestCapabilitiesResponse(t *testing.T) { func TestNonexistingID(t *testing.T) { dut1 := ondatra.DUT(t, "dut1") id := "non-extsing-ID" - gnoiClient1 := dut1.RawAPIs().GNOI().Default(t) + gnoiClient1 := dut1.RawAPIs().GNOI(t) getResp, err := gnoiClient1.LinkQualification().Get(context.Background(), &plqpb.GetRequest{Ids: []string{id}}) t.Logf("LinkQualification().Get(): %v, err: %v", getResp, err) @@ -156,8 +156,8 @@ func TestNonexistingID(t *testing.T) { func TestListDelete(t *testing.T) { dut1 := ondatra.DUT(t, "dut1") dut2 := ondatra.DUT(t, "dut2") - gnoiClient1 := dut1.RawAPIs().GNOI().Default(t) - gnoiClient2 := dut2.RawAPIs().GNOI().Default(t) + gnoiClient1 := dut1.RawAPIs().GNOI(t) + gnoiClient2 := dut2.RawAPIs().GNOI(t) clients := []raw.GNOI{gnoiClient1, gnoiClient2} for i, client := range clients { @@ -306,8 +306,8 @@ func TestLinkQualification(t *testing.T) { } t.Logf("ReflectorCreateRequest: %v", reflectorCreateRequest) - gnoiClient1 := dut1.RawAPIs().GNOI().Default(t) - gnoiClient2 := dut2.RawAPIs().GNOI().Default(t) + gnoiClient1 := dut1.RawAPIs().GNOI(t) + gnoiClient2 := dut2.RawAPIs().GNOI(t) generatorCreateResp, err := gnoiClient1.LinkQualification().Create(context.Background(), generatorCreateRequest) t.Logf("LinkQualification().Create() generatorCreateResp: %v, err: %v", generatorCreateResp, err) diff --git a/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/chassis_reboot_status_and_cancel_test.go b/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/chassis_reboot_status_and_cancel_test.go index a9673e27197..30d20401fc6 100644 --- a/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/chassis_reboot_status_and_cancel_test.go +++ b/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/chassis_reboot_status_and_cancel_test.go @@ -62,7 +62,7 @@ func TestMain(m *testing.M) { func TestRebootStatus(t *testing.T) { dut := ondatra.DUT(t, "dut") - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) cases := []struct { desc string @@ -136,7 +136,7 @@ func TestRebootStatus(t *testing.T) { func TestCancelReboot(t *testing.T) { dut := ondatra.DUT(t, "dut") - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) rebootRequest := &spb.RebootRequest{ Method: spb.RebootMethod_COLD, diff --git a/feature/gnoi/system/tests/per_component_reboot_test/per_component_reboot_test.go b/feature/gnoi/system/tests/per_component_reboot_test/per_component_reboot_test.go index f9c6c0fd65e..16994cb693b 100644 --- a/feature/gnoi/system/tests/per_component_reboot_test/per_component_reboot_test.go +++ b/feature/gnoi/system/tests/per_component_reboot_test/per_component_reboot_test.go @@ -98,7 +98,7 @@ func TestStandbyControllerCardReboot(t *testing.T) { rpStandby, rpActive := components.FindStandbyRP(t, dut, controllerCards) t.Logf("Detected rpStandby: %v, rpActive: %v", rpStandby, rpActive) - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) rebootSubComponentRequest := &spb.RebootRequest{ Method: spb.RebootMethod_COLD, @@ -173,7 +173,7 @@ func TestLinecardReboot(t *testing.T) { t.Fatalf("Component(lc).Removable().Get(t): got none, want non-empty") } - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) rebootSubComponentRequest := &spb.RebootRequest{ Method: spb.RebootMethod_COLD, @@ -249,7 +249,7 @@ func TestFabricReboot(t *testing.T) { t.Logf("OperStatusUP interfaces before reboot: %v", intfsOperStatusUPBeforeReboot) // Fetch a new gnoi client. - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) rebootSubComponentRequest := &spb.RebootRequest{ Method: spb.RebootMethod_COLD, diff --git a/feature/gnoi/system/tests/ping_test/ping_test.go b/feature/gnoi/system/tests/ping_test/ping_test.go index 56f6dd1cf18..8feddae2b22 100644 --- a/feature/gnoi/system/tests/ping_test/ping_test.go +++ b/feature/gnoi/system/tests/ping_test/ping_test.go @@ -402,7 +402,7 @@ func TestGNOIPing(t *testing.T) { expectedStats: commonExpectedReplyStats, }} - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { t.Logf("Sent ping request: %v\n\n", tc.pingRequest) diff --git a/feature/gnoi/system/tests/traceroute_test/traceroute_test.go b/feature/gnoi/system/tests/traceroute_test/traceroute_test.go index 2e1bc9abf74..d2f33fec932 100644 --- a/feature/gnoi/system/tests/traceroute_test/traceroute_test.go +++ b/feature/gnoi/system/tests/traceroute_test/traceroute_test.go @@ -230,7 +230,7 @@ func TestGNOITraceroute(t *testing.T) { }}, } - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { time.Sleep(1 * time.Second) // some devices do not allow back to back traceroute to prevent flooding diff --git a/feature/gribi/ate_tests/get_rpc_test/get_rpc_test.go b/feature/gribi/ate_tests/get_rpc_test/get_rpc_test.go index e2b0c0ef324..29b31294a3c 100644 --- a/feature/gribi/ate_tests/get_rpc_test/get_rpc_test.go +++ b/feature/gribi/ate_tests/get_rpc_test/get_rpc_test.go @@ -374,7 +374,7 @@ func TestElectionID(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the DUT configureDUT(t, dut) diff --git a/feature/gribi/ate_tests/gribi_scaling/gribi_scaling_test.go b/feature/gribi/ate_tests/gribi_scaling/gribi_scaling_test.go index 9e7d12a8e60..97a41604f33 100644 --- a/feature/gribi/ate_tests/gribi_scaling/gribi_scaling_test.go +++ b/feature/gribi/ate_tests/gribi_scaling/gribi_scaling_test.go @@ -469,7 +469,7 @@ func TestScaling(t *testing.T) { dut := ondatra.DUT(t, "dut") ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) ap1 := ate.Port(t, "port1") ap2 := ate.Port(t, "port2") top := ate.Topology().New() diff --git a/feature/gribi/ate_tests/gribigo_compliance_test/gribigo_compliance_test.go b/feature/gribi/ate_tests/gribigo_compliance_test/gribigo_compliance_test.go index fc48da2d519..afe7c38ca26 100644 --- a/feature/gribi/ate_tests/gribigo_compliance_test/gribigo_compliance_test.go +++ b/feature/gribi/ate_tests/gribigo_compliance_test/gribigo_compliance_test.go @@ -127,7 +127,7 @@ func TestCompliance(t *testing.T) { ate := ondatra.ATE(t, "ate") configureATE(t, ate) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) for _, tt := range compliance.TestSuite { t.Run(tt.In.ShortName, func(t *testing.T) { diff --git a/feature/gribi/ate_tests/hierarchical_weight_resolution_test/hierarchical_weight_resolution_test.go b/feature/gribi/ate_tests/hierarchical_weight_resolution_test/hierarchical_weight_resolution_test.go index 22a5d24b550..b74f8ebaad7 100644 --- a/feature/gribi/ate_tests/hierarchical_weight_resolution_test/hierarchical_weight_resolution_test.go +++ b/feature/gribi/ate_tests/hierarchical_weight_resolution_test/hierarchical_weight_resolution_test.go @@ -175,7 +175,7 @@ func filterPacketReceived(t *testing.T, flow string, ate *ondatra.ATEDevice) map // configureGRIBIClient configures a new GRIBI client with PRESERVE and FIB_ACK. func configureGRIBIClient(t *testing.T, dut *ondatra.DUTDevice) *fluent.GRIBIClient { t.Helper() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the gRIBI client. c := fluent.NewClient() diff --git a/feature/gribi/ate_tests/ipv4_entry_test/ipv4_entry_test.go b/feature/gribi/ate_tests/ipv4_entry_test/ipv4_entry_test.go index 97d0f8677c4..b6fa1e35a63 100644 --- a/feature/gribi/ate_tests/ipv4_entry_test/ipv4_entry_test.go +++ b/feature/gribi/ate_tests/ipv4_entry_test/ipv4_entry_test.go @@ -149,7 +149,7 @@ func TestIPv4Entry(t *testing.T) { dut := ondatra.DUT(t, "dut") configureDUT(t, dut) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) ate := ondatra.ATE(t, "ate") ateTop := configureATE(t, ate) diff --git a/feature/gribi/ate_tests/ordering_ack_test/ordering_ack_test.go b/feature/gribi/ate_tests/ordering_ack_test/ordering_ack_test.go index d8e4c546a0b..a85e00a47e2 100644 --- a/feature/gribi/ate_tests/ordering_ack_test/ordering_ack_test.go +++ b/feature/gribi/ate_tests/ordering_ack_test/ordering_ack_test.go @@ -473,7 +473,7 @@ func TestOrderingACK(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the DUT configureDUT(t, dut) diff --git a/feature/gribi/ate_tests/route_removal_via_flush_test/route_removal_via_flush_test.go b/feature/gribi/ate_tests/route_removal_via_flush_test/route_removal_via_flush_test.go index 1bc3b90e588..7f6f2718243 100644 --- a/feature/gribi/ate_tests/route_removal_via_flush_test/route_removal_via_flush_test.go +++ b/feature/gribi/ate_tests/route_removal_via_flush_test/route_removal_via_flush_test.go @@ -99,7 +99,7 @@ func TestRouteRemovelViaFlush(t *testing.T) { ateTop := configureATE(t, ate) ateTop.Push(t).StartProtocols(t) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the gRIBI client clientA with election ID of 10. clientA := fluent.NewClient() diff --git a/feature/gribi/ate_tests/supervisor_failure_test/supervisor_failure_test.go b/feature/gribi/ate_tests/supervisor_failure_test/supervisor_failure_test.go index 3806f154503..f28ca6a7411 100644 --- a/feature/gribi/ate_tests/supervisor_failure_test/supervisor_failure_test.go +++ b/feature/gribi/ate_tests/supervisor_failure_test/supervisor_failure_test.go @@ -340,7 +340,7 @@ func TestSupFailure(t *testing.T) { t.Fatalf("Controller %q did not become switchover-ready before test.", primaryBeforeSwitch) } - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/gribi/ate_tests/weighted_balancing_test/port_flap_rebalanced_test.go b/feature/gribi/ate_tests/weighted_balancing_test/port_flap_rebalanced_test.go index 6f3b429d8c2..3c5568e28f3 100644 --- a/feature/gribi/ate_tests/weighted_balancing_test/port_flap_rebalanced_test.go +++ b/feature/gribi/ate_tests/weighted_balancing_test/port_flap_rebalanced_test.go @@ -92,7 +92,7 @@ func TestPortFlap(t *testing.T) { // Dial gRIBI ctx := context.Background() dut := ondatra.DUT(t, "dut") - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the DUT configureDUT(t, dut) diff --git a/feature/gribi/ate_tests/weighted_balancing_test/weighted_balancing_test.go b/feature/gribi/ate_tests/weighted_balancing_test/weighted_balancing_test.go index 2b3b58f2152..b4ca9214e1b 100644 --- a/feature/gribi/ate_tests/weighted_balancing_test/weighted_balancing_test.go +++ b/feature/gribi/ate_tests/weighted_balancing_test/weighted_balancing_test.go @@ -195,7 +195,7 @@ func TestWeightedBalancing(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the DUT configureDUT(t, dut) diff --git a/feature/gribi/otg_tests/get_rpc_test/get_rpc_test.go b/feature/gribi/otg_tests/get_rpc_test/get_rpc_test.go index b347a8e2b0d..98bab515c85 100644 --- a/feature/gribi/otg_tests/get_rpc_test/get_rpc_test.go +++ b/feature/gribi/otg_tests/get_rpc_test/get_rpc_test.go @@ -381,7 +381,7 @@ func TestElectionID(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the DUT configureDUT(t, dut) diff --git a/feature/gribi/otg_tests/gribi_scaling/gribi_scaling_test.go b/feature/gribi/otg_tests/gribi_scaling/gribi_scaling_test.go index 53fdecf786d..5958053ea22 100644 --- a/feature/gribi/otg_tests/gribi_scaling/gribi_scaling_test.go +++ b/feature/gribi/otg_tests/gribi_scaling/gribi_scaling_test.go @@ -492,7 +492,7 @@ func TestScaling(t *testing.T) { ate := ondatra.ATE(t, "ate") ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) ap1 := ate.Port(t, "port1") ap2 := ate.Port(t, "port2") diff --git a/feature/gribi/otg_tests/gribigo_compliance_test/gribigo_compliance_test.go b/feature/gribi/otg_tests/gribigo_compliance_test/gribigo_compliance_test.go index db7f42daca0..125150a532b 100644 --- a/feature/gribi/otg_tests/gribigo_compliance_test/gribigo_compliance_test.go +++ b/feature/gribi/otg_tests/gribigo_compliance_test/gribigo_compliance_test.go @@ -132,7 +132,7 @@ func TestCompliance(t *testing.T) { ate := ondatra.ATE(t, "ate") configureATE(t, ate) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) for _, tt := range compliance.TestSuite { t.Run(tt.In.ShortName, func(t *testing.T) { diff --git a/feature/gribi/otg_tests/ipv4_entry_test/ipv4_entry_test.go b/feature/gribi/otg_tests/ipv4_entry_test/ipv4_entry_test.go index e27d5f92ba7..eff48632db3 100644 --- a/feature/gribi/otg_tests/ipv4_entry_test/ipv4_entry_test.go +++ b/feature/gribi/otg_tests/ipv4_entry_test/ipv4_entry_test.go @@ -158,7 +158,7 @@ func TestIPv4Entry(t *testing.T) { dut := ondatra.DUT(t, "dut") configureDUT(t, dut) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) cases := []struct { desc string diff --git a/feature/gribi/otg_tests/ordering_ack_test/ordering_ack_test.go b/feature/gribi/otg_tests/ordering_ack_test/ordering_ack_test.go index 9c18fb02a3e..bed3dacaec4 100644 --- a/feature/gribi/otg_tests/ordering_ack_test/ordering_ack_test.go +++ b/feature/gribi/otg_tests/ordering_ack_test/ordering_ack_test.go @@ -500,7 +500,7 @@ func TestOrderingACK(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the ATE ate := ondatra.ATE(t, "ate") diff --git a/feature/gribi/otg_tests/route_removal_via_flush_test/route_removal_via_flush_test.go b/feature/gribi/otg_tests/route_removal_via_flush_test/route_removal_via_flush_test.go index 6aa0a13cc9b..81e0a8b1b3b 100644 --- a/feature/gribi/otg_tests/route_removal_via_flush_test/route_removal_via_flush_test.go +++ b/feature/gribi/otg_tests/route_removal_via_flush_test/route_removal_via_flush_test.go @@ -103,7 +103,7 @@ func TestRouteRemovelViaFlush(t *testing.T) { ate.OTG().PushConfig(t, ateTop) ate.OTG().StartProtocols(t) - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the gRIBI client clientA with election ID of 10. clientA := fluent.NewClient() diff --git a/feature/gribi/otg_tests/supervisor_failure_test/supervisor_failure_test.go b/feature/gribi/otg_tests/supervisor_failure_test/supervisor_failure_test.go index 0d10645d1cc..46c4fa7f22c 100644 --- a/feature/gribi/otg_tests/supervisor_failure_test/supervisor_failure_test.go +++ b/feature/gribi/otg_tests/supervisor_failure_test/supervisor_failure_test.go @@ -327,7 +327,7 @@ func TestSupFailure(t *testing.T) { t.Fatalf("Controller %q did not become switchover-ready before test.", primaryBeforeSwitch) } - gnoiClient := dut.RawAPIs().GNOI().Default(t) + gnoiClient := dut.RawAPIs().GNOI(t) useNameOnly := deviations.GNOISubcomponentPath(dut) switchoverRequest := &spb.SwitchControlProcessorRequest{ ControlProcessor: cmp.GetSubcomponentPath(secondaryBeforeSwitch, useNameOnly), diff --git a/feature/gribi/otg_tests/weighted_balancing_test/port_flap_rebalanced_test.go b/feature/gribi/otg_tests/weighted_balancing_test/port_flap_rebalanced_test.go index 0b5e1035b5e..f228fcd0da3 100644 --- a/feature/gribi/otg_tests/weighted_balancing_test/port_flap_rebalanced_test.go +++ b/feature/gribi/otg_tests/weighted_balancing_test/port_flap_rebalanced_test.go @@ -96,7 +96,7 @@ func TestPortFlap(t *testing.T) { // Dial gRIBI ctx := context.Background() dut := ondatra.DUT(t, "dut") - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the ATE ate := ondatra.ATE(t, "ate") diff --git a/feature/gribi/otg_tests/weighted_balancing_test/weighted_balancing_test.go b/feature/gribi/otg_tests/weighted_balancing_test/weighted_balancing_test.go index 29fa7f9f4de..a9e90ac07f2 100644 --- a/feature/gribi/otg_tests/weighted_balancing_test/weighted_balancing_test.go +++ b/feature/gribi/otg_tests/weighted_balancing_test/weighted_balancing_test.go @@ -197,7 +197,7 @@ func TestWeightedBalancing(t *testing.T) { // Dial gRIBI ctx := context.Background() - gribic := dut.RawAPIs().GRIBI().Default(t) + gribic := dut.RawAPIs().GRIBI(t) // Configure the ATE ate := ondatra.ATE(t, "ate") diff --git a/feature/lldp/ate_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go b/feature/lldp/ate_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go index dbc0d67ad6e..d5408bbd803 100644 --- a/feature/lldp/ate_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go +++ b/feature/lldp/ate_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go @@ -213,7 +213,7 @@ func disableP4RTLLDP(t *testing.T, dut *ondatra.DUTDevice) { case ondatra.ARISTA: cli := `p4-runtime shutdown` - if _, err := dut.RawAPIs().GNMI().Default(t). + if _, err := dut.RawAPIs().GNMI(t). Set(context.Background(), cliSetRequest(cli)); err != nil { t.Fatalf("Failed to disable P4RTLLDP: %v", err) } diff --git a/feature/lldp/otg_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go b/feature/lldp/otg_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go index f4535eb9ab6..d239b5ea67c 100644 --- a/feature/lldp/otg_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go +++ b/feature/lldp/otg_tests/core_lldp_tlv_population_test/core_lldp_tlv_population_test.go @@ -307,7 +307,7 @@ func disableP4RTLLDP(t *testing.T, dut *ondatra.DUTDevice) { case ondatra.ARISTA: cli := `p4-runtime shutdown` - if _, err := dut.RawAPIs().GNMI().Default(t). + if _, err := dut.RawAPIs().GNMI(t). Set(context.Background(), cliSetRequest(cli)); err != nil { t.Fatalf("Failed to disable P4RTLLDP: %v", err) } diff --git a/feature/system/gnmi/cliorigin/ate_tests/cli_origin_test/cli_origin_test.go b/feature/system/gnmi/cliorigin/ate_tests/cli_origin_test/cli_origin_test.go index c704d075a25..d9e25ce4755 100644 --- a/feature/system/gnmi/cliorigin/ate_tests/cli_origin_test/cli_origin_test.go +++ b/feature/system/gnmi/cliorigin/ate_tests/cli_origin_test/cli_origin_test.go @@ -89,7 +89,7 @@ func TestOriginCliConfig(t *testing.T) { }, } - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { var config string diff --git a/feature/system/gnmi/metadata/tests/annotation_test/annotation_test.go b/feature/system/gnmi/metadata/tests/annotation_test/annotation_test.go index 9458a89b60c..d50dec0cea1 100644 --- a/feature/system/gnmi/metadata/tests/annotation_test/annotation_test.go +++ b/feature/system/gnmi/metadata/tests/annotation_test/annotation_test.go @@ -96,7 +96,7 @@ func TestGNMIMetadataAnnotation(t *testing.T) { for _, tc := range cases { t.Log(tc.desc) - gnmiClient := dut.RawAPIs().GNMI().Default(t) + gnmiClient := dut.RawAPIs().GNMI(t) //Not assuming that hostname is already configured hostnameConfigPath := gnmi.OC().System().Hostname() gnmi.Replace(t, dut, hostnameConfigPath.Config(), string("ondatraHost")) diff --git a/internal/components/components.go b/internal/components/components.go index 9044949f014..3e666357082 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -114,7 +114,7 @@ type Y struct { // New creates a new ygnmi based helper from a *ondatra.DUTDevice. func New(t testing.TB, dut *ondatra.DUTDevice) Y { - gnmic := dut.RawAPIs().GNMI().Default(t) + gnmic := dut.RawAPIs().GNMI(t) yc, err := ygnmi.NewClient(gnmic) if err != nil { t.Fatalf("Could not create ygnmi.Client: %v", err) diff --git a/internal/fptest/networkinstance.go b/internal/fptest/networkinstance.go index 2f74d3c95cb..4adac88d50f 100644 --- a/internal/fptest/networkinstance.go +++ b/internal/fptest/networkinstance.go @@ -84,7 +84,7 @@ func EnableGRIBIUnderNetworkInstance(t testing.TB, d *ondatra.DUTDevice, ni stri }, }}, } - gnmiClient := d.RawAPIs().GNMI().Default(t) + gnmiClient := d.RawAPIs().GNMI(t) if _, err := gnmiClient.Set(context.Background(), gpbSetRequest); err != nil { t.Fatalf("Enabling Gribi on network-instance %s failed with unexpected error: %v", ni, err) } diff --git a/internal/gribi/gribi.go b/internal/gribi/gribi.go index 1637ce0bc5c..699ef907617 100644 --- a/internal/gribi/gribi.go +++ b/internal/gribi/gribi.go @@ -115,7 +115,7 @@ type NHOptions struct { func (c *Client) Start(t testing.TB) error { t.Helper() t.Logf("Starting GRIBI connection for dut: %s", c.DUT.Name()) - gribiC := c.DUT.RawAPIs().GRIBI().Default(t) + gribiC := c.DUT.RawAPIs().GRIBI(t) c.fluentC = fluent.NewClient() c.electionID = Uint128{Low: 1, High: 0}