Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
hattikals committed Oct 22, 2024
1 parent dcbc957 commit f52f297
Show file tree
Hide file tree
Showing 5 changed files with 1,059 additions and 1,028 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
}
}
4 changes: 4 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1181,3 +1181,7 @@ func ChassisGetRPCUnsupported(dut *ondatra.DUTDevice) bool {
func PowerDisableEnableLeafRefValidation(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetPowerDisableEnableLeafRefValidation()
}

func GnmiGetRequiresConfigType(dut *ondatra.DUTDevice) bool {

Check failure on line 1185 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 1185 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()
}
4 changes: 4 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ message Metadata {
// Leaf-ref validation for list keys which is enforced for Cisco and hence deviation
// b/373581140
bool power_disable_enable_leaf_ref_validation = 226;
// 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 = 227;
// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173;
}
Expand Down
Loading

0 comments on commit f52f297

Please sign in to comment.