diff --git a/feature/gnmi/tests/gnmi_ni_test/metadata.textproto b/feature/gnmi/tests/gnmi_ni_test/metadata.textproto index 10d8e7acd0d..68b2b63109b 100644 --- a/feature/gnmi/tests/gnmi_ni_test/metadata.textproto +++ b/feature/gnmi/tests/gnmi_ni_test/metadata.textproto @@ -21,6 +21,7 @@ platform_exceptions: { } deviations: { default_ni_gnmi_server_name: "gnxi-default" + grpc_transport_security_false_unsupported: true } } platform_exceptions: { diff --git a/internal/cfgplugins/system.go b/internal/cfgplugins/system.go index 76aab8ad75e..15f36f49a40 100644 --- a/internal/cfgplugins/system.go +++ b/internal/cfgplugins/system.go @@ -68,6 +68,9 @@ func CreateGNMIServer(t testing.TB, d *ondatra.DUTDevice, batch *gnmi.SetBatch, if !deviations.GrpcServerServicesUnsupported(d) { gnmiServer.Services = []oc.E_SystemGrpc_GRPC_SERVICE{oc.SystemGrpc_GRPC_SERVICE_GNMI} } + if deviations.GrpcTransportSecurityFalseUnsupported(d) { + gnmiServer.TransportSecurity = ygot.Bool(true) + } gnmi.BatchUpdate(batch, gnmiServerPath.Config(), gnmiServer) } diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index a63c98cd746..25d52d16e0c 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -2196,3 +2196,9 @@ func BgpMultipathPathsUnderPeerGroupUnsupported(dut *ondatra.DUTDevice) bool { func LACPInterfaceMemberStateInterfaceUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetLacpInterfaceMemberStateInterfaceUnsupported() } + +// GrpcTransportSecurityFalseUnsupported returns true if the device does not +// support setting transport-security to false under grpc-server config. +func GrpcTransportSecurityFalseUnsupported(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetGrpcTransportSecurityFalseUnsupported() +} diff --git a/proto/metadata.proto b/proto/metadata.proto index 32bfb4ab1d1..1a1ac459df7 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -1342,6 +1342,10 @@ message Metadata { // Juniper: https://partnerissuetracker.corp.google.com/issues/510547636 bool containerz_retrieve_logs_unsupported = 426; + // Device does not support setting transport-security to false under + // grpc-server config. + bool grpc_transport_security_false_unsupported = 427; + // Reserved field numbers and identifiers. reserved 84, 9, 28, 20, 38, 43, 90, 97, 55, 89, 19, 36, 35, 40, 113, 131, 141, 173, 234, 254, 231, 300, 241, 49; } diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index e715e64e42a..3c799fafef9 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v3.21.12 +// protoc v6.33.4 // source: metadata.proto package metadata_go_proto @@ -1459,8 +1459,11 @@ type Metadata_Deviations struct { // Device does not support retrieving Containerz logs. // Juniper: https://partnerissuetracker.corp.google.com/issues/510547636 ContainerzRetrieveLogsUnsupported bool `protobuf:"varint,426,opt,name=containerz_retrieve_logs_unsupported,json=containerzRetrieveLogsUnsupported,proto3" json:"containerz_retrieve_logs_unsupported,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Device does not support setting transport-security to false under + // grpc-server config. + GrpcTransportSecurityFalseUnsupported bool `protobuf:"varint,427,opt,name=grpc_transport_security_false_unsupported,json=grpcTransportSecurityFalseUnsupported,proto3" json:"grpc_transport_security_false_unsupported,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata_Deviations) Reset() { @@ -4230,6 +4233,13 @@ func (x *Metadata_Deviations) GetContainerzRetrieveLogsUnsupported() bool { return false } +func (x *Metadata_Deviations) GetGrpcTransportSecurityFalseUnsupported() bool { + if x != nil { + return x.GrpcTransportSecurityFalseUnsupported + } + return false +} + type Metadata_PlatformExceptions struct { state protoimpl.MessageState `protogen:"open.v1"` Platform *Metadata_Platform `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` @@ -4286,7 +4296,7 @@ var File_metadata_proto protoreflect.FileDescriptor const file_metadata_proto_rawDesc = "" + "\n" + - "\x0emetadata.proto\x12\x12openconfig.testing\x1a1github.com/openconfig/ondatra/proto/testbed.proto\"\xcd\xee\x01\n" + + "\x0emetadata.proto\x12\x12openconfig.testing\x1a1github.com/openconfig/ondatra/proto/testbed.proto\"\xa8\xef\x01\n" + "\bMetadata\x12\x12\n" + "\x04uuid\x18\x01 \x01(\tR\x04uuid\x12\x17\n" + "\aplan_id\x18\x02 \x01(\tR\x06planId\x12 \n" + @@ -4298,7 +4308,7 @@ const file_metadata_proto_rawDesc = "" + "\bPlatform\x12.\n" + "\x06vendor\x18\x01 \x01(\x0e2\x16.ondatra.Device.VendorR\x06vendor\x120\n" + "\x14hardware_model_regex\x18\x03 \x01(\tR\x12hardwareModelRegex\x124\n" + - "\x16software_version_regex\x18\x04 \x01(\tR\x14softwareVersionRegexJ\x04\b\x02\x10\x03R\x0ehardware_model\x1a\x99\xe4\x01\n" + + "\x16software_version_regex\x18\x04 \x01(\tR\x14softwareVersionRegexJ\x04\b\x02\x10\x03R\x0ehardware_model\x1a\xf4\xe4\x01\n" + "\n" + "Deviations\x120\n" + "\x14ipv4_missing_enabled\x18\x01 \x01(\bR\x12ipv4MissingEnabled\x129\n" + @@ -4695,7 +4705,8 @@ const file_metadata_proto_rawDesc = "" + "0bgp_multipath_paths_under_peer_group_unsupported\x18\xa7\x03 \x01(\bR*bgpMultipathPathsUnderPeerGroupUnsupported\x123\n" + "\x15ciscoxr_vendordrop_ft\x18\xa8\x03 \x01(\tR\x13ciscoxrVendordropFt\x12h\n" + "1lacp_interface_member_state_interface_unsupported\x18\xa9\x03 \x01(\bR,lacpInterfaceMemberStateInterfaceUnsupported\x12P\n" + - "$containerz_retrieve_logs_unsupported\x18\xaa\x03 \x01(\bR!containerzRetrieveLogsUnsupportedJ\x04\bT\x10UJ\x04\b\t\x10\n" + + "$containerz_retrieve_logs_unsupported\x18\xaa\x03 \x01(\bR!containerzRetrieveLogsUnsupported\x12Y\n" + + ")grpc_transport_security_false_unsupported\x18\xab\x03 \x01(\bR%grpcTransportSecurityFalseUnsupportedJ\x04\bT\x10UJ\x04\b\t\x10\n" + "J\x04\b\x1c\x10\x1dJ\x04\b\x14\x10\x15J\x04\b&\x10'J\x04\b+\x10,J\x04\bZ\x10[J\x04\ba\x10bJ\x04\b7\x108J\x04\bY\x10ZJ\x04\b\x13\x10\x14J\x04\b$\x10%J\x04\b#\x10$J\x04\b(\x10)J\x04\bq\x10rJ\x06\b\x83\x01\x10\x84\x01J\x06\b\x8d\x01\x10\x8e\x01J\x06\b\xad\x01\x10\xae\x01J\x06\b\xea\x01\x10\xeb\x01J\x06\b\xfe\x01\x10\xff\x01J\x06\b\xe7\x01\x10\xe8\x01J\x06\b\xac\x02\x10\xad\x02J\x06\b\xf1\x01\x10\xf2\x01J\x04\b1\x102\x1a\xa0\x01\n" + "\x12PlatformExceptions\x12A\n" + "\bplatform\x18\x01 \x01(\v2%.openconfig.testing.Metadata.PlatformR\bplatform\x12G\n" +