Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
hattikals committed Oct 16, 2024
1 parent 38706dc commit 0850645
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 45 deletions.
11 changes: 9 additions & 2 deletions feature/system/tests/system_base_test/g_protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"testing"
"time"

"github.com/openconfig/featureprofiles/internal/deviations"
"github.com/openconfig/ondatra"
"github.com/openconfig/ondatra/binding/introspect"
"google.golang.org/grpc"
Expand Down Expand Up @@ -58,8 +59,14 @@ func TestGNMIClient(t *testing.T) {
dut := ondatra.DUT(t, "dut")
conn := dialConn(t, dut, introspect.GNMI, 9339)
c := gpb.NewGNMIClient(conn)
if _, err := c.Get(context.Background(), &gpb.GetRequest{Encoding: gpb.Encoding_JSON_IETF, Path: []*gpb.Path{{Elem: []*gpb.PathElem{}}}}); err != nil {
t.Fatalf("gnmi.Get failed: %v", err)
if deviations.GnmiGetRequiresConfigType(dut) {
if _, err := c.Get(context.Background(), &gpb.GetRequest{Encoding: gpb.Encoding_JSON_IETF, Path: []*gpb.Path{{Elem: []*gpb.PathElem{}}}, Type: gpb.GetRequest_CONFIG}); err != nil {
t.Fatalf("gnmi.Get failed: %v", err)
}
} else {
if _, err := c.Get(context.Background(), &gpb.GetRequest{Encoding: gpb.Encoding_JSON_IETF, Path: []*gpb.Path{{Elem: []*gpb.PathElem{}}}}); err != nil {
t.Fatalf("gnmi.Get failed: %v", err)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions feature/system/tests/system_base_test/metadata.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ platform_exceptions: {
}
deviations: {
cli_takes_precedence_over_oc: true
gnmi_get_requires_config_type: true
}
}
3 changes: 3 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,3 +1171,6 @@ func EthChannelIngressParametersUnsupported(dut *ondatra.DUTDevice) bool {
func EthChannelAssignmentCiscoNumbering(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetEthChannelAssignmentCiscoNumbering()
}
func GnmiGetRequiresConfigType(dut *ondatra.DUTDevice) bool {

Check failure on line 1174 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis

exported function GnmiGetRequiresConfigType should have comment or be unexported

Check failure on line 1174 in internal/deviations/deviations.go

View workflow job for this annotation

GitHub Actions / Static Analysis

exported function GnmiGetRequiresConfigType should have comment or be unexported
return lookupDUTDeviations(dut).GetGnmiGetRequiresConfigType()
}
5 changes: 5 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,12 @@ message Metadata {
bool eth_channel_assignment_cisco_numbering = 223;
// Devices needs time to update interface counters.
bool interface_counters_update_delayed = 224;
// gnmi_get_requires_config_type is set to true for devices that require type to be specified as config
// in default it will be false
// Juniper: b/361547597
bool gnmi_get_requires_config_type = 225;
// Reserved field numbers and identifiers.

reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173;
}

Expand Down
101 changes: 58 additions & 43 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.

0 comments on commit 0850645

Please sign in to comment.