From bdf96bd547f1f70787bbcd1bfeaf4b25d7d103f5 Mon Sep 17 00:00:00 2001 From: Karthikeya Remilla Date: Mon, 30 Sep 2024 05:42:00 +0530 Subject: [PATCH 01/27] Cisco transceiver 3 (#3457) * uncorrectable_frames deviation * uncorrectable_frames deviation * pm + logical-channels deviations * fec blocks * revert * firmware version * deviation for tunable params test * error fix * error fix * error fix * error fix * PR suggestions * PR changes * metadata changes --- .../metadata.textproto | 10 ++ .../zr_fec_uncorrectable_frames_test.go | 6 +- .../zr_firmware_version_test.go | 21 +-- .../metadata.textproto | 2 +- internal/cfgplugins/interface.go | 99 +++++++++----- internal/deviations/deviations.go | 15 +++ proto/metadata.proto | 10 +- proto/metadata_go_proto/metadata.pb.go | 124 ++++++++++++------ 8 files changed, 201 insertions(+), 86 deletions(-) diff --git a/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/metadata.textproto b/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/metadata.textproto index 501d2cce28f..f2bd6231241 100644 --- a/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/metadata.textproto +++ b/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/metadata.textproto @@ -15,3 +15,13 @@ platform_exceptions: { missing_port_to_optical_channel_component_mapping: true } } +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + otn_channel_trib_unsupported: true + eth_channel_ingress_parameters_unsupported: true + eth_channel_assignment_cisco_numbering: true + } +} diff --git a/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/zr_fec_uncorrectable_frames_test.go b/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/zr_fec_uncorrectable_frames_test.go index 9cb628c6189..8dd5f140adf 100644 --- a/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/zr_fec_uncorrectable_frames_test.go +++ b/feature/platform/transceiver/tests/zr_fec_uncorrectable_frames_test/zr_fec_uncorrectable_frames_test.go @@ -83,9 +83,7 @@ func TestZrUncorrectableFrames(t *testing.T) { for _, port := range ports { t.Run(fmt.Sprintf("Port:%s", port), func(t *testing.T) { dp := dut.Port(t, port) - gnmi.Await(t, dut, gnmi.OC().Interface(dp.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) - streamFecOtn := samplestream.New(t, dut, gnmi.OC().TerminalDevice().Channel(otnIndexes[dp.Name()]).Otn().FecUncorrectableBlocks().State(), sampleInterval) defer streamFecOtn.Close() validateFecUncorrectableBlocks(t, streamFecOtn) @@ -98,13 +96,13 @@ func TestZrUncorrectableFrames(t *testing.T) { // Disable interface i.Enabled = ygot.Bool(false) gnmi.Replace(t, dut, gnmi.OC().Interface(dp.Name()).Config(), i) - // Wait for the cooling off period + // Wait for the cooling-off period gnmi.Await(t, dut, gnmi.OC().Interface(dp.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_DOWN) // Enable interface i.Enabled = ygot.Bool(true) gnmi.Replace(t, dut, gnmi.OC().Interface(dp.Name()).Config(), i) - // Wait for the cooling off period + // Wait for the cooling-off period gnmi.Await(t, dut, gnmi.OC().Interface(dp.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) validateFecUncorrectableBlocks(t, streamFecOtn) diff --git a/feature/platform/transceiver/tests/zr_firmware_version_test/zr_firmware_version_test.go b/feature/platform/transceiver/tests/zr_firmware_version_test/zr_firmware_version_test.go index b71efad53db..a5b9f9de78f 100644 --- a/feature/platform/transceiver/tests/zr_firmware_version_test/zr_firmware_version_test.go +++ b/feature/platform/transceiver/tests/zr_firmware_version_test/zr_firmware_version_test.go @@ -19,6 +19,7 @@ import ( "testing" "time" + "github.com/openconfig/featureprofiles/internal/cfgplugins" "github.com/openconfig/featureprofiles/internal/components" "github.com/openconfig/featureprofiles/internal/fptest" "github.com/openconfig/featureprofiles/internal/samplestream" @@ -29,7 +30,6 @@ import ( ) const ( - dp16QAM = 1 targetOutputPower = -10 frequency = 193100000 ) @@ -46,8 +46,13 @@ func configInterface(t *testing.T, dut1 *ondatra.DUTDevice, dp *ondatra.Port, en i.Enabled = ygot.Bool(enable) i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd gnmi.Replace(t, dut1, gnmi.OC().Interface(dp.Name()).Config(), i) - component := components.OpticalChannelComponentFromPort(t, dut1, dp) - gnmi.Replace(t, dut1, gnmi.OC().Component(component).OpticalChannel().Config(), &oc.Component_OpticalChannel{ + componentName := components.OpticalChannelComponentFromPort(t, dut1, dp) + // Set config container leaf for optical channel + component := gnmi.OC().Component(componentName) + gnmi.Replace(t, dut1, component.Config(), &oc.Component{ + Name: ygot.String(componentName), + }) + gnmi.Replace(t, dut1, component.OpticalChannel().Config(), &oc.Component_OpticalChannel{ TargetOutputPower: ygot.Float64(targetOutputPower), Frequency: ygot.Uint64(frequency), }) @@ -74,8 +79,8 @@ func TestZRFirmwareVersionState(t *testing.T) { dp2 := dut1.Port(t, "port2") t.Logf("dut1: %v", dut1) t.Logf("dut1 dp1 name: %v", dp1.Name()) - configInterface(t, dut1, dp1, true) - configInterface(t, dut1, dp2, true) + cfgplugins.InterfaceConfig(t, dut1, dp1) + cfgplugins.InterfaceConfig(t, dut1, dp2) gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), time.Minute*2, oc.Interface_OperStatus_UP) transceiverName := gnmi.Get(t, dut1, gnmi.OC().Interface(dp1.Name()).Transceiver().State()) // Check if TRANSCEIVER is of type 400ZR @@ -97,8 +102,8 @@ func TestZRFirmwareVersionStateInterfaceFlap(t *testing.T) { dp2 := dut1.Port(t, "port2") t.Logf("dut1: %v", dut1) t.Logf("dut1 dp1 name: %v", dp1.Name()) - configInterface(t, dut1, dp1, true) - configInterface(t, dut1, dp2, true) + cfgplugins.InterfaceConfig(t, dut1, dp1) + cfgplugins.InterfaceConfig(t, dut1, dp2) gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), time.Minute, oc.Interface_OperStatus_UP) transceiverName := gnmi.Get(t, dut1, gnmi.OC().Interface(dp1.Name()).Transceiver().State()) // Check if TRANSCEIVER is of type 400ZR @@ -111,7 +116,7 @@ func TestZRFirmwareVersionStateInterfaceFlap(t *testing.T) { p1Stream := samplestream.New(t, dut1, component1.FirmwareVersion().State(), 10*time.Second) - // Wait 60 sec cooling off period + // Wait 60 sec cooling-off period gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), 2*time.Minute, oc.Interface_OperStatus_DOWN) verifyFirmwareVersionValue(t, dut1, p1Stream) diff --git a/feature/platform/transceiver/tests/zr_tunable_parameters_test/metadata.textproto b/feature/platform/transceiver/tests/zr_tunable_parameters_test/metadata.textproto index 5bd64161c63..e90ee70f530 100644 --- a/feature/platform/transceiver/tests/zr_tunable_parameters_test/metadata.textproto +++ b/feature/platform/transceiver/tests/zr_tunable_parameters_test/metadata.textproto @@ -13,4 +13,4 @@ platform_exceptions: { default_network_instance: "default" missing_zr_optical_channel_tunable_parameters_telemetry: true } -} +} \ No newline at end of file diff --git a/internal/cfgplugins/interface.go b/internal/cfgplugins/interface.go index e8e2c0330c2..fdef68680b5 100644 --- a/internal/cfgplugins/interface.go +++ b/internal/cfgplugins/interface.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/openconfig/featureprofiles/internal/components" + "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/ondatra" "github.com/openconfig/ondatra/gnmi" "github.com/openconfig/ondatra/gnmi/oc" @@ -77,6 +78,7 @@ func ToggleInterface(t *testing.T, dut *ondatra.DUTDevice, intf string, isEnable // ConfigOpticalChannel configures the optical channel. func ConfigOpticalChannel(t *testing.T, dut *ondatra.DUTDevice, och string, frequency uint64, targetOpticalPower float64, operationalMode uint16) { + gnmi.Update(t, dut, gnmi.OC().Component(och).Name().Config(), och) gnmi.Replace(t, dut, gnmi.OC().Component(och).OpticalChannel().Config(), &oc.Component_OpticalChannel{ OperationalMode: ygot.Uint16(operationalMode), Frequency: ygot.Uint64(frequency), @@ -87,43 +89,70 @@ func ConfigOpticalChannel(t *testing.T, dut *ondatra.DUTDevice, och string, freq // ConfigOTNChannel configures the OTN channel. func ConfigOTNChannel(t *testing.T, dut *ondatra.DUTDevice, och string, otnIndex, ethIndex uint32) { t.Helper() - gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(otnIndex).Config(), &oc.TerminalDevice_Channel{ - Description: ygot.String("OTN Logical Channel"), - Index: ygot.Uint32(otnIndex), - LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_OTN, - TribProtocol: oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE, - Assignment: map[uint32]*oc.TerminalDevice_Channel_Assignment{ - 0: { - Index: ygot.Uint32(0), - OpticalChannel: ygot.String(och), - Description: ygot.String("OTN to Optical Channel"), - Allocation: ygot.Float64(400), - AssignmentType: oc.Assignment_AssignmentType_OPTICAL_CHANNEL, + if deviations.OTNChannelTribUnsupported(dut) { + gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(otnIndex).Config(), &oc.TerminalDevice_Channel{ + Description: ygot.String("OTN Logical Channel"), + Index: ygot.Uint32(otnIndex), + LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_OTN, + Assignment: map[uint32]*oc.TerminalDevice_Channel_Assignment{ + 0: { + Index: ygot.Uint32(1), + OpticalChannel: ygot.String(och), + Description: ygot.String("OTN to Optical Channel"), + Allocation: ygot.Float64(400), + AssignmentType: oc.Assignment_AssignmentType_OPTICAL_CHANNEL, + }, }, - 1: { - Index: ygot.Uint32(1), - LogicalChannel: ygot.Uint32(ethIndex), - Description: ygot.String("OTN to ETH"), - Allocation: ygot.Float64(400), - AssignmentType: oc.Assignment_AssignmentType_LOGICAL_CHANNEL, + }) + } else { + gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(otnIndex).Config(), &oc.TerminalDevice_Channel{ + Description: ygot.String("OTN Logical Channel"), + Index: ygot.Uint32(otnIndex), + LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_OTN, + TribProtocol: oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE, + Assignment: map[uint32]*oc.TerminalDevice_Channel_Assignment{ + 0: { + Index: ygot.Uint32(0), + OpticalChannel: ygot.String(och), + Description: ygot.String("OTN to Optical Channel"), + Allocation: ygot.Float64(400), + AssignmentType: oc.Assignment_AssignmentType_OPTICAL_CHANNEL, + }, + 1: { + Index: ygot.Uint32(1), + LogicalChannel: ygot.Uint32(ethIndex), + Description: ygot.String("OTN to ETH"), + Allocation: ygot.Float64(400), + AssignmentType: oc.Assignment_AssignmentType_LOGICAL_CHANNEL, + }, }, - }, - }) + }) + } } // ConfigETHChannel configures the ETH channel. func ConfigETHChannel(t *testing.T, dut *ondatra.DUTDevice, interfaceName, transceiverName string, otnIndex, ethIndex uint32) { t.Helper() - gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), &oc.TerminalDevice_Channel{ - Description: ygot.String("ETH Logical Channel"), - Index: ygot.Uint32(ethIndex), - LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_ETHERNET, - TribProtocol: oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE, - Ingress: &oc.TerminalDevice_Channel_Ingress{ + var ingress = &oc.TerminalDevice_Channel_Ingress{} + if !deviations.EthChannelIngressParametersUnsupported(dut) { + ingress = &oc.TerminalDevice_Channel_Ingress{ Interface: ygot.String(interfaceName), Transceiver: ygot.String(transceiverName), - }, - Assignment: map[uint32]*oc.TerminalDevice_Channel_Assignment{ + } + } + var assignment = map[uint32]*oc.TerminalDevice_Channel_Assignment{} + if deviations.EthChannelAssignmentCiscoNumbering(dut) { + assignment = map[uint32]*oc.TerminalDevice_Channel_Assignment{ + 0: { + Index: ygot.Uint32(1), + LogicalChannel: ygot.Uint32(otnIndex), + Description: ygot.String("ETH to OTN"), + Allocation: ygot.Float64(400), + AssignmentType: oc.Assignment_AssignmentType_LOGICAL_CHANNEL, + }, + } + } else { + assignment = map[uint32]*oc.TerminalDevice_Channel_Assignment{ 0: { Index: ygot.Uint32(0), LogicalChannel: ygot.Uint32(otnIndex), @@ -131,6 +160,16 @@ func ConfigETHChannel(t *testing.T, dut *ondatra.DUTDevice, interfaceName, trans Allocation: ygot.Float64(400), AssignmentType: oc.Assignment_AssignmentType_LOGICAL_CHANNEL, }, - }, - }) + } + } + channel := &oc.TerminalDevice_Channel{ + Description: ygot.String("ETH Logical Channel"), + Index: ygot.Uint32(ethIndex), + LogicalChannelType: oc.TransportTypes_LOGICAL_ELEMENT_PROTOCOL_TYPE_PROT_ETHERNET, + TribProtocol: oc.TransportTypes_TRIBUTARY_PROTOCOL_TYPE_PROT_400GE, + RateClass: oc.TransportTypes_TRIBUTARY_RATE_CLASS_TYPE_TRIB_RATE_400G, + Ingress: ingress, + Assignment: assignment, + } + gnmi.Replace(t, dut, gnmi.OC().TerminalDevice().Channel(ethIndex).Config(), channel) } diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index 43895c6ef5e..3e2a221ac20 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -1150,3 +1150,18 @@ func UseParentComponentForTemperatureTelemetry(dut *ondatra.DUTDevice) bool { func ComponentMfgDateUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetComponentMfgDateUnsupported() } + +// OTNChannelTribUnsupported returns true if TRIB parameter is unsupported under OTN channel configuration +func OTNChannelTribUnsupported(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetOtnChannelTribUnsupported() +} + +// EthChannelIngressParametersUnsupported returns true if ingress parameters are unsupported under ETH channel configuration +func EthChannelIngressParametersUnsupported(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetEthChannelIngressParametersUnsupported() +} + +// EthChannelAssignmentCiscoNumbering returns true if eth channel assignment index starts from 1 instead of 0 +func EthChannelAssignmentCiscoNumbering(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetEthChannelAssignmentCiscoNumbering() +} diff --git a/proto/metadata.proto b/proto/metadata.proto index 25ea4d71cc6..9d5973aaa2e 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -558,7 +558,7 @@ message Metadata { // equal to the canonical hardware model name of its device. bool model_name_unsupported = 194; // community_match_with_redistribution_unsupported is set to true for devices that do not support matching community at the redistribution attach point. - bool community_match_with_redistribution_unsupported = 195; + bool community_match_with_redistribution_unsupported = 195; // Devices that do not support components/component/state/install-component // and components/component/state/install-position. bool install_position_and_install_component_unsupported = 196; @@ -575,7 +575,7 @@ message Metadata { // weighted ecmp feature verification using fixed packet bool weighted_ecmp_fixed_packet_verification = 202; // Override default NextHop scale while enabling encap/decap scale - // CISCO: + // CISCO: bool override_default_nh_scale = 203; // Devices that donot support setting bgp extended community set bool bgp_extended_community_set_unsupported = 204; @@ -615,6 +615,12 @@ message Metadata { bool use_parent_component_for_temperature_telemetry = 219; // component manufactured date is unsupported bool component_mfg_date_unsupported = 220; + // trib protocol field under otn channel config unsupported + bool otn_channel_trib_unsupported = 221; + // ingress parameters under eth channel config unsupported + bool eth_channel_ingress_parameters_unsupported = 222; + // Cisco numbering for eth channel assignment starts from 1 instead of 0 + bool eth_channel_assignment_cisco_numbering = 223; // Reserved field numbers and identifiers. reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173; } diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 74bd44e8e0b..2472d35b23b 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -897,6 +897,12 @@ type Metadata_Deviations struct { UseParentComponentForTemperatureTelemetry bool `protobuf:"varint,219,opt,name=use_parent_component_for_temperature_telemetry,json=useParentComponentForTemperatureTelemetry,proto3" json:"use_parent_component_for_temperature_telemetry,omitempty"` // component manufactured date is unsupported ComponentMfgDateUnsupported bool `protobuf:"varint,220,opt,name=component_mfg_date_unsupported,json=componentMfgDateUnsupported,proto3" json:"component_mfg_date_unsupported,omitempty"` + // trib protocol field under otn channel config unsupported + OtnChannelTribUnsupported bool `protobuf:"varint,221,opt,name=otn_channel_trib_unsupported,json=otnChannelTribUnsupported,proto3" json:"otn_channel_trib_unsupported,omitempty"` + // ingress parameters under eth channel config unsupported + EthChannelIngressParametersUnsupported bool `protobuf:"varint,222,opt,name=eth_channel_ingress_parameters_unsupported,json=ethChannelIngressParametersUnsupported,proto3" json:"eth_channel_ingress_parameters_unsupported,omitempty"` + // Cisco numbering for eth channel assignment starts from 1 instead of 0 + EthChannelAssignmentCiscoNumbering bool `protobuf:"varint,223,opt,name=eth_channel_assignment_cisco_numbering,json=ethChannelAssignmentCiscoNumbering,proto3" json:"eth_channel_assignment_cisco_numbering,omitempty"` } func (x *Metadata_Deviations) Reset() { @@ -2324,6 +2330,27 @@ func (x *Metadata_Deviations) GetComponentMfgDateUnsupported() bool { return false } +func (x *Metadata_Deviations) GetOtnChannelTribUnsupported() bool { + if x != nil { + return x.OtnChannelTribUnsupported + } + return false +} + +func (x *Metadata_Deviations) GetEthChannelIngressParametersUnsupported() bool { + if x != nil { + return x.EthChannelIngressParametersUnsupported + } + return false +} + +func (x *Metadata_Deviations) GetEthChannelAssignmentCiscoNumbering() bool { + if x != nil { + return x.EthChannelAssignmentCiscoNumbering + } + return false +} + type Metadata_PlatformExceptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2387,7 +2414,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x7b, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x7d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -2421,7 +2448,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xc5, 0x73, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xb9, 0x75, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, @@ -3340,46 +3367,61 @@ var file_metadata_proto_rawDesc = []byte{ 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x66, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0xdc, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4d, 0x66, 0x67, 0x44, 0x61, - 0x74, 0x65, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, - 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, - 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x4a, 0x04, 0x08, 0x61, 0x10, - 0x62, 0x4a, 0x04, 0x08, 0x37, 0x10, 0x38, 0x4a, 0x04, 0x08, 0x59, 0x10, 0x5a, 0x4a, 0x04, 0x08, - 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x24, 0x10, 0x25, 0x4a, 0x04, 0x08, 0x23, 0x10, 0x24, 0x4a, - 0x04, 0x08, 0x28, 0x10, 0x29, 0x4a, 0x06, 0x08, 0xad, 0x01, 0x10, 0xae, 0x01, 0x1a, 0xa0, 0x01, - 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xfa, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, - 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, - 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, - 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, - 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, - 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x03, 0x12, 0x1a, + 0x74, 0x65, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, + 0x1c, 0x6f, 0x74, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x69, + 0x62, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0xdd, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x6f, 0x74, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x54, 0x72, 0x69, 0x62, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, + 0x5b, 0x0a, 0x2a, 0x65, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0xde, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x26, 0x65, 0x74, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x53, 0x0a, 0x26, + 0x65, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x69, 0x73, 0x63, 0x6f, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xdf, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x65, + 0x74, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x43, 0x69, 0x73, 0x63, 0x6f, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x6e, + 0x67, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, + 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x4a, + 0x04, 0x08, 0x61, 0x10, 0x62, 0x4a, 0x04, 0x08, 0x37, 0x10, 0x38, 0x4a, 0x04, 0x08, 0x59, 0x10, + 0x5a, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x24, 0x10, 0x25, 0x4a, 0x04, 0x08, + 0x23, 0x10, 0x24, 0x4a, 0x04, 0x08, 0x28, 0x10, 0x29, 0x4a, 0x06, 0x08, 0xad, 0x01, 0x10, 0xae, + 0x01, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, + 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, + 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, + 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, + 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, + 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, + 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, + 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, + 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, + 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, + 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, + 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, - 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, - 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, - 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x38, 0x4c, - 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, - 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x30, 0x30, 0x5a, 0x52, 0x10, 0x08, 0x22, 0x6d, 0x0a, - 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, - 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, - 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x5f, 0x38, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x30, 0x30, 0x5a, 0x52, 0x10, + 0x08, 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, + 0x54, 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 756381c222376f0d38cfebf2612e350f5bb59a28 Mon Sep 17 00:00:00 2001 From: Karthikeya Remilla Date: Mon, 30 Sep 2024 22:18:13 +0530 Subject: [PATCH 02/27] Transceiver-9: improving test flow (#3462) * improving test flow * removed redundant line --- .../zr_laser_bias_current_test.go | 148 +++++++----------- 1 file changed, 56 insertions(+), 92 deletions(-) diff --git a/feature/platform/transceiver/tests/zr_laser_bias_current_test/zr_laser_bias_current_test.go b/feature/platform/transceiver/tests/zr_laser_bias_current_test/zr_laser_bias_current_test.go index 80e67d6649b..bdc31e8f363 100644 --- a/feature/platform/transceiver/tests/zr_laser_bias_current_test/zr_laser_bias_current_test.go +++ b/feature/platform/transceiver/tests/zr_laser_bias_current_test/zr_laser_bias_current_test.go @@ -15,10 +15,10 @@ package zr_laser_bias_current_test import ( - "reflect" "testing" "time" + "github.com/openconfig/featureprofiles/internal/cfgplugins" "github.com/openconfig/featureprofiles/internal/components" "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/featureprofiles/internal/fptest" @@ -29,12 +29,6 @@ import ( "github.com/openconfig/ygot/ygot" ) -const ( - dp16QAM = 1 - targetOutputPower = -10 - frequency = 193500000 -) - func TestMain(m *testing.M) { fptest.RunTests(m) } @@ -43,93 +37,73 @@ func TestMain(m *testing.M) { // dut:port1 <--> port2:dut // -func verifyLaserBiasCurrent(t *testing.T, pStream *samplestream.SampleStream[float64], sensorName string) float64 { - laserBias := pStream.Next() +func verifyLaserBiasValue(t *testing.T, laserBiasValue float64) { + t.Helper() + if laserBiasValue <= 0 && laserBiasValue >= 131 { + t.Errorf("The laser bias value is not between 0 and 131") + } +} + +func verifyLaserBiasCurrentAll(t *testing.T, p1Stream *samplestream.SampleStream[*oc.Component_OpticalChannel_LaserBiasCurrent], dut1 *ondatra.DUTDevice) { + laserBias := p1Stream.Next() if laserBias == nil { - t.Fatalf("laserBias telemetry %q was not streamed in the most recent subscription interval", sensorName) + t.Fatalf("laserBias telemetry was not streamed in the most recent subscription interval") } laserBiasVal, ok := laserBias.Val() if !ok { - t.Fatalf("LaserBias %q telemetry is not present", sensorName) - } - if reflect.TypeOf(laserBiasVal).Kind() != reflect.Float64 { - t.Errorf("Return value is not type float64") - } - if laserBiasVal <= 0 && laserBiasVal >= 131 { - t.Errorf("The laser bias value is not between 0 and 131") + t.Fatalf("LaserBias telemetry is not present") } - t.Logf("laserBias value: %f", laserBiasVal) - return laserBiasVal -} - -func verifyLaserBiasCurrentAll(t *testing.T, pStreamInstant *samplestream.SampleStream[float64], pStreamAvg *samplestream.SampleStream[float64], pStreamMax *samplestream.SampleStream[float64], pStreamMin *samplestream.SampleStream[float64], dut1 *ondatra.DUTDevice) { - laserbiasInstant := verifyLaserBiasCurrent(t, pStreamInstant, "laserbiasInstant") - t.Logf("laserBias Instant value: %f", laserbiasInstant) + laserBiasInstant := laserBiasVal.GetInstant() + t.Logf("laserBias Instant value: %f", laserBiasInstant) if deviations.MissingZROpticalChannelTunableParametersTelemetry(dut1) { t.Log("Skipping Min/Max/Avg Tunable Parameters Telemetry validation. Deviation MissingZROpticalChannelTunableParametersTelemetry enabled.") } else { - laserbiasMin := verifyLaserBiasCurrent(t, pStreamMin, "laserbiasMin") - t.Logf("laserBias Min value: %f", laserbiasMin) - laserbiasMax := verifyLaserBiasCurrent(t, pStreamMax, "laserbiasMax") - t.Logf("laserBias Max value: %f", laserbiasMax) - laserbiasAvg := verifyLaserBiasCurrent(t, pStreamAvg, "laserbiasAvg") - t.Logf("laserBias Avg value: %f", laserbiasAvg) - if laserbiasAvg >= laserbiasMin && laserbiasAvg <= laserbiasMax { - t.Logf("The average is between the maximum and minimum values") + laserBiasMin := laserBiasVal.GetMin() + verifyLaserBiasValue(t, laserBiasMin) + t.Logf("laserBias Min value: %f", laserBiasMin) + laserBiasMax := laserBiasVal.GetMax() + verifyLaserBiasValue(t, laserBiasMax) + t.Logf("laserBias Max value: %f", laserBiasMax) + laserBiasAvg := laserBiasVal.GetAvg() + verifyLaserBiasValue(t, laserBiasAvg) + t.Logf("laserBias Avg value: %f", laserBiasMin) + if laserBiasAvg >= laserBiasMin && laserBiasAvg <= laserBiasMax { + t.Logf("The average %f is between the maximum and minimum values", laserBiasAvg) } else { - t.Fatalf("The average is not between the maximum and minimum values Avg:%f Min:%f Max:%f", laserbiasAvg, laserbiasMin, laserbiasMax) + t.Fatalf("The average is not between the maximum and minimum values Avg:%f Min:%f Max:%f", laserBiasAvg, laserBiasMin, laserBiasMax) } } } -func interfaceConfig(t *testing.T, dut1 *ondatra.DUTDevice, dp *ondatra.Port) { - d := &oc.Root{} - i := d.GetOrCreateInterface(dp.Name()) - i.Enabled = ygot.Bool(true) - i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd - gnmi.Replace(t, dut1, gnmi.OC().Interface(dp.Name()).Config(), i) - OCcomponent := components.OpticalChannelComponentFromPort(t, dut1, dp) - gnmi.Replace(t, dut1, gnmi.OC().Component(OCcomponent).OpticalChannel().Config(), &oc.Component_OpticalChannel{ - TargetOutputPower: ygot.Float64(targetOutputPower), - Frequency: ygot.Uint64(frequency), - }) -} - func TestZRLaserBiasCurrentState(t *testing.T) { dut1 := ondatra.DUT(t, "dut") dp1 := dut1.Port(t, "port1") dp2 := dut1.Port(t, "port2") t.Logf("dut1: %v", dut1) t.Logf("dut1 dp1 name: %v", dp1.Name()) - interfaceConfig(t, dut1, dp1) - interfaceConfig(t, dut1, dp2) + cfgplugins.InterfaceConfig(t, dut1, dp1) + cfgplugins.InterfaceConfig(t, dut1, dp2) intUpdateTime := 2 * time.Minute gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) transceiverState := gnmi.Get(t, dut1, gnmi.OC().Interface(dp1.Name()).Transceiver().State()) if dp1.PMD() != ondatra.PMD400GBASEZR { t.Fatalf("%s Transceiver is not 400ZR its of type: %v", transceiverState, dp1.PMD()) } - OCcomponent := components.OpticalChannelComponentFromPort(t, dut1, dp1) - component1 := gnmi.OC().Component(OCcomponent) - p1StreamInstant := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Instant().State(), 10*time.Second) - p1StreamMin := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Min().State(), 10*time.Second) - p1StreamMax := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Max().State(), 10*time.Second) - p1StreamAvg := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Avg().State(), 10*time.Second) - defer p1StreamAvg.Close() - defer p1StreamMax.Close() - defer p1StreamMin.Close() - defer p1StreamInstant.Close() - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) + componentName := components.OpticalChannelComponentFromPort(t, dut1, dp1) + component := gnmi.OC().Component(componentName) + p1Stream := samplestream.New(t, dut1, component.OpticalChannel().LaserBiasCurrent().State(), 10*time.Second) + defer p1Stream.Close() + verifyLaserBiasCurrentAll(t, p1Stream, dut1) } -func TestZRLaserBiasCurrentStateInterface_Flap(t *testing.T) { +func TestZRLaserBiasCurrentStateInterfaceFlap(t *testing.T) { dut1 := ondatra.DUT(t, "dut") dp1 := dut1.Port(t, "port1") dp2 := dut1.Port(t, "port2") t.Logf("dut1: %v", dut1) t.Logf("dut1 dp1 name: %v", dp1.Name()) - interfaceConfig(t, dut1, dp1) - interfaceConfig(t, dut1, dp2) + cfgplugins.InterfaceConfig(t, dut1, dp1) + cfgplugins.InterfaceConfig(t, dut1, dp2) intUpdateTime := 2 * time.Minute // Check interface is up gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) @@ -144,25 +118,19 @@ func TestZRLaserBiasCurrentStateInterface_Flap(t *testing.T) { i.Enabled = ygot.Bool(false) i.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd gnmi.Replace(t, dut1, gnmi.OC().Interface(dp1.Name()).Config(), i) - OCcomponent := components.OpticalChannelComponentFromPort(t, dut1, dp1) - component1 := gnmi.OC().Component(OCcomponent) - p1StreamInstant := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Instant().State(), 10*time.Second) - p1StreamMin := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Min().State(), 10*time.Second) - p1StreamMax := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Max().State(), 10*time.Second) - p1StreamAvg := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Avg().State(), 10*time.Second) - defer p1StreamInstant.Close() - defer p1StreamMin.Close() - defer p1StreamMax.Close() - defer p1StreamAvg.Close() - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) - // Wait 120 sec cooling off period + componentName := components.OpticalChannelComponentFromPort(t, dut1, dp1) + component := gnmi.OC().Component(componentName) + p1Stream := samplestream.New(t, dut1, component.OpticalChannel().LaserBiasCurrent().State(), 10*time.Second) + defer p1Stream.Close() + verifyLaserBiasCurrentAll(t, p1Stream, dut1) + // Wait 120 sec cooling-off period gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_DOWN) + verifyLaserBiasCurrentAll(t, p1Stream, dut1) // Enable interface - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) i.Enabled = ygot.Bool(true) gnmi.Replace(t, dut1, gnmi.OC().Interface(dp1.Name()).Config(), i) gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) + verifyLaserBiasCurrentAll(t, p1Stream, dut1) } func TestZRLaserBiasCurrentStateTransceiverOnOff(t *testing.T) { @@ -171,8 +139,8 @@ func TestZRLaserBiasCurrentStateTransceiverOnOff(t *testing.T) { dp2 := dut1.Port(t, "port2") t.Logf("dut1: %v", dut1) t.Logf("dut1 dp1 name: %v", dp1.Name()) - interfaceConfig(t, dut1, dp1) - interfaceConfig(t, dut1, dp2) + cfgplugins.InterfaceConfig(t, dut1, dp1) + cfgplugins.InterfaceConfig(t, dut1, dp2) intUpdateTime := 2 * time.Minute gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) transceiverState := gnmi.Get(t, dut1, gnmi.OC().Interface(dp1.Name()).Transceiver().State()) @@ -180,21 +148,17 @@ func TestZRLaserBiasCurrentStateTransceiverOnOff(t *testing.T) { if dp1.PMD() != ondatra.PMD400GBASEZR { t.Fatalf("%s Transceiver is not 400ZR its of type: %v", transceiverState, dp1.PMD()) } - OCcomponent := components.OpticalChannelComponentFromPort(t, dut1, dp1) - component1 := gnmi.OC().Component(OCcomponent) - p1StreamInstant := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Instant().State(), 10*time.Second) - p1StreamMin := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Min().State(), 10*time.Second) - p1StreamMax := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Max().State(), 10*time.Second) - p1StreamAvg := samplestream.New(t, dut1, component1.OpticalChannel().LaserBiasCurrent().Avg().State(), 10*time.Second) - defer p1StreamInstant.Close() - defer p1StreamMin.Close() - defer p1StreamMax.Close() - defer p1StreamAvg.Close() - // Disable interface transceiver power off + componentName := components.OpticalChannelComponentFromPort(t, dut1, dp1) + component := gnmi.OC().Component(componentName) + p1Stream := samplestream.New(t, dut1, component.OpticalChannel().LaserBiasCurrent().State(), 10*time.Second) + defer p1Stream.Close() + verifyLaserBiasCurrentAll(t, p1Stream, dut1) + // power off interface transceiver + gnmi.Update(t, dut1, gnmi.OC().Component(dp1.Name()).Name().Config(), dp1.Name()) gnmi.Update(t, dut1, gnmi.OC().Component(dp1.Name()).Transceiver().Enabled().Config(), false) - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) - // Enable interface transceiver power on + verifyLaserBiasCurrentAll(t, p1Stream, dut1) + // power on interface transceiver gnmi.Update(t, dut1, gnmi.OC().Component(dp1.Name()).Transceiver().Enabled().Config(), true) gnmi.Await(t, dut1, gnmi.OC().Interface(dp1.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_UP) - verifyLaserBiasCurrentAll(t, p1StreamInstant, p1StreamAvg, p1StreamMax, p1StreamMin, dut1) + verifyLaserBiasCurrentAll(t, p1Stream, dut1) } From 63156e51e1425c40c4bcecec28d1d61b156b521f Mon Sep 17 00:00:00 2001 From: Rahul Kumar <164056913+rahulsy26@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:42:31 +0530 Subject: [PATCH 03/27] Fixing Error (#3423) --- .../otg_tests/gribi_route_test/README.md | 174 +++++ .../gribi_route_test/gribi_route_test.go | 726 ++++++++++++++++++ .../gribi_route_test/metadata.textproto | 55 ++ 3 files changed, 955 insertions(+) create mode 100644 feature/gribi/otg_tests/gribi_route_test/README.md create mode 100644 feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go create mode 100644 feature/gribi/otg_tests/gribi_route_test/metadata.textproto diff --git a/feature/gribi/otg_tests/gribi_route_test/README.md b/feature/gribi/otg_tests/gribi_route_test/README.md new file mode 100644 index 00000000000..2f709e4ab43 --- /dev/null +++ b/feature/gribi/otg_tests/gribi_route_test/README.md @@ -0,0 +1,174 @@ +# RT-14.2: GRIBI Route Test + +## Summary + +Ensure Traffic is Encap/Decap to NextHop based on Gribi structure. + +## Topology + +ATE port-1 <------> port-1 DUT +DUT port-2 <------> port-2 ATE +DUT port-3 <------> port-3 ATE + +## Variables +``` +# Magic source IP addresses used in this test + * ipv4_outer_src_111 = 198.51.100.111 + * ipv4PrefixEncapped = ipv4InnerDst = 138.0.11.8 + * ipv4PrefixNotEncapped = ipv4OuterDst222 = 198.50.100.65 +``` + +## Baseline + +### VRF Selection Policy + +``` +network-instances { + network-instance { + name: DEFAULT + policy-forwarding { + policies { + policy { + policy-id: "vrf_selection_policy_c" + rules { + rule { + sequence-id: 1 + ipv4 { + protocol: 4 + source-address: "ipv4_outer_src_111" + } + action { + network-instance: "ENCAP_TE_VRF_A" + } + } + rule { + sequence-id: 2 + ipv4 { + protocol: 41 + dscp-set: [dscp_encap_a_1, dscp_encap_a_2] + source-address: "ipv4_outer_src_222" + } + action { + network-instance: "TRANSIT_TE_VRF" + } + } + } + } + } + } + } +} +``` +``` +### Install the following gRIBI AFTs. + +- IPv4Entry {0.0.0.0/0 (TRANSIT_TE_VRF)} -> NHG#1 (DEFAULT VRF) -> { + {NH#1, DEFAULT VRF, weight:1}, + } + NH#1 -> { + decapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 + network_instance: "DEFAULT" + } +- IPv4Entry {198.50.100.64/32 (TRANSIT_TE_VRF)} -> NHG#2 (DEFAULT VRF) -> { + {NH#2, DEFAULT VRF, weight:1}, interface-ref:dut-port-2-interface, + } +- IPv4Entry {198.50.100.64/32 (TE_VRF_111)} -> NHG#3 (DEFAULT VRF) -> { + {NH#3, DEFAULT VRF, weight:1}, interface-ref:dut-port-2-interface, + } +- IPv4Entry {0.0.0.0/0 (ENCAP_TE_VRF_A)} -> NHG#5 (DEFAULT VRF) -> { + {NH#5, DEFAULT VRF, weight:1, interface-ref:dut-port-3-interface}, + } +- IPv4Entry {138.0.11.8/32 (ENCAP_TE_VRF_A)} -> NHG#4 (DEFAULT VRF) -> { + {NH#4, DEFAULT VRF, weight:1}, + } + NH#4 -> { + encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 + ip_in_ip { + dst_ip: "198.50.100.64" + src_ip: "ipv4_outer_src_111" + } + network_instance: "TE_VRF_111" + } +``` +- Install a BGP route in default VRF to route traffic out of DUT port-3. + +## Procedure + +The DUT should be reset to the baseline after each of the following tests. + +Test-1, Match on source prefix, flow hits ENCAP_TE_VRF_A followed by TE_VRF_111 + +``` + 1. Send flow with source IP ipv4_outer_src_111 with destination IP ipv4PrefixEncapped. + 2. Verify v4 packet matched with tunnel prefix and encapped -> hit TE_VRF_111 + and egress via port-2. + 3. No traffic loss in steady state + +``` +Test-2, Match on source prefix, flow hits ENCAP_TE_VRF_A followed by Default VRF + +``` + 1. Send flow with source IP ipv4_outer_src_111 with destination IP ipv4PrefixNotEncapped. + 2. Verify v4 packet not matched with tunnel prefix and egress via port-3. + 3. No traffic loss in steady state + +``` +Test-3, Match on source prefix and protocol, flow hits TRANSIT_TE_VRF +match with Tunnel prefix /32 + +``` + 1. Send the following 4in4 flows to DUT port-1: + * inner_src: `ipv4_inner_src` + * inner_dst: `ipv4InnerDst` + * outter_src: `ipv4_outter_src_111` + * outter_dst: `ipv4_outter_decap_no_match` + * proto: `4` + 2. Verify packet matched with tunnel prefix and egress via port-2. + 3. No traffic loss in steady state + +``` +Test-4, Match on source prefix and protocol, flow hits TRANSIT_TE_VRF matched with 0/0 prefix, decap & sent to default vrf +``` + 1. Send the following 4in4 flows to DUT port-1: + * inner_src: `ipv4_inner_src` + * inner_dst: `ipv4InnerDst` + * outter_src: `ipv4_outter_src_111` + * outter_dst: `ipv4_outter_decap_match` + * proto: `4` + 2. Verify packet not matched with tunnel prefix, decap and failback + to default vrf. + 3. No traffic loss in steady state + +``` +## Config Parameter Coverage + +* network-instances/network-instance/name +* network-instances/network-instance/policy-forwarding/policies/policy/policy-id +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/sequence-id +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/protocol +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/source-address +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/source-address +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/network-instance + +## Telemetry Parameter Coverage + +* network-instances/network-instance/name +* network-instances/network-instance/policy-forwarding/policies/policy/policy-id +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/sequence-id +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/protocol +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/source-address +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/source-address +* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/network-instance + +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` diff --git a/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go b/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go new file mode 100644 index 00000000000..2038b0e1899 --- /dev/null +++ b/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go @@ -0,0 +1,726 @@ +package gribi_route_test + +import ( + "context" + "fmt" + "log" + "os" + "strconv" + "testing" + "time" + + "github.com/google/gopacket" + "github.com/google/gopacket/layers" + "github.com/google/gopacket/pcap" + "github.com/open-traffic-generator/snappi/gosnappi" + "github.com/openconfig/featureprofiles/internal/attrs" + "github.com/openconfig/featureprofiles/internal/deviations" + "github.com/openconfig/featureprofiles/internal/fptest" + "github.com/openconfig/featureprofiles/internal/gribi" + "github.com/openconfig/featureprofiles/internal/otgutils" + "github.com/openconfig/gribigo/chk" + "github.com/openconfig/gribigo/constants" + "github.com/openconfig/gribigo/fluent" + "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi" + "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ondatra/otg" + "github.com/openconfig/ygnmi/ygnmi" + "github.com/openconfig/ygot/ygot" +) + +const ( + niTransitTeVrf = "TRANSIT_TE_VRF" + niEncapTeVrfA = "ENCAP_TE_VRF_A" + niTEVRF111 = "TE_VRF_111" + vrfPolC = "vrf_selection_policy_c" + seqIDBase = uint32(10) + ipv4OuterSrc111 = "198.51.100.111" + ipv4OuterSrc111WithMask = "198.51.100.111/32" + ipv4InnerDst = "138.0.11.8" + ipv4OuterDst111 = "198.50.100.64" + ipv4OuterDst222 = "198.50.100.65" + peerGrpName = "BGP-PEER-GROUP1" + asn = 65501 + tolerancePct = 2 + checkEncap = true +) + +var ( + dutPort1 = attrs.Attributes{ + Desc: "DUT Port 1", + IPv4: "192.0.2.1", + IPv4Len: 30, + } + dutPort2 = attrs.Attributes{ + Desc: "DUT Port 2", + IPv4: "192.0.2.5", + IPv4Len: 30, + } + dutPort3 = attrs.Attributes{ + Desc: "DUT Port 3", + IPv4: "192.0.2.9", + IPv4Len: 30, + } + + atePort1 = attrs.Attributes{ + Name: "port1", + MAC: "02:00:01:01:01:01", + Desc: "ATE Port 1", + IPv4: "192.0.2.2", + IPv4Len: 30, + } + atePort2 = attrs.Attributes{ + Name: "port2", + MAC: "02:00:02:01:01:01", + Desc: "ATE Port 2", + IPv4: "192.0.2.6", + IPv4Len: 30, + } + atePort3 = attrs.Attributes{ + Name: "port3", + MAC: "02:00:03:01:01:01", + Desc: "ATE Port 3", + IPv4: "192.0.2.10", + IPv4Len: 30, + } +) + +type bgpNeighbor struct { + Name string + dutIPv4 string + ateIPv4 string + MAC string +} + +var ( + bgpNbr1 = bgpNeighbor{ + Name: "port1", + dutIPv4: "192.0.2.1", + ateIPv4: "192.0.2.2", + MAC: "02:00:01:01:01:01", + } + bgpNbr2 = bgpNeighbor{ + Name: "port2", + dutIPv4: "192.0.2.5", + ateIPv4: "192.0.2.6", + MAC: "02:00:02:01:01:01", + } + bgpNbr3 = bgpNeighbor{ + Name: "port3", + dutIPv4: "192.0.2.9", + ateIPv4: "192.0.2.10", + MAC: "02:00:03:01:01:01", + } +) + +type packetValidation struct { + portName string + outDstIP []string + inHdrIP string + validateDecap bool + validateNoDecap bool + validateEncap bool +} + +type policyFwRule struct { + SeqID uint32 + family string + protocol oc.UnionUint8 + dscpSet []uint8 + sourceAddr string + ni string +} + +// testArgs holds the objects needed by a test case. +type testArgs struct { + dut *ondatra.DUTDevice + ctx context.Context + client *fluent.GRIBIClient + ate *ondatra.ATEDevice + otgConfig gosnappi.Config + otg *otg.OTG +} + +type flowArgs struct { + flowName string + outHdrSrcIP, outHdrDstIP string + InnHdrSrcIP, InnHdrDstIP string + InnHdrSrcIPv6, InnHdrDstIPv6 string + isIPInIP bool +} + +func TestMain(m *testing.M) { + fptest.RunTests(m) +} + +func TestGRIBIFailover(t *testing.T) { + dut := ondatra.DUT(t, "dut") + configureDUT(t, dut) + ate := ondatra.ATE(t, "ate") + top := configureOTG(t, ate) + t.Log("Configure VRF_Policy") + configureVrfSelectionPolicyC(t, dut) + t.Log("Configure GRIBI") + configureGribiRoute(t, dut) + + llAddress, found := gnmi.Watch(t, ate.OTG(), gnmi.OTG().Interface("port1.Eth").Ipv4Neighbor(dutPort1.IPv4).LinkLayerAddress().State(), time.Minute, func(val *ygnmi.Value[string]) bool { + return val.IsPresent() + }).Await(t) + if !found { + t.Fatalf("Could not get the LinkLayerAddress %s", llAddress) + } + dstMac, _ := llAddress.Val() + + verifyBgpTelemetry(t, dut) + + args := &testArgs{ + dut: dut, + ate: ate, + otgConfig: top, + otg: ate.OTG(), + } + t.Run("RT-14.2.1: Traffic Prefix Match to Tunnel Prefix, Encapped and Egress via Port2", func(t *testing.T) { + flow := createFlow(&flowArgs{flowName: "flow4in4", + InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4InnerDst}, dstMac) + sendTraffic(t, args, top, ate, flow, 30, []string{"port2"}) + if ok := verifyTrafficFlow(t, ate, flow); !ok { + t.Fatal("Packet Dropped, LossPct for flow ") + } + captureAndValidatePackets(t, args, &packetValidation{portName: atePort2.Name, + outDstIP: []string{ipv4OuterDst111}, inHdrIP: ipv4InnerDst, validateEncap: true}) + }) + + t.Run("RT-14.2.2: Traffic Prefix not Matched to Tunnel Prefix, Egress via Port3", func(t *testing.T) { + flow := createFlow(&flowArgs{flowName: "flow4in4", + InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4OuterDst222}, dstMac) + sendTraffic(t, args, top, ate, flow, 30, []string{"port3"}) + if ok := verifyTrafficFlow(t, ate, flow); !ok { + t.Fatal("Packet Dropped, LossPct for flow ") + } + }) + + t.Run("RT-14.2.3: Traffic Match to Transit_Vrf, Match Tunnel Prefix Egress to Port2", func(t *testing.T) { + flow := createFlow(&flowArgs{flowName: "flow4in4", + outHdrSrcIP: ipv4OuterSrc111, outHdrDstIP: ipv4OuterDst111, + InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4InnerDst, isIPInIP: true}, dstMac) + sendTraffic(t, args, top, ate, flow, 30, []string{"port2"}) + if ok := verifyTrafficFlow(t, ate, flow); !ok { + t.Fatal("Packet Dropped, LossPct for flow ") + } + captureAndValidatePackets(t, args, &packetValidation{portName: atePort2.Name, + outDstIP: []string{ipv4OuterDst111}, inHdrIP: ipv4InnerDst, validateNoDecap: true}) + }) + + t.Run("RT-14.2.4: Traffic Match to Transit_Vrf, noMatch Tunnel Prefix Egress to Port3", func(t *testing.T) { + flow := createFlow(&flowArgs{flowName: "flow4in4", + outHdrSrcIP: ipv4OuterSrc111, outHdrDstIP: ipv4OuterDst222, + InnHdrSrcIP: ipv4OuterSrc111, InnHdrDstIP: ipv4InnerDst, isIPInIP: true}, dstMac) + sendTraffic(t, args, top, ate, flow, 30, []string{"port3"}) + if ok := verifyTrafficFlow(t, ate, flow); !ok { + t.Fatal("Packet Dropped, LossPct for flow ") + } + captureAndValidatePackets(t, args, &packetValidation{portName: atePort3.Name, + outDstIP: []string{ipv4OuterDst222}, inHdrIP: ipv4InnerDst, validateDecap: true}) + }) +} + +// configureDUT configures port1-3 on the DUT. +func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { + t.Logf("configureDUT") + p1 := dut.Port(t, "port1") + p2 := dut.Port(t, "port2") + p3 := dut.Port(t, "port3") + + gnmi.Replace(t, dut, gnmi.OC().Interface(p1.Name()).Config(), dutPort1.NewOCInterface(p1.Name(), dut)) + gnmi.Replace(t, dut, gnmi.OC().Interface(p2.Name()).Config(), dutPort2.NewOCInterface(p2.Name(), dut)) + gnmi.Replace(t, dut, gnmi.OC().Interface(p3.Name()).Config(), dutPort3.NewOCInterface(p3.Name(), dut)) + + if deviations.ExplicitPortSpeed(dut) { + fptest.SetPortSpeed(t, p1) + fptest.SetPortSpeed(t, p2) + fptest.SetPortSpeed(t, p3) + } + if deviations.ExplicitInterfaceInDefaultVRF(dut) { + fptest.AssignToNetworkInstance(t, dut, p1.Name(), deviations.DefaultNetworkInstance(dut), 0) + fptest.AssignToNetworkInstance(t, dut, p2.Name(), deviations.DefaultNetworkInstance(dut), 0) + fptest.AssignToNetworkInstance(t, dut, p3.Name(), deviations.DefaultNetworkInstance(dut), 0) + } + configNonDefaultNetworkInstance(t, dut) + dutConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + gnmi.Delete(t, dut, dutConfPath.Config()) + dutConf := bgpCreateNbr(asn, dut) + gnmi.Replace(t, dut, dutConfPath.Config(), dutConf) +} + +func bgpCreateNbr(localAs uint32, dut *ondatra.DUTDevice) *oc.NetworkInstance_Protocol { + dutOcRoot := &oc.Root{} + ni1 := dutOcRoot.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + niProto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + bgp := niProto.GetOrCreateBgp() + + global := bgp.GetOrCreateGlobal() + global.RouterId = ygot.String(dutPort3.IPv4) + global.As = ygot.Uint32(localAs) + global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true) + global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST).Enabled = ygot.Bool(true) + pg1 := bgp.GetOrCreatePeerGroup(peerGrpName) + pg1.PeerAs = ygot.Uint32(localAs) + + bgpNbr := bgp.GetOrCreateNeighbor(bgpNbr3.ateIPv4) + bgpNbr.PeerGroup = ygot.String(peerGrpName) + bgpNbr.PeerAs = ygot.Uint32(localAs) + bgpNbr.Enabled = ygot.Bool(true) + bgpNbrT := bgpNbr.GetOrCreateTransport() + bgpNbrT.LocalAddress = ygot.String(bgpNbr3.dutIPv4) + af4 := bgpNbr.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST) + af4.Enabled = ygot.Bool(true) + af6 := bgpNbr.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST) + af6.Enabled = ygot.Bool(true) + + return niProto +} + +// configureOTGBGP configure BGP on ATE +func configureOTGBGP(t *testing.T, dev gosnappi.Device, top gosnappi.Config, nbr bgpNeighbor) { + t.Helper() + iDutBgp := dev.Bgp().SetRouterId(nbr.ateIPv4) + iDutBgp4Peer := iDutBgp.Ipv4Interfaces().Add().SetIpv4Name(nbr.Name + ".IPv4").Peers().Add().SetName(nbr.Name + ".BGP4.peer") + iDutBgp4Peer.SetPeerAddress(nbr.dutIPv4).SetAsNumber(asn).SetAsType(gosnappi.BgpV4PeerAsType.IBGP) + iDutBgp4Peer.LearnedInformationFilter().SetUnicastIpv4Prefix(true).SetUnicastIpv6Prefix(false) + + bgpNeti1Bgp4PeerRoutes := iDutBgp4Peer.V4Routes().Add().SetName(nbr.Name + ".BGP4.Route") + bgpNeti1Bgp4PeerRoutes.SetNextHopIpv4Address(nbr.ateIPv4). + SetNextHopAddressType(gosnappi.BgpV4RouteRangeNextHopAddressType.IPV4). + SetNextHopMode(gosnappi.BgpV4RouteRangeNextHopMode.MANUAL) + bgpNeti1Bgp4PeerRoutes.Addresses().Add().SetAddress(ipv4InnerDst).SetPrefix(32).SetCount(1) +} + +func configureOTG(t *testing.T, ate *ondatra.ATEDevice) gosnappi.Config { + t.Logf("configureOTG") + config := gosnappi.NewConfig() + var dev gosnappi.Device + for i, ap := range []bgpNeighbor{bgpNbr1, bgpNbr2, bgpNbr3} { + // DUT and ATE ports are connected by the same names. + port := config.Ports().Add().SetName(ap.Name) + portName := fmt.Sprintf("port%s", strconv.Itoa(i+1)) + dev = config.Devices().Add().SetName(portName) + eth := dev.Ethernets().Add().SetName(portName + ".Eth").SetMac(ap.MAC) + eth.Connection().SetPortName(port.Name()) + eth.Ipv4Addresses().Add().SetName(portName + ".IPv4"). + SetAddress(ap.ateIPv4).SetGateway(ap.dutIPv4). + SetPrefix(30) + } + configureOTGBGP(t, dev, config, bgpNbr3) + ate.OTG().PushConfig(t, config) + ate.OTG().StartProtocols(t) + return config +} + +// seqIDOffset returns sequence ID offset added with seqIDBase (10), to avoid sequences +// like 1, 10, 11, 12,..., 2, 21, 22, ... while being sent by Ondatra to the DUT. +// It now generates sequences like 11, 12, 13, ..., 19, 20, 21,..., 99. +func seqIDOffset(dut *ondatra.DUTDevice, i uint32) uint32 { + if deviations.PfRequireSequentialOrderPbrRules(dut) { + return i + seqIDBase + } + return i +} + +// configureNetworkInstance configures vrfs DECAP_TE_VRF,ENCAP_TE_VRF_A,ENCAP_TE_VRF_B, +// TE_VRF_222, TE_VRF_111. +func configNonDefaultNetworkInstance(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + c := &oc.Root{} + vrfs := []string{niTransitTeVrf, niEncapTeVrfA, niTEVRF111} + for _, vrf := range vrfs { + ni := c.GetOrCreateNetworkInstance(vrf) + ni.Type = oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_L3VRF + gnmi.Replace(t, dut, gnmi.OC().NetworkInstance(vrf).Config(), ni) + } + gnmi.Update(t, dut, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Name().Config(), deviations.DefaultNetworkInstance(dut)) +} + +func configureVrfSelectionPolicyC(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + d := &oc.Root{} + time.Sleep(100 * time.Second) + dutPolFwdPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).PolicyForwarding() + + pfRule1 := &policyFwRule{SeqID: 1, family: "ipv4", protocol: 4, sourceAddr: ipv4OuterSrc111WithMask, + ni: niTransitTeVrf} + pfRule2 := &policyFwRule{SeqID: 2, family: "ipv4", sourceAddr: ipv4OuterSrc111WithMask, + ni: niEncapTeVrfA} + + pfRuleList := []*policyFwRule{pfRule1, pfRule2} + ni := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + niP := ni.GetOrCreatePolicyForwarding() + niPf := niP.GetOrCreatePolicy(vrfPolC) + niPf.SetType(oc.Policy_Type_VRF_SELECTION_POLICY) + for _, pfRule := range pfRuleList { + pfR := niPf.GetOrCreateRule(seqIDOffset(dut, pfRule.SeqID)) + if pfRule.family == "ipv4" { + pfRProtoIP := pfR.GetOrCreateIpv4() + if pfRule.protocol != 0 { + pfRProtoIP.Protocol = oc.UnionUint8(pfRule.protocol) + } + if pfRule.sourceAddr != "" { + pfRProtoIP.SourceAddress = ygot.String(pfRule.sourceAddr) + } + } else if pfRule.family == "ipv6" { + pfRProtoIP := pfR.GetOrCreateIpv6() + if pfRule.dscpSet != nil { + pfRProtoIP.DscpSet = pfRule.dscpSet + } + } + + pfRAction := pfR.GetOrCreateAction() + pfRAction.NetworkInstance = ygot.String(pfRule.ni) + } + p1 := dut.Port(t, "port1") + interfaceID := p1.Name() + if deviations.InterfaceRefInterfaceIDFormat(dut) { + interfaceID = interfaceID + ".0" + } + intf := niP.GetOrCreateInterface(interfaceID) + intf.ApplyVrfSelectionPolicy = ygot.String(vrfPolC) + intf.GetOrCreateInterfaceRef().Interface = ygot.String(p1.Name()) + intf.GetOrCreateInterfaceRef().Subinterface = ygot.Uint32(0) + if deviations.InterfaceRefConfigUnsupported(dut) { + intf.InterfaceRef = nil + } + // gnmi.Update(t, dut, gnmi.OC().NetworkInstance("DEFAULT").Name().Config(), "DEFAULT") + gnmi.Replace(t, dut, dutPolFwdPath.Config(), niP) +} + +func configureGribiRoute(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + ctx := context.Background() + gribic := dut.RawAPIs().GRIBI(t) + client := fluent.NewClient() + client.Connection().WithStub(gribic).WithPersistence().WithInitialElectionID(12, 0). + WithRedundancyMode(fluent.ElectedPrimaryClient).WithFIBACK() + client.Start(ctx, t) + defer client.Stop(t) + gribi.FlushAll(client) + client.StartSending(ctx, t) + gribi.BecomeLeader(t, client) + + tcArgs := &testArgs{ + ctx: ctx, + client: client, + dut: dut, + } + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(1)).WithDecapsulateHeader(fluent.IPinIP). + WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(dut)), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(1)).AddNextHop(uint64(1), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niTransitTeVrf).WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix("0.0.0.0/0").WithNextHopGroup(uint64(1))) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 90*time.Second); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(2)).WithIPAddress(atePort2.IPv4), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(2)).AddNextHop(uint64(2), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niTransitTeVrf).WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix(ipv4OuterDst111+"/32").WithNextHopGroup(uint64(2))) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 90*time.Second); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + defaultVRFIPList := []string{"0.0.0.0/0", ipv4OuterDst111 + "/32"} + for ip := range defaultVRFIPList { + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation(defaultVRFIPList[ip]). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) + } + + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(3)).WithIPAddress(atePort2.IPv4), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(3)).AddNextHop(uint64(3), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niTEVRF111). + WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix(ipv4OuterDst111+"/32").WithNextHopGroup(uint64(3))) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 90*time.Second); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation(ipv4OuterDst111+"/32"). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) + // Encap + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(4)).WithEncapsulateHeader(fluent.IPinIP).WithIPinIP(ipv4OuterSrc111, ipv4OuterDst111). + WithNextHopNetworkInstance(niTEVRF111), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(4)).AddNextHop(uint64(4), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niEncapTeVrfA). + WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix(ipv4InnerDst+"/32").WithNextHopGroup(uint64(4))) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 90*time.Second); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + tcArgs.client.Modify().AddEntry(t, + fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithIndex(uint64(5)).WithIPAddress(atePort3.IPv4), + fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(tcArgs.dut)). + WithID(uint64(5)).AddNextHop(uint64(5), uint64(1)), + + fluent.IPv4Entry().WithNetworkInstance(niEncapTeVrfA). + WithNextHopGroupNetworkInstance(deviations.DefaultNetworkInstance(dut)). + WithPrefix("0.0.0.0/0").WithNextHopGroup(uint64(5))) + + if err := awaitTimeout(tcArgs.ctx, t, tcArgs.client, 90*time.Second); err != nil { + t.Logf("Could not program entries via client, got err, check error codes: %v", err) + } + + defaultVRFIPList = []string{"0.0.0.0/0", ipv4InnerDst + "/32"} + for ip := range defaultVRFIPList { + chk.HasResult(t, tcArgs.client.Results(t), + fluent.OperationResult(). + WithIPv4Operation(defaultVRFIPList[ip]). + WithOperationType(constants.Add). + WithProgrammingResult(fluent.InstalledInFIB). + AsResult(), + chk.IgnoreOperationID(), + ) + } + +} + +// awaitTimeout calls a fluent client Await, adding a timeout to the context. +func awaitTimeout(ctx context.Context, t testing.TB, c *fluent.GRIBIClient, timeout time.Duration) error { + t.Helper() + subctx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + return c.Await(subctx, t) +} + +func createFlow(flowValues *flowArgs, dstMac string) gosnappi.Flow { + flow := gosnappi.NewFlow().SetName(flowValues.flowName) + flow.Metrics().SetEnable(true) + flow.Size().SetFixed(512) + flow.Rate().SetPps(100) + flow.Duration().Continuous() + ethHeader := flow.Packet().Add().Ethernet() + ethHeader.Src().SetValue(atePort1.MAC) + ethHeader.Dst().SetValue(dstMac) + // Outer IP header + if flowValues.isIPInIP { + outerIPHdr := flow.Packet().Add().Ipv4() + outerIPHdr.Src().SetValue(flowValues.outHdrSrcIP) + outerIPHdr.Dst().SetValue(flowValues.outHdrDstIP) + innerIPHdr := flow.Packet().Add().Ipv4() + innerIPHdr.Src().SetValue(flowValues.InnHdrSrcIP) + innerIPHdr.Dst().SetValue(flowValues.InnHdrDstIP) + } else { + innerIPHdr := flow.Packet().Add().Ipv4() + innerIPHdr.Src().SetValue(flowValues.InnHdrSrcIP) + innerIPHdr.Dst().SetValue(flowValues.InnHdrDstIP) + } + return flow +} + +// testTraffic sends traffic flow for duration seconds and returns the +// number of packets sent out. +func sendTraffic(t *testing.T, args *testArgs, top gosnappi.Config, ate *ondatra.ATEDevice, flow gosnappi.Flow, duration int, port []string) { + t.Helper() + top.Flows().Clear() + + args.otgConfig.Captures().Clear() + args.otgConfig.Captures().Add().SetName("packetCapture"). + SetPortNames(port). + SetFormat(gosnappi.CaptureFormat.PCAP) + + flow.TxRx().Port().SetTxName("port1").SetRxNames([]string{"port2", "port3"}) + flow.Metrics().SetEnable(true) + top.Flows().Append(flow) + + ate.OTG().PushConfig(t, top) + time.Sleep(30 * time.Second) + ate.OTG().StartProtocols(t) + time.Sleep(30 * time.Second) + + cs := gosnappi.NewControlState() + cs.Port().Capture().SetState(gosnappi.StatePortCaptureState.START) + args.otg.SetControlState(t, cs) + + ate.OTG().StartTraffic(t) + time.Sleep(time.Duration(duration) * time.Second) + ate.OTG().StopTraffic(t) + + cs.Port().Capture().SetState(gosnappi.StatePortCaptureState.STOP) + args.otg.SetControlState(t, cs) + otgutils.LogFlowMetrics(t, ate.OTG(), top) + otgutils.LogPortMetrics(t, ate.OTG(), top) +} + +// verifyTrafficFlow verify the each flow on ATE +func verifyTrafficFlow(t *testing.T, ate *ondatra.ATEDevice, flow gosnappi.Flow) bool { + rxPkts := gnmi.Get(t, ate.OTG(), gnmi.OTG().Flow(flow.Name()).Counters().InPkts().State()) + txPkts := gnmi.Get(t, ate.OTG(), gnmi.OTG().Flow(flow.Name()).Counters().OutPkts().State()) + lostPkt := txPkts - rxPkts + if got := (lostPkt * 100 / txPkts); got >= tolerancePct { + return false + } + return true +} + +// verifyBgpTelemetry verifies BGP telemetry. +func verifyBgpTelemetry(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + t.Logf("Verifying BGP state.") + bgpPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() + + nbrPath := bgpPath.Neighbor(bgpNbr3.ateIPv4) + // Get BGP adjacency state. + t.Logf("Waiting for BGP neighbor to establish...") + var status *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState] + status, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool { + state, ok := val.Val() + return ok && state == oc.Bgp_Neighbor_SessionState_ESTABLISHED + }).Await(t) + if !ok { + fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State())) + t.Fatal("No BGP neighbor formed") + } + state, _ := status.Val() + t.Logf("BGP adjacency for %s: %v", bgpNbr3.ateIPv4, state) + if want := oc.Bgp_Neighbor_SessionState_ESTABLISHED; state != want { + t.Errorf("BGP peer %s status got %d, want %d", bgpNbr3.ateIPv4, state, want) + } +} + +func captureAndValidatePackets(t *testing.T, args *testArgs, packetVal *packetValidation) { + bytes := args.otg.GetCapture(t, gosnappi.NewCaptureRequest().SetPortName(packetVal.portName)) + f, err := os.CreateTemp("", "pcap") + if err != nil { + t.Fatalf("ERROR: Could not create temporary pcap file: %v\n", err) + } + if _, err := f.Write(bytes); err != nil { + t.Fatalf("ERROR: Could not write bytes to pcap file: %v\n", err) + } + f.Close() + handle, err := pcap.OpenOffline(f.Name()) + if err != nil { + log.Fatal(err) + } + defer handle.Close() + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + if packetVal.validateDecap { + validateTrafficDecap(t, packetSource) + } + if packetVal.validateNoDecap { + validateTrafficNonDecap(t, packetSource, packetVal.outDstIP[0], packetVal.inHdrIP) + } + if packetVal.validateEncap { + validateTrafficEncap(t, packetSource, packetVal.outDstIP, packetVal.inHdrIP) + } + args.otgConfig.Captures().Clear() + args.otg.PushConfig(t, args.otgConfig) + time.Sleep(30 * time.Second) +} + +func validateTrafficDecap(t *testing.T, packetSource *gopacket.PacketSource) { + t.Helper() + for packet := range packetSource.Packets() { + ipLayer := packet.Layer(layers.LayerTypeIPv4) + if ipLayer == nil { + continue + } + ipPacket, _ := ipLayer.(*layers.IPv4) + innerPacket := gopacket.NewPacket(ipPacket.Payload, ipPacket.NextLayerType(), gopacket.Default) + ipInnerLayer := innerPacket.Layer(layers.LayerTypeIPv4) + if ipInnerLayer != nil { + t.Errorf("Packets are not decapped, Inner IP header is not removed.") + } + } +} + +func validateTrafficNonDecap(t *testing.T, packetSource *gopacket.PacketSource, outDstIP, inHdrIP string) { + t.Helper() + t.Log("Validate traffic non decap routes") + var packetCheckCount uint32 = 1 + for packet := range packetSource.Packets() { + if packetCheckCount >= 5 { + break + } + ipLayer := packet.Layer(layers.LayerTypeIPv4) + if ipLayer == nil { + continue + } + ipPacket, _ := ipLayer.(*layers.IPv4) + innerPacket := gopacket.NewPacket(ipPacket.Payload, ipPacket.NextLayerType(), gopacket.Default) + ipInnerLayer := innerPacket.Layer(layers.LayerTypeIPv4) + if ipInnerLayer != nil { + if ipPacket.DstIP.String() != outDstIP { + t.Errorf("Negatice test for Decap failed. Traffic sent to route which does not match the decap route are decaped") + } + ipInnerPacket, _ := ipInnerLayer.(*layers.IPv4) + if ipInnerPacket.DstIP.String() != inHdrIP { + t.Errorf("Negatice test for Decap failed. Traffic sent to route which does not match the decap route are decaped") + } + t.Logf("Traffic for non decap routes passed.") + break + } + } +} + +func validateTrafficEncap(t *testing.T, packetSource *gopacket.PacketSource, outDstIP []string, innerIP string) { + t.Helper() + t.Log("Validate traffic non decap routes") + var packetCheckCount uint32 = 1 + for packet := range packetSource.Packets() { + if packetCheckCount >= 5 { + break + } + ipLayer := packet.Layer(layers.LayerTypeIPv4) + if ipLayer == nil { + continue + } + ipPacket, _ := ipLayer.(*layers.IPv4) + innerPacket := gopacket.NewPacket(ipPacket.Payload, ipPacket.NextLayerType(), gopacket.Default) + ipInnerLayer := innerPacket.Layer(layers.LayerTypeIPv4) + if ipInnerLayer != nil { + if len(outDstIP) == 2 { + if ipPacket.DstIP.String() != outDstIP[0] || ipPacket.DstIP.String() != outDstIP[1] { + t.Errorf("Packets are not encapsulated as expected") + } + } else { + if ipPacket.DstIP.String() != outDstIP[0] { + t.Errorf("Packets are not encapsulated as expected") + } + } + t.Logf("Traffic for encap routes passed.") + break + } + } +} diff --git a/feature/gribi/otg_tests/gribi_route_test/metadata.textproto b/feature/gribi/otg_tests/gribi_route_test/metadata.textproto new file mode 100644 index 00000000000..333a3e00ed4 --- /dev/null +++ b/feature/gribi/otg_tests/gribi_route_test/metadata.textproto @@ -0,0 +1,55 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "8beaac46-9b7b-49c4-9bde-62ad630aa6c7" +plan_id: "RT-14.2" +description: "GRIBI Route Test" +testbed: TESTBED_DUT_ATE_4LINKS + +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + gribi_mac_override_with_static_arp: true + interface_ref_interface_id_format: true + pf_require_match_default_rule: true + pf_require_sequential_order_pbr_rules: true + ttl_copy_unsupported: true + isis_single_topology_required: true + } +} +platform_exceptions: { + platform: { + vendor: NOKIA + } + deviations: { + explicit_port_speed: true + explicit_interface_in_default_vrf: true + aggregate_atomic_update: true + interface_enabled: true + missing_value_for_defaults: true + missing_isis_interface_afi_safi_enable: true + } +} + +platform_exceptions: { + platform: { + vendor: ARISTA + } + deviations: { + interface_enabled: true + default_network_instance: "default" + omit_l2_mtu: true + isis_instance_enabled_required: true + isis_interface_afi_unsupported: true + missing_isis_interface_afi_safi_enable: true + isis_require_same_l1_metric_with_l2_metric: true + route_policy_under_afi_unsupported: true + static_protocol_name: "STATIC" + aggregate_atomic_update: true + missing_value_for_defaults: true + max_ecmp_paths: true + explicit_interface_in_default_vrf: false + } +} From b760db5d5fd384ce773f73039dd41e6f9d874f10 Mon Sep 17 00:00:00 2001 From: Rohit Rattan Date: Tue, 1 Oct 2024 10:46:10 +0530 Subject: [PATCH 04/27] removing stale pr 1151 and updating readme (#3480) --- .../otg_tests/defaults_test/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/feature/networkinstance/otg_tests/defaults_test/README.md b/feature/networkinstance/otg_tests/defaults_test/README.md index 9e7da08764d..a5ac736175e 100644 --- a/feature/networkinstance/otg_tests/defaults_test/README.md +++ b/feature/networkinstance/otg_tests/defaults_test/README.md @@ -2,12 +2,21 @@ TODO(robshakir): fill in test plan from code already written. +## Description + +This test verifies that the IPv4 and IPv6 address families are enabled within a network instance by default. + +## Test Procedure + +* Configure an ATE with port1 connected to DUT port1, and port2 connected to DUT port2. +* Configure the DUT to have: + * these interfaces within the `DEFAULT` network instance and validate that traffic can be forwarded between ATE port1 and ATE port2. + * these interfaces within a non-default `L3VRF` and validate that traffic can be forwarded between ATE port1 and ATE port2. + ## OpenConfig Path and RPC Coverage The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -TODO(robshakir): fill in coverage from code already written. - ```yaml paths: rpcs: From 5f9d2a45abdef73cfcb3e5550f67734856b54912 Mon Sep 17 00:00:00 2001 From: Pramod Maurya Date: Tue, 1 Oct 2024 20:33:50 +0530 Subject: [PATCH 05/27] Add RT-7.2.3 - Update community set and validate (#3436) * Add RT-7.2.3 - Update community set and validate * specified valid and invalid community set --- .../otg_tests/community_test/README.md | 23 +++- .../community_test/community_test.go | 103 +++++++++++++----- 2 files changed, 99 insertions(+), 27 deletions(-) diff --git a/feature/bgp/policybase/otg_tests/community_test/README.md b/feature/bgp/policybase/otg_tests/community_test/README.md index a068367488f..f1911b3c359 100644 --- a/feature/bgp/policybase/otg_tests/community_test/README.md +++ b/feature/bgp/policybase/otg_tests/community_test/README.md @@ -54,6 +54,27 @@ BGP policy configuration for Community Sets * Verify traffic is received on ATE port 1 for accepted prefixes. * Verify traffic is not received on ATE port 1 for rejected prefixes. +* RT-7.2.3 - Update community set and validate + 1. Configure a community-set named `update_comm_set` with "100:1" as member. + + 2. Create a `policy-definition` named 'community-match' with the following `statements` + * statement[name='accept_update_comm_set']/ + * conditions/bgp-conditions/match-community-set/config/community-set = 'update_comm_set' + * conditions/bgp-conditions/match-community-set/config/match-set-options = INVERT + * actions/config/policy-result = ACCEPT_ROUTE + + 3. Send traffic from ATE port-2 to all prefix-sets. + * Verify traffic is received on ATE port 1 for accepted prefixes for all community set except "100:1". + * Verify traffic is not received on ATE port 1 for rejected prefixes for community set "100:1". + + 4. Update the community-set named `update_comm_set` with "200:2" as member. + + 5. Send traffic from ATE port-2 to all prefix-sets. + * Verify traffic is received on ATE port 1 for accepted prefixes for all community set except "200:1". + * Verify traffic is not received on ATE port 1 for rejected prefixes for community set "200:1". + + + ### Expected community matches | prefix-set | any_my_3_comms | all_3_comms | no_3_comms | any_my_regex_comms | @@ -155,4 +176,4 @@ rpcs: gnmi: gNMI.Set: gNMI.Subscribe: -``` \ No newline at end of file +``` diff --git a/feature/bgp/policybase/otg_tests/community_test/community_test.go b/feature/bgp/policybase/otg_tests/community_test/community_test.go index 3d545c83c8b..c5164592725 100644 --- a/feature/bgp/policybase/otg_tests/community_test/community_test.go +++ b/feature/bgp/policybase/otg_tests/community_test/community_test.go @@ -225,32 +225,7 @@ type testCase struct { } func TestCommunitySet(t *testing.T) { - bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil) - bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true) - - var communityMembers = [][][]int{ - { - {100, 1}, {200, 2}, {300, 3}, - }, - { - {100, 1}, {101, 1}, {200, 2}, - }, - { - {107, 1}, {108, 1}, {109, 1}, - }, - { - {400, 1}, {500, 1}, {600, 1}, - }, - } - - configureOTG(t, bs, prefixesV4, prefixesV6, communityMembers) - bs.PushAndStart(t) - - t.Log("Verify DUT BGP sessions up") - cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT) - t.Log("Verify OTG BGP sessions up") - cfgplugins.VerifyOTGBGPEstablished(t, bs.ATE) - + bs := testSetup(t) ipv4 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv4Addresses().Items()[0].Address() ipv6 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv6Addresses().Items()[0].Address() @@ -319,3 +294,79 @@ func TestCommunitySet(t *testing.T) { }) } } + +func testSetup(t *testing.T) *cfgplugins.BGPSession { + t.Helper() + + bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil) + bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true) + + var communityMembers = [][][]int{ + { + {100, 1}, {200, 2}, {300, 3}, + }, + { + {100, 1}, {101, 1}, {200, 2}, + }, + { + {107, 1}, {108, 1}, {109, 1}, + }, + { + {400, 1}, {500, 1}, {600, 1}, + }, + } + + configureOTG(t, bs, prefixesV4, prefixesV6, communityMembers) + bs.PushAndStart(t) + + t.Log("Verify DUT BGP sessions up") + cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT) + t.Log("Verify OTG BGP sessions up") + cfgplugins.VerifyOTGBGPEstablished(t, bs.ATE) + + return bs +} + +func TestCommunitySetUpdate(t *testing.T) { + bs := testSetup(t) + ipv4 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv4Addresses().Items()[0].Address() + ipv6 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv6Addresses().Items()[0].Address() + + commMatch := [3]string{"100:1"} + configureImportBGPPolicy(t, bs.DUT, ipv4, ipv6, "update_comm_set", commMatch, oc.BgpPolicy_MatchSetOptionsType_INVERT) + validateCommunitySetUpdateTraffic(t, bs) + + // change community match set + commMatch = [3]string{"200:2"} + configureImportBGPPolicy(t, bs.DUT, ipv4, ipv6, "update_comm_set", commMatch, oc.BgpPolicy_MatchSetOptionsType_INVERT) + validateCommunitySetUpdateTraffic(t, bs) +} + +func validateCommunitySetUpdateTraffic(t *testing.T, bs *cfgplugins.BGPSession) { + t.Helper() + + sleepTime := time.Duration(totalPackets/trafficPps) + 2 + bs.ATETop.Flows().Clear() + for index, prefixPairV4 := range prefixesV4 { + configureFlow(t, bs, prefixPairV4, "ipv4", index) + configureFlow(t, bs, prefixesV6[index], "ipv6", index) + } + bs.PushAndStartATE(t) + + // Verify BGP session after its reset with OTG push config & start + cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT) + + t.Logf("Starting traffic for IPv4 and v6") + bs.ATE.OTG().StartTraffic(t) + time.Sleep(sleepTime * time.Second) + bs.ATE.OTG().StopTraffic(t) + otgutils.LogFlowMetrics(t, bs.ATE.OTG(), bs.ATETop) + + testResults := [4]bool{false, false, true, true} + for index, prefixPairV4 := range prefixesV4 { + t.Logf("Validating traffic test for IPv4 prefixes: [%s, %s]. Expected Result: [%t]", prefixPairV4[0], prefixPairV4[1], testResults[index]) + verifyTraffic(t, bs.ATE, "ipv4", testResults[index], index) + t.Logf("Validating traffic test for IPv6 prefixes: [%s, %s]. Expected Result: [%t]", prefixesV6[index][0], prefixesV6[index][1], testResults[index]) + verifyTraffic(t, bs.ATE, "ipv6", testResults[index], index) + } +} From 89ca9a013e0d7d6a9e8d4aca4dd94375af546680 Mon Sep 17 00:00:00 2001 From: Pramod Maurya Date: Tue, 1 Oct 2024 22:33:28 +0530 Subject: [PATCH 06/27] moved tests from experimental to feature (#3469) * moved tests from experimental to feature --- .../gribi_ip4_entry/feature.textproto | 70 --- .../feature.textproto | 31 -- .../telemetry_port_speed/feature.textproto | 31 -- .../feature.textproto | 73 --- .../feature.textproto | 25 - .../aggregate_interfaces/feature.textproto | 94 ---- .../tests/breakout_configuration/README.md | 32 -- .../route_redistribution/feature.textproto | 86 ---- .../telemetry_only/feature.textproto | 459 ------------------ .../otg_tests/backup_nhg_action/README.md | 21 +- .../backup_nhg_action_test.go | 0 .../backup_nhg_action/metadata.textproto | 0 .../README.md | 0 .../backup_nhg_multiple_nh_pbf_test.go | 0 .../metadata.textproto | 0 .../backup_nhg_single_nh_test}/README.md | 27 +- .../backup_nhg_test.go | 0 .../metadata.textproto | 0 .../interface_loopback_aggregate/README.md | 0 .../interface_loopback_aggregate_test.go | 0 .../metadata.textproto | 0 .../otg_tests/my_station_mac_test/README.md | 0 .../my_station_mac_test/metadata.textproto | 0 .../my_station_mac_test.go | 0 .../tests/breakout_configuration/README.md | 41 ++ .../tests/optics_thresholds_test/README.md | 37 +- .../optics_thresholds_test/metadata.textproto | 0 .../optics_thresholds_test.go | 0 .../gnmi/benchmarking/internal/setup/setup.go | 0 .../README.md | 39 +- ...configuration_convergence_time_bgp_test.go | 2 +- ...onfiguration_convergence_time_isis_test.go | 2 +- .../metadata.textproto | 0 .../full_configuration_replace_test/README.md | 0 .../full_configuration_replace_test.go | 2 +- .../metadata.textproto | 0 .../system_generic_health_check/README.md | 0 .../metadata.textproto | 0 .../system_generic_health_check_test.go | 0 .../otg_tests/tunnel_acl_based_test/README.md | 18 +- .../tunnel_acl_based_test/metadata.textproto | 0 .../tun_acl_dscp_test.go | 0 .../README.md | 11 +- .../metadata.textproto | 0 ...rface_based_ipv6_gre_encapsulation_test.go | 0 .../README.md | 9 + 46 files changed, 133 insertions(+), 977 deletions(-) delete mode 100644 feature/experimental/basic_entries_installed_in_gribi/gribi_ip4_entry/feature.textproto delete mode 100644 feature/experimental/gnmi_service/benchmarking_drained_configuration_convergence_time/feature.textproto delete mode 100644 feature/experimental/gnmi_service/telemetry_port_speed/feature.textproto delete mode 100644 feature/experimental/hierarchical_gribi_entries/base_hierarchical_route_installation/feature.textproto delete mode 100644 feature/experimental/hierarchical_gribi_entries/traffic_balancing_according_to_weights/feature.textproto delete mode 100644 feature/experimental/lacp_and_base_interface/aggregate_interfaces/feature.textproto delete mode 100644 feature/experimental/platform/tests/breakout_configuration/README.md delete mode 100644 feature/experimental/route_redistribution/feature.textproto delete mode 100644 feature/experimental/telemetry_only/feature.textproto rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action/README.md (95%) rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action/backup_nhg_action_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action/metadata.textproto (100%) rename feature/gribi/otg_tests/{backup_ngp_multiple_nh_pbf_test => backup_nhg_multiple_nh_pbf_test}/README.md (100%) rename feature/gribi/otg_tests/{backup_ngp_multiple_nh_pbf_test => backup_nhg_multiple_nh_pbf_test}/backup_nhg_multiple_nh_pbf_test.go (100%) rename feature/gribi/otg_tests/{backup_ngp_multiple_nh_pbf_test => backup_nhg_multiple_nh_pbf_test}/metadata.textproto (100%) rename feature/{experimental/backup_nhg/otg_tests/backup_nhg_test => gribi/otg_tests/backup_nhg_single_nh_test}/README.md (82%) rename feature/{experimental/backup_nhg/otg_tests/backup_nhg_test => gribi/otg_tests/backup_nhg_single_nh_test}/backup_nhg_test.go (100%) rename feature/{experimental/backup_nhg/otg_tests/backup_nhg_test => gribi/otg_tests/backup_nhg_single_nh_test}/metadata.textproto (100%) rename feature/{experimental => }/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md (100%) rename feature/{experimental => }/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/interface_loopback_aggregate_test.go (100%) rename feature/{experimental => }/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/metadata.textproto (100%) rename feature/{experimental => }/interface/my_station_mac/otg_tests/my_station_mac_test/README.md (100%) rename feature/{experimental => }/interface/my_station_mac/otg_tests/my_station_mac_test/metadata.textproto (100%) rename feature/{experimental => }/interface/my_station_mac/otg_tests/my_station_mac_test/my_station_mac_test.go (100%) create mode 100644 feature/platform/tests/breakout_configuration/README.md rename feature/{experimental => }/platform/tests/optics_thresholds_test/README.md (52%) rename feature/{experimental => }/platform/tests/optics_thresholds_test/metadata.textproto (100%) rename feature/{experimental => }/platform/tests/optics_thresholds_test/optics_thresholds_test.go (100%) rename feature/{experimental => }/system/gnmi/benchmarking/internal/setup/setup.go (100%) rename feature/{experimental => }/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md (59%) rename feature/{experimental => }/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go (99%) rename feature/{experimental => }/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go (98%) rename feature/{experimental => }/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/metadata.textproto (100%) rename feature/{experimental => }/system/gnmi/benchmarking/tests/full_configuration_replace_test/README.md (100%) rename feature/{experimental => }/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go (97%) rename feature/{experimental => }/system/gnmi/benchmarking/tests/full_configuration_replace_test/metadata.textproto (100%) rename feature/{experimental => }/system/health/tests/system_generic_health_check/README.md (100%) rename feature/{experimental => }/system/health/tests/system_generic_health_check/metadata.textproto (100%) rename feature/{experimental => }/system/health/tests/system_generic_health_check/system_generic_health_check_test.go (100%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_acl_based_test/README.md (66%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto (100%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go (100%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md (94%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/metadata.textproto (100%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/tunnel_interface_based_ipv6_gre_encapsulation_test.go (100%) rename feature/{experimental => }/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md (98%) diff --git a/feature/experimental/basic_entries_installed_in_gribi/gribi_ip4_entry/feature.textproto b/feature/experimental/basic_entries_installed_in_gribi/gribi_ip4_entry/feature.textproto deleted file mode 100644 index 14e9565fdd7..00000000000 --- a/feature/experimental/basic_entries_installed_in_gribi/gribi_ip4_entry/feature.textproto +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_basic_entries_installed_in_gribi_gribi_ip4_entry" - version: 1 -} - -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/origin-protocol" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/id" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/interface" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/subinterface" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/ip-address" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/mac-address" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/decapsulate-header" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/counters/octets-forwarded" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/counters/packets-forwarded" -} diff --git a/feature/experimental/gnmi_service/benchmarking_drained_configuration_convergence_time/feature.textproto b/feature/experimental/gnmi_service/benchmarking_drained_configuration_convergence_time/feature.textproto deleted file mode 100644 index fc6bb224159..00000000000 --- a/feature/experimental/gnmi_service/benchmarking_drained_configuration_convergence_time/feature.textproto +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_gnmi_service_benchmarking_drained_configuration_convergence_time" - version: 1 -} - -config_path { - path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/config/set-med" -} -config_path { - path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/repeat-n" -} -config_path { - path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/asn" -} diff --git a/feature/experimental/gnmi_service/telemetry_port_speed/feature.textproto b/feature/experimental/gnmi_service/telemetry_port_speed/feature.textproto deleted file mode 100644 index f7a6d7df109..00000000000 --- a/feature/experimental/gnmi_service/telemetry_port_speed/feature.textproto +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_gnmi_service_telemetry_port_speed" - version: 1 -} - -telemetry_path { - path: "/interfaces/interface/state/oper-status" -} -telemetry_path { - path: "/interfaces/interface/ethernet/state/port-speed" -} -telemetry_path { - path: "/interfaces/interface/aggregation/state/lag-speed" -} diff --git a/feature/experimental/hierarchical_gribi_entries/base_hierarchical_route_installation/feature.textproto b/feature/experimental/hierarchical_gribi_entries/base_hierarchical_route_installation/feature.textproto deleted file mode 100644 index f4d10b21f31..00000000000 --- a/feature/experimental/hierarchical_gribi_entries/base_hierarchical_route_installation/feature.textproto +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_hierarchical_gribi_entries_base_hierarchical_route_installation" - version: 1 -} - -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/origin-protocol" -} -telemetry_path { - path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/id" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/interface" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/subinterface" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/index" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/ip-address" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/mac-address" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/backup-next-hop-group" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/color" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/origin-protocol" -} -telemetry_path { - path: "/network-instances/network-instance/afts/next-hops/next-hop/state/pushed-mpls-label-stack" -} diff --git a/feature/experimental/hierarchical_gribi_entries/traffic_balancing_according_to_weights/feature.textproto b/feature/experimental/hierarchical_gribi_entries/traffic_balancing_according_to_weights/feature.textproto deleted file mode 100644 index 2f8a1e24a06..00000000000 --- a/feature/experimental/hierarchical_gribi_entries/traffic_balancing_according_to_weights/feature.textproto +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_hierarchical_gribi_entries_traffic_balancing_according_to_weights" - version: 1 -} - -telemetry_path { - path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/weight" -} diff --git a/feature/experimental/lacp_and_base_interface/aggregate_interfaces/feature.textproto b/feature/experimental/lacp_and_base_interface/aggregate_interfaces/feature.textproto deleted file mode 100644 index b9f58a8ae68..00000000000 --- a/feature/experimental/lacp_and_base_interface/aggregate_interfaces/feature.textproto +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_lacp_and_base_interface_aggregate_interfaces" - version: 1 -} - -config_path { - path: "/interfaces/interface/ethernet/config/mac-address" -} -config_path { - path: "/interfaces/interface/ethernet/config/port-speed" -} -config_path { - path: "/interfaces/interface/ethernet/config/duplex-mode" -} -config_path { - path: "/interfaces/interface/ethernet/config/aggregate-id" -} -config_path { - path: "/interfaces/interface/aggregation/config/lag-type" -} -config_path { - path: "/interfaces/interface/aggregation/config/min-links" -} -config_path { - path: "/lacp/config/system-priority" -} -config_path { - path: "/lacp/interfaces/interface/config/name" -} -config_path { - path: "/lacp/interfaces/interface/config/interval" -} -config_path { - path: "/lacp/interfaces/interface/config/lacp-mode" -} -config_path { - path: "/lacp/interfaces/interface/config/system-id-mac" -} -config_path { - path: "/lacp/interfaces/interface/config/system-priority" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-in-pkts" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-errors" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-timeout-transitions" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-tx-errors" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-out-pkts" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/counters/lacp-rx-errors" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/oper-key" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/last-change" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/partner-id" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/system-id" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/port-num" -} -telemetry_path { - path: "/lacp/interfaces/interface/state/system-priority" -} diff --git a/feature/experimental/platform/tests/breakout_configuration/README.md b/feature/experimental/platform/tests/breakout_configuration/README.md deleted file mode 100644 index d70c053e362..00000000000 --- a/feature/experimental/platform/tests/breakout_configuration/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# PLT-1.1: Interface breakout Test - -## Summary - -Validate Interface breakout configuration. - -## Procedure - - -* This test is carried out for different breakout types -* Connect DUT with ATE to all interfaces in the breakout port -* Configure each interface with test IP addressing -* Verify correct interface state and speed reported -* Verify that DUT responds to ARP/ICMP on all tested interfaces - -## Config Parameter coverage - -* /components/component/port/breakout-mode/groups/group/index -* /components/component/port/breakout-mode/groups/group/config -* /components/component/port/breakout-mode/groups/group/config/index -* /components/component/port/breakout-mode/groups/group/config/num-breakouts -* /components/component/port/breakout-mode/groups/group/config/breakout-speed -* /components/component/port/breakout-mode/groups/group/config/num-physical-channels - - -## Telemetry Parameter coverage - * interfaces/interface/state - * interfaces/interface/ethernet/stateOutput power thresholds: - -## Minimum DUT Platform Requirement - -* Breakout types - 4x100G, 2x100G and 4x10G \ No newline at end of file diff --git a/feature/experimental/route_redistribution/feature.textproto b/feature/experimental/route_redistribution/feature.textproto deleted file mode 100644 index fa276b3ca6b..00000000000 --- a/feature/experimental/route_redistribution/feature.textproto +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_route_redistribution" - version: 1 -} - -# https://github.com/openconfig/public/blob/e9e3a82693d1f26c61d7fbf85b3b2d0418d4af9e/doc/network_instance_redistribution.md -# Protocol tables -config_path { - path: "/network-instances/network-instance/tables/table/config/protocol" -} -config_path { - path: "/network-instances/network-instance/tables/table/config/address-family" -} -telemetry_path { - path: "/network-instances/network-instance/tables/table/state/protocol" -} -telemetry_path { - path: "/network-instances/network-instance/tables/table/state/address-family" -} - - -# Table-connections -config_path { - path: "/network-instances/network-instance/table-connections/table-connection/config/src-protocol" -} -config_path { - path: "/network-instances/network-instance/table-connections/table-connection/config/dst-protocol" -} -config_path { - path: "/network-instances/network-instance/table-connections/table-connection/config/address-family" -} -config_path { - path: "/network-instances/network-instance/table-connections/table-connection/config/import-policy" -} -config_path { - path: "/network-instances/network-instance/table-connections/table-connection/config/default-import-policy" -} -telemetry_path { - path: "/network-instances/network-instance/table-connections/table-connection/state/src-protocol" -} -telemetry_path { - path: "/network-instances/network-instance/table-connections/table-connection/state/dst-protocol" -} -telemetry_path { - path: "/network-instances/network-instance/table-connections/table-connection/state/address-family" -} -telemetry_path { - path: "/network-instances/network-instance/table-connections/table-connection/state/import-policy" -} -telemetry_path { - path: "/network-instances/network-instance/table-connections/table-connection/state/default-import-policy" -} - - - -feature_profile_dependency { - name: "bgp" - version: 1 -} - -feature_profile_dependency { - name: "localaggregates" - version: 1 -} - -feature_profile_dependency { - name: "bgp_policybase" - version: 1 -} diff --git a/feature/experimental/telemetry_only/feature.textproto b/feature/experimental/telemetry_only/feature.textproto deleted file mode 100644 index 829203c9478..00000000000 --- a/feature/experimental/telemetry_only/feature.textproto +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_telemetry_only" - version: 1 -} - -# Fan -telemetry_path { - path: "/components/component/fan/state/speed" -} - -# Pipeline-counters lookup block -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/nexthop-memory" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/nexthop-memory-used" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/acl-memory-total-entries" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/acl-memory-used-entries" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/acl-memory-total-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/acl-memory-used-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/lookup-memory" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/lookup-block/state/lookup-memory-used" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/oversubscription" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/no-route" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/no-label" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/no-nexthop" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/invalid-packet" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/forwarding-policy" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/incorrect-software-state" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/rate-limit" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/lookup-block/state/fragment-total-drops" -} - -# Pipeline counters queueing block -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/in-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/out-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/queue-memory" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/queue-memory-used" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/loopback-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/queueing-block/state/loopback-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/queueing-block/state/oversubscription" -} - -# Pipeline counters fabric block -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/in-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/out-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/in-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/out-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/in-low-priority-cells" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/out-low-priority-cells" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/in-high-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/out-high-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/in-low-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/fabric-block/state/out-low-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/fabric-block/state/oversubscription" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/fabric-block/state/lost-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/fabric-block/state/out-high-priority" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/fabric-block/state/fabric-aggregate" -} - -# Pipeline counters host interface block -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/out-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/in-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/out-bytes" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/fragment-punt-pkts" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/in-high-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/out-high-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/in-low-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/packet/host-interface-block/state/out-low-priority-packets" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/oversubscription" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/rate-limit" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/in-high-priority" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/out-high-priority" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/in-low-priority" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/out-low-priority" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/fragment-punt" -} -telemetry_path { - path: "/components/component/integrated-circuit/pipeline-counters/drop/host-interface-block/state/host-aggregate" -} - - -# Port -telemetry_path { - path: "/components/component/port/breakout-mode/groups/group/state/breakout-speed" -} -telemetry_path { - path: "/components/component/port/breakout-mode/groups/group/state/index" -} -telemetry_path { - path: "/components/component/port/breakout-mode/groups/group/state/num-breakouts" -} -telemetry_path { - path: "/components/component/port/breakout-mode/groups/group/state/num-physical-channels" -} -config_path { - path: "/components/component/port/breakout-mode/groups/group/config/breakout-speed" -} -config_path { - path: "/components/component/port/breakout-mode/groups/group/config/index" -} -config_path { - path: "/components/component/port/breakout-mode/groups/group/config/num-breakouts" -} -config_path { - path: "/components/component/port/breakout-mode/groups/group/config/num-physical-channels" -} - -# Power supply -telemetry_path { - path: "/components/component/power-supply/state/input-current" -} -telemetry_path { - path: "/components/component/power-supply/state/output-current" -} -telemetry_path { - path: "/components/component/power-supply/state/output-voltage" -} - -# integrated circuit backplane -telemetry_path { - path: "/components/component/integrated-circuit/backplane-facing-capacity/state/total" -} -telemetry_path { - path: "/components/component/integrated-circuit/backplane-facing-capacity/state/consumed-capacity" -} -telemetry_path { - path: "/components/component/integrated-circuit/backplane-facing-capacity/state/available-pct" -} - -telemetry_path { - path: "/components/component/properties/property/state/value" -} -telemetry_path { - path: "/components/component/subcomponents/subcomponent/state/name" -} -telemetry_path { - path: "/components/component/state/description" -} -telemetry_path { - path: "/components/component/properties/property/state/value" -} -telemetry_path { - path: "/components/component/state/parent" -} -telemetry_path { - path: "/components/component/subcomponents/subcomponent/state/name" -} -telemetry_path { - path: "/components/component/integrated-circuit/state/node-id" -} -telemetry_path { - path: "/components/component/state/empty" -} -telemetry_path { - path: "/components/component/state/firmware-version" -} -telemetry_path { - path: "/components/component/state/hardware-version" -} -telemetry_path { - path: "/components/component/state/mfg-date" -} -telemetry_path { - path: "/components/component/state/mfg-name" -} -telemetry_path { - path: "/components/component/state/name" -} -telemetry_path { - path: "/components/component/state/oper-status" -} -telemetry_path { - path: "/components/component/state/parent" -} -telemetry_path { - path: "/components/component/state/part-no" -} -telemetry_path { - path: "/components/component/state/serial-no" -} -telemetry_path { - path: "/components/component/state/software-version" -} -telemetry_path { - path: "/components/component/state/temperature/instant" -} -telemetry_path { - path: "/components/component/state/type" -} -telemetry_path { - path: "/components/component/transceiver/physical-channels/channel/state/input-power/instant" -} -telemetry_path { - path: "/components/component/transceiver/physical-channels/channel/state/laser-bias-current/instant" -} -telemetry_path { - path: "/components/component/transceiver/physical-channels/channel/state/output-power/instant" -} -telemetry_path { - path: "/components/component/transceiver/state/form-factor" -} -telemetry_path { - path: "/interfaces/interface/aggregation/state/member" -} -telemetry_path { - path: "/interfaces/interface/ethernet/state/counters/in-maxsize-exceeded" -} -telemetry_path { - path: "/interfaces/interface/hold-time/state/down" -} -telemetry_path { - path: "/interfaces/interface/hold-time/state/up" -} -telemetry_path { - path: "/interfaces/interface/state/counters/carrier-transitions" -} -telemetry_path { - path: "/interfaces/interface/state/counters/in-discards" -} -telemetry_path { - path: "/interfaces/interface/state/counters/in-fcs-errors" -} -telemetry_path { - path: "/interfaces/interface/state/counters/in-pkts" -} -telemetry_path { - path: "/interfaces/interface/state/cpu" -} -telemetry_path { - path: "/interfaces/interface/state/hardware-port" -} -telemetry_path { - path: "/interfaces/interface/state/last-change" -} -telemetry_path { - path: "/interfaces/interface/state/management" -} -telemetry_path { - path: "/interfaces/interface/state/physical-channel" -} -telemetry_path { - path: "/interfaces/interface/state/transceiver" -} -telemetry_path { - path: "/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address/state/ip" -} -telemetry_path { - path: "/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address/state/prefix-length" -} -telemetry_path { - path: "/interfaces/interface/subinterfaces/subinterface/ipv6/addresses/address/state/ip" -} -telemetry_path { - path: "/interfaces/interface/subinterfaces/subinterface/ipv6/addresses/address/state/prefix-length" -} -telemetry_path { - path: "/interfaces/interface/subinterfaces/subinterface/state/index" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/activity" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/collecting" -} -telemetry_path { - path: "/lacp/interfaces/interface/members/member/state/distributing" -} -telemetry_path { - path: "/lacp/interfaces/interface/state/system-id-mac" -} -telemetry_path { - path: "/qos/interfaces/interface/output/queues/queue/state/dropped-pkts" -} -telemetry_path { - path: "/qos/interfaces/interface/output/queues/queue/state/name" -} -telemetry_path { - path: "/qos/interfaces/interface/output/queues/queue/state/transmit-octets" -} -telemetry_path { - path: "/qos/interfaces/interface/output/queues/queue/state/transmit-pkts" -} -telemetry_path { - path: "/qos/interfaces/interface/output/scheduler-policy/state/name" -} -telemetry_path { - path: "/system/alarms/alarm/state/id" -} -telemetry_path { - path: "/system/alarms/alarm/state/resource" -} -telemetry_path { - path: "/system/alarms/alarm/state/severity" -} -telemetry_path { - path: "/system/alarms/alarm/state/text" -} -telemetry_path { - path: "/system/alarms/alarm/state/time-created" -} -telemetry_path { - path: "/system/alarms/alarm/state/type-id" -} -telemetry_path { - path: "/system/cpus/cpu/state/total/avg" -} -telemetry_path { - path: "/system/memory/state/counters/correctable-ecc-errors" -} -telemetry_path { - path: "/system/memory/state/counters/uncorrectable-ecc-errors" -} -telemetry_path { - path: "/system/memory/state/free" -} -telemetry_path { - path: "/system/memory/state/physical" -} -telemetry_path { - path: "/system/memory/state/used" -} -telemetry_path { - path: "/system/processes/process/state/cpu-utilization" -} -telemetry_path { - path: "/system/processes/process/state/memory-usage" -} -telemetry_path { - path: "/system/processes/process/state/name" -} -telemetry_path { - path: "/system/processes/process/state/pid" -} -telemetry_path { - path: "/system/state/hostname" -} -config_path { - path: "/components/component/config/name" -} -config_path { - path: "/components/component/integrated-circuit/config/node-id" -} diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action/README.md b/feature/gribi/otg_tests/backup_nhg_action/README.md similarity index 95% rename from feature/experimental/gribi/otg_tests/backup_nhg_action/README.md rename to feature/gribi/otg_tests/backup_nhg_action/README.md index c500f4c352d..5a99843fca5 100644 --- a/feature/experimental/gribi/otg_tests/backup_nhg_action/README.md +++ b/feature/gribi/otg_tests/backup_nhg_action/README.md @@ -94,15 +94,18 @@ Different test scenarios requires different setups. traffic with decapsulated traffic with destination IP as `InnerDstIP_1` at ATE port-4. -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. - -## Protocol/RPC Parameter coverage +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action/backup_nhg_action_test.go b/feature/gribi/otg_tests/backup_nhg_action/backup_nhg_action_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/backup_nhg_action/backup_nhg_action_test.go rename to feature/gribi/otg_tests/backup_nhg_action/backup_nhg_action_test.go diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action/metadata.textproto b/feature/gribi/otg_tests/backup_nhg_action/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/backup_nhg_action/metadata.textproto rename to feature/gribi/otg_tests/backup_nhg_action/metadata.textproto diff --git a/feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/README.md b/feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/README.md similarity index 100% rename from feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/README.md rename to feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/README.md diff --git a/feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/backup_nhg_multiple_nh_pbf_test.go b/feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/backup_nhg_multiple_nh_pbf_test.go similarity index 100% rename from feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/backup_nhg_multiple_nh_pbf_test.go rename to feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/backup_nhg_multiple_nh_pbf_test.go diff --git a/feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/metadata.textproto b/feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/metadata.textproto similarity index 100% rename from feature/gribi/otg_tests/backup_ngp_multiple_nh_pbf_test/metadata.textproto rename to feature/gribi/otg_tests/backup_nhg_multiple_nh_pbf_test/metadata.textproto diff --git a/feature/experimental/backup_nhg/otg_tests/backup_nhg_test/README.md b/feature/gribi/otg_tests/backup_nhg_single_nh_test/README.md similarity index 82% rename from feature/experimental/backup_nhg/otg_tests/backup_nhg_test/README.md rename to feature/gribi/otg_tests/backup_nhg_single_nh_test/README.md index bf5f86fcab1..0d940b7de61 100644 --- a/feature/experimental/backup_nhg/otg_tests/backup_nhg_test/README.md +++ b/feature/gribi/otg_tests/backup_nhg_single_nh_test/README.md @@ -31,21 +31,18 @@ containing a single NH. * Interface DUT port-2 is disabled. * Remove the entry for 192.0.2.254/32. -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. - -## Protocol/RPC Parameter coverage - -* gRIBI - * Modify - * ModifyRequest - * NextHopGroup - * backup_nexthop_group +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/backup_nhg/otg_tests/backup_nhg_test/backup_nhg_test.go b/feature/gribi/otg_tests/backup_nhg_single_nh_test/backup_nhg_test.go similarity index 100% rename from feature/experimental/backup_nhg/otg_tests/backup_nhg_test/backup_nhg_test.go rename to feature/gribi/otg_tests/backup_nhg_single_nh_test/backup_nhg_test.go diff --git a/feature/experimental/backup_nhg/otg_tests/backup_nhg_test/metadata.textproto b/feature/gribi/otg_tests/backup_nhg_single_nh_test/metadata.textproto similarity index 100% rename from feature/experimental/backup_nhg/otg_tests/backup_nhg_test/metadata.textproto rename to feature/gribi/otg_tests/backup_nhg_single_nh_test/metadata.textproto diff --git a/feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md b/feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md similarity index 100% rename from feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md rename to feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md diff --git a/feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/interface_loopback_aggregate_test.go b/feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/interface_loopback_aggregate_test.go similarity index 100% rename from feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/interface_loopback_aggregate_test.go rename to feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/interface_loopback_aggregate_test.go diff --git a/feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/metadata.textproto b/feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/metadata.textproto similarity index 100% rename from feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/metadata.textproto rename to feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/metadata.textproto diff --git a/feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/README.md b/feature/interface/my_station_mac/otg_tests/my_station_mac_test/README.md similarity index 100% rename from feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/README.md rename to feature/interface/my_station_mac/otg_tests/my_station_mac_test/README.md diff --git a/feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/metadata.textproto b/feature/interface/my_station_mac/otg_tests/my_station_mac_test/metadata.textproto similarity index 100% rename from feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/metadata.textproto rename to feature/interface/my_station_mac/otg_tests/my_station_mac_test/metadata.textproto diff --git a/feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/my_station_mac_test.go b/feature/interface/my_station_mac/otg_tests/my_station_mac_test/my_station_mac_test.go similarity index 100% rename from feature/experimental/interface/my_station_mac/otg_tests/my_station_mac_test/my_station_mac_test.go rename to feature/interface/my_station_mac/otg_tests/my_station_mac_test/my_station_mac_test.go diff --git a/feature/platform/tests/breakout_configuration/README.md b/feature/platform/tests/breakout_configuration/README.md new file mode 100644 index 00000000000..1cccdf903c4 --- /dev/null +++ b/feature/platform/tests/breakout_configuration/README.md @@ -0,0 +1,41 @@ +# PLT-1.1: Interface breakout Test + +## Summary + +Validate Interface breakout configuration. + +## Procedure + + +* This test is carried out for different breakout types +* Connect DUT with ATE to all interfaces in the breakout port +* Configure each interface with test IP addressing +* Verify correct interface state and speed reported +* Verify that DUT responds to ARP/ICMP on all tested interfaces + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + /components/component/port/breakout-mode/groups/group/index: + platform_type: [ "PORT" ] + /components/component/port/breakout-mode/groups/group/config/index: + platform_type: [ "PORT" ] + /components/component/port/breakout-mode/groups/group/config/num-breakouts: + platform_type: [ "PORT" ] + /components/component/port/breakout-mode/groups/group/config/breakout-speed: + platform_type: [ "PORT" ] + /components/component/port/breakout-mode/groups/group/config/num-physical-channels: + platform_type: [ "PORT" ] +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` + +## Minimum DUT Platform Requirement + +* Breakout types - 4x100G, 2x100G and 4x10G diff --git a/feature/experimental/platform/tests/optics_thresholds_test/README.md b/feature/platform/tests/optics_thresholds_test/README.md similarity index 52% rename from feature/experimental/platform/tests/optics_thresholds_test/README.md rename to feature/platform/tests/optics_thresholds_test/README.md index 39f318faab4..9126d3eb914 100644 --- a/feature/experimental/platform/tests/optics_thresholds_test/README.md +++ b/feature/platform/tests/optics_thresholds_test/README.md @@ -8,7 +8,7 @@ Validate optics high and low thresholds for input power, output power, temperatu * Connect at least one optical ethernet interface to ATE. * Check all the transceivers with inslalled optcs. -* Validate that the following optics threshold telemetry paths exist for each optics. +* Validate that the optics threshold telemetry paths exist for each optics. * Output power thresholds: * /components/component/Ethernet/properties/property/laser-tx-power-low-alarm-threshold/state/value * /components/component/Ethernet/properties/property/laser-tx-power-high-alarm-threshold/state/value @@ -30,32 +30,17 @@ Validate optics high and low thresholds for input power, output power, temperatu * /components/component/Ethernet/properties/property/laser-bias-current-low-warn-threshold/state/value * /components/component/Ethernet/properties/property/laser-bias-current-high-warn-threshold/state/value - -## Config Parameter coverage +## OpenConfig Path and RPC Coverage -* None +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` -## Telemetry Parameter coverage - * Output power thresholds: - * /components/component/Ethernet/properties/property/laser-tx-power-low-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-tx-power-high-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-tx-power-low-warn-threshold/state/value - * /components/component/Ethernet/properties/property/laser-tx-power-high-warn-threshold/state/value - * Input power threshold: - * /components/component/Ethernet/properties/property/laser-rx-power-low-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-rx-power-high-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-rx-power-low-warn-threshold/state/value - * /components/component/Ethernet/properties/property/laser-rx-power-high-warn-threshold/state/value - * Optics temperature threshold: - * /components/component/Ethernet/properties/property/laser-temperature-low-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-temperature-high-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-temperature-low-warn-threshold/state/value - * /components/component/Ethernet/properties/property/laser-temperature-high-warn-threshold/state/value - * Optics bias-current threshold: - * /components/component/Ethernet/properties/property/laser-bias-current-low-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-bias-current-high-alarm-threshold/state/value - * /components/component/Ethernet/properties/property/laser-bias-current-low-warn-threshold/state/value - * /components/component/Ethernet/properties/property/laser-bias-current-high-warn-threshold/state/value - ## Notes: * The model for optics threshold paths is not finalized. We may need to update those paths after the model is finalized. diff --git a/feature/experimental/platform/tests/optics_thresholds_test/metadata.textproto b/feature/platform/tests/optics_thresholds_test/metadata.textproto similarity index 100% rename from feature/experimental/platform/tests/optics_thresholds_test/metadata.textproto rename to feature/platform/tests/optics_thresholds_test/metadata.textproto diff --git a/feature/experimental/platform/tests/optics_thresholds_test/optics_thresholds_test.go b/feature/platform/tests/optics_thresholds_test/optics_thresholds_test.go similarity index 100% rename from feature/experimental/platform/tests/optics_thresholds_test/optics_thresholds_test.go rename to feature/platform/tests/optics_thresholds_test/optics_thresholds_test.go diff --git a/feature/experimental/system/gnmi/benchmarking/internal/setup/setup.go b/feature/system/gnmi/benchmarking/internal/setup/setup.go similarity index 100% rename from feature/experimental/system/gnmi/benchmarking/internal/setup/setup.go rename to feature/system/gnmi/benchmarking/internal/setup/setup.go diff --git a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md similarity index 59% rename from feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md rename to feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md index 80b76298f1e..43312a43c90 100644 --- a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md +++ b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/README.md @@ -35,21 +35,24 @@ defined in the case): * Measure time between t=0 and all BGP received routes on ATE to report changed metric. -## Config Parameter coverage - - * BGP - * /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/config/set-med - * /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/repeat-n - * /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/as-number - - * ISIS - * /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric - * /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/state/set-bit - -## Telemetry Parameter coverage - - * ISIS - * /interfaces/interfaces/levels/level/adjacencies/adjacency/state/adjacency-state - * BGP - * /afi-safis/afi-safi/state/prefixes/sent - * /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config Parameter coverage + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/config/set-med: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/repeat-n: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/asn: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric: + /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/state/set-bit: + + ## Telemetry Parameter coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent: +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` diff --git a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go similarity index 99% rename from feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go rename to feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go index 3b12bc1d5e5..53bdf999d3f 100644 --- a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go +++ b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_bgp_test.go @@ -21,7 +21,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/openconfig/featureprofiles/feature/experimental/system/gnmi/benchmarking/internal/setup" + "github.com/openconfig/featureprofiles/feature/system/gnmi/benchmarking/internal/setup" "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/featureprofiles/internal/fptest" "github.com/openconfig/ondatra" diff --git a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go similarity index 98% rename from feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go rename to feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go index e8bf2d5cfd2..fbdbba61792 100644 --- a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go +++ b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/drained_configuration_convergence_time_isis_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "github.com/openconfig/featureprofiles/feature/experimental/system/gnmi/benchmarking/internal/setup" + "github.com/openconfig/featureprofiles/feature/system/gnmi/benchmarking/internal/setup" "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/ondatra" "github.com/openconfig/ondatra/gnmi" diff --git a/feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/metadata.textproto b/feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/metadata.textproto similarity index 100% rename from feature/experimental/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/metadata.textproto rename to feature/system/gnmi/benchmarking/otg_tests/drained_configuration_convergence_time/metadata.textproto diff --git a/feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/README.md b/feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/README.md similarity index 100% rename from feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/README.md rename to feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/README.md diff --git a/feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go b/feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go similarity index 97% rename from feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go rename to feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go index e07d56bb4aa..03d8878c59e 100644 --- a/feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go +++ b/feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/full_configuration_replace_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/openconfig/featureprofiles/feature/experimental/system/gnmi/benchmarking/internal/setup" + "github.com/openconfig/featureprofiles/feature/system/gnmi/benchmarking/internal/setup" "github.com/openconfig/featureprofiles/internal/args" "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/featureprofiles/internal/fptest" diff --git a/feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/metadata.textproto b/feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/metadata.textproto similarity index 100% rename from feature/experimental/system/gnmi/benchmarking/tests/full_configuration_replace_test/metadata.textproto rename to feature/system/gnmi/benchmarking/tests/full_configuration_replace_test/metadata.textproto diff --git a/feature/experimental/system/health/tests/system_generic_health_check/README.md b/feature/system/health/tests/system_generic_health_check/README.md similarity index 100% rename from feature/experimental/system/health/tests/system_generic_health_check/README.md rename to feature/system/health/tests/system_generic_health_check/README.md diff --git a/feature/experimental/system/health/tests/system_generic_health_check/metadata.textproto b/feature/system/health/tests/system_generic_health_check/metadata.textproto similarity index 100% rename from feature/experimental/system/health/tests/system_generic_health_check/metadata.textproto rename to feature/system/health/tests/system_generic_health_check/metadata.textproto diff --git a/feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go b/feature/system/health/tests/system_generic_health_check/system_generic_health_check_test.go similarity index 100% rename from feature/experimental/system/health/tests/system_generic_health_check/system_generic_health_check_test.go rename to feature/system/health/tests/system_generic_health_check/system_generic_health_check_test.go diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md b/feature/tunnel/otg_tests/tunnel_acl_based_test/README.md similarity index 66% rename from feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md rename to feature/tunnel/otg_tests/tunnel_acl_based_test/README.md index 073bc96cac8..f7f4769287a 100644 --- a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/README.md +++ b/feature/tunnel/otg_tests/tunnel_acl_based_test/README.md @@ -14,10 +14,20 @@ Verify the DSCP value of original packet header after GRE acl based tunnel encap * verify dscp value of original packet after encapsulation. * verify that no traffic drops in all flows. -## Config Parameter coverage - -* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-name -* /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-type +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/set-name: + /acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/config/type: +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Validation coverage diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto b/feature/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto similarity index 100% rename from feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto rename to feature/tunnel/otg_tests/tunnel_acl_based_test/metadata.textproto diff --git a/feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go b/feature/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go similarity index 100% rename from feature/experimental/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go rename to feature/tunnel/otg_tests/tunnel_acl_based_test/tun_acl_dscp_test.go diff --git a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md b/feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md similarity index 94% rename from feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md rename to feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md index 0bfc7dbe99f..076b0069e74 100644 --- a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md +++ b/feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/README.md @@ -71,4 +71,13 @@ Validate Interface based Ipv6 GRE Tunnel Config. - state/counters/out-forwarded-pkts - state/counters/out-forwarded-octets - state/counters/out-discarded-pkt - - Fragmentation and assembly counters Filter counters Output to display the traffic is spread across the different tunnel subnet ranges/NH groups/Interfaces \ No newline at end of file + - Fragmentation and assembly counters Filter counters Output to display the traffic is spread across the different tunnel subnet ranges/NH groups/Interfaces + +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/metadata.textproto b/feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/metadata.textproto similarity index 100% rename from feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/metadata.textproto rename to feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/metadata.textproto diff --git a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/tunnel_interface_based_ipv6_gre_encapsulation_test.go b/feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/tunnel_interface_based_ipv6_gre_encapsulation_test.go similarity index 100% rename from feature/experimental/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/tunnel_interface_based_ipv6_gre_encapsulation_test.go rename to feature/tunnel/otg_tests/tunnel_interface_based_ipv6_gre_encapsulation_test/tunnel_interface_based_ipv6_gre_encapsulation_test.go diff --git a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md b/feature/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md similarity index 98% rename from feature/experimental/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md rename to feature/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md index 1bdd0384ace..24925300655 100644 --- a/feature/experimental/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md +++ b/feature/tunnel/otg_tests/tunnel_interface_based_resize_test/README.md @@ -101,3 +101,12 @@ TODO: OpenConfig definition required for Tunnel protocol under interfaces/interf * state/counters/out-forwarded-pkts * state/counters/out-forwarded-octets * state/counters/out-discarded-pkts + +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` From 42c8ebdc98fc2dd2a77fd8b68ae124be6ef58add Mon Sep 17 00:00:00 2001 From: sachendras <44847441+sachendras@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:23:57 -0700 Subject: [PATCH 07/27] Update testregistry.textproto (#3475) Introducing new tests RT-3.3, RT3.31 and RT-3.32. These tests cover multiple VRFs and policy based routing used to switch traffic between VRFs, while GUE Decap and Encap is also happening. --- testregistry.textproto | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/testregistry.textproto b/testregistry.textproto index 533758476f2..13f6945e21a 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -741,6 +741,24 @@ test: { readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/policy/policy_vrf_selection/ate_tests/protocol_dscp_rules_for_vrf_selection_test/README.md" exec: " " } +test: { + id: "RT-3.3" + description: "Multiple VRFs and GUE DECAP in Default VRF" + readme: "" + exec: " " +} +test: { + id: "RT-3.31" + description: "DSCP based traffic steering from default VRF to non-Default VRF using Policy based VRF selection plus GUE DECAP" + readme: "" + exec: " " +} +test: { + id: "RT-3.32" + description: "DSCP based traffic steering from Non-default VRF to Default VRF using Policy based VRF selection plus GUE DECAP and ENCAP" + readme: "" + exec: " " +} test: { id: "RT-4.10" description: "AFTs Route Summary" From 25f6401f50d09e1e94ca354190bc4c9ccdada872 Mon Sep 17 00:00:00 2001 From: Caleb Geiger <48812321+ElodinLaarz@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:47:53 -0400 Subject: [PATCH 08/27] add gnmirpc to oc paths (#3463) * Add gnmirpc to oc paths to track per gnmi RPC options supported/required per path --- proto/ocpaths.proto | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/proto/ocpaths.proto b/proto/ocpaths.proto index 46f3bd41717..ea7d21e6d57 100644 --- a/proto/ocpaths.proto +++ b/proto/ocpaths.proto @@ -58,6 +58,10 @@ message OCPath { // A set of opaque tags that are used for this path. These tags can be used // to group paths according to use-case specific criteria. repeated string tags = 4; + + // GNMIRpc describes expected (or supported) behavior for a particular + // Openconfig path. + GNMIRpc gnmi_rpc = 5; } // OCPathConstraint enumerates platform_types that are required to be supported @@ -76,3 +80,39 @@ message OCPathConstraint { string platform_type = 1; } } + +// GNMIRpc describes expected (or supported) behavior for a particular +// Openconfig path. +message GNMIRpc { + bool get = 1; + bool set = 2; + bool subscribe = 3; + + // SubscribeMode, describes how updates are triggered for the request. + enum SubscribeMode { + UNSPECIFIED_SUBSCRIBE_MODE = 0; + NO_READ_SUPPORT = 1; // No requirement / support for path. + STREAM = 2; // Values streamed by the target (Sec. 3.5.1.5.2). + ONCE = 3; // Values sent once-off by the target (Sec. 3.5.1.5.1). + POLL = 4; // Values sent in response to a poll request (Sec. 3.5.1.5.3). + } + repeated SubscribeMode sub_mode = 4; + + // StreamMode is the mode of a streamed subscription, specifying how the + // target must return values for that subscription. + // Reference: gNMI Specification Section 3.5.1.3 + enum StreamMode { + UNSPECIFIED_STREAM_MODE = 0; + NO_STREAMING_SUPPORT = 1; // No requirement / support for streaming path. + TARGET_DEFINED = 2; // The target selects for each element. + ON_CHANGE = 3; // The target sends an update on element value change. + SAMPLE = 4; // The target samples values according to the interval. + } + repeated StreamMode stream_mode = 5; + + // If listed as part of a requirement, sample_interval_nanoseconds is the + // maximum allowable interval between updates. + // If listed as part of the description of level of support, it should be the + // smallest, recommended value. + uint64 sample_interval_nanoseconds = 6; +} From e0b5ce236069678f1750d8aa9e28c4f20af12dde Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Wed, 2 Oct 2024 19:54:33 -0700 Subject: [PATCH 09/27] Add alokmtri-g as codeowner for select features (#3489) * Add alokmtri-g as codeowner for select features * add acl * also add amrindrr for platform @amrindrr --- .github/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 70a8a814170..0ddfb1eacef 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,18 +11,23 @@ * @openconfig/featureprofiles-maintainers # /feature folders each have owners who are auto requested for review and may merge PR's +/feature/acl/ @alokmtri-g /feature/bgp/ @dplore +/feature/dhcp/ @alokmtri-g /feature/ethernet/ @ram-mac /feature/interface/ @ram-mac /feature/isis/ @rohit-rp +/feature/lldp/ @alokmtri-g /feature/mpls/ @swetha-haridasula /feature/mtu/ @swetha-haridasula /feature/networkinstance/ @swetha-haridasula +/feature/platform/ @amrindrr /feature/policy_forwarding/ @swetha-haridasula /feature/qos @sezhang2 /feature/routing_policy/ @swetha-haridasula /feature/security @mihirpitale-googler /feature/staticroute/ @swetha-haridasula +/feature/stp/ @alokmtri-g /feature/system @self-maurya /feature/vrrp @amrindrr From 43e38901ba2b908ed06815e4c65ad791f929c08c Mon Sep 17 00:00:00 2001 From: Karim Jahed Date: Thu, 3 Oct 2024 01:11:32 -0400 Subject: [PATCH 10/27] [gNMI-1.11, RT-5.1/3] - add InterfaceCountersUpdateDelayed deviation for CISCO (#2805) * wait for counters update * revert some changes * bug fix * go fmt * fix readme check * readme check change * restore gnmi-1.10 * restore gnmi-1.10 * remove /tmp * remove tmp path * fix readme * fix indentation * fix readme --------- Co-authored-by: arvbaska Co-authored-by: arvbaska1 <123760606+arvbaska1@users.noreply.github.com> --- .../metadata.textproto | 1 + ...elemetry_interface_packet_counters_test.go | 34 ++++++- .../otg_tests/balancing_test/README.md | 23 +++++ .../balancing_test/balancing_test.go | 24 +++++ .../balancing_test/metadata.textproto | 1 + .../otg_tests/singleton_test/README.md | 53 ++++++++++ .../singleton_test/metadata.textproto | 1 + .../singleton_test/singleton_test.go | 43 ++++++--- internal/deviations/deviations.go | 6 ++ proto/metadata.proto | 2 + proto/metadata_go_proto/metadata.pb.go | 96 +++++++++++-------- 11 files changed, 230 insertions(+), 54 deletions(-) diff --git a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/metadata.textproto b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/metadata.textproto index 693fd78a761..7eae9761928 100644 --- a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/metadata.textproto +++ b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/metadata.textproto @@ -13,6 +13,7 @@ platform_exceptions: { ipv4_missing_enabled: true interface_counters_from_container: true subinterface_packet_counters_missing: true + interface_counters_update_delayed: true } } platform_exceptions: { diff --git a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/telemetry_interface_packet_counters_test.go b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/telemetry_interface_packet_counters_test.go index cf9310999ee..9cc8591a9ab 100644 --- a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/telemetry_interface_packet_counters_test.go +++ b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/telemetry_interface_packet_counters_test.go @@ -244,6 +244,31 @@ func fetchInAndOutPkts(t *testing.T, dut *ondatra.DUTDevice, i1, i2 *interfaces. return inPkts, outPkts } +func waitForCountersUpdate(t *testing.T, dut *ondatra.DUTDevice, i1, i2 *interfaces.InterfacePath, + inTarget, outTarget uint64) (map[string]uint64, map[string]uint64) { + inWatcher := gnmi.Watch(t, dut, i1.Counters().InUnicastPkts().State(), time.Second*60, func(v *ygnmi.Value[uint64]) bool { + got, present := v.Val() + return present && got >= inTarget + }) + outWatcher := gnmi.Watch(t, dut, i2.Counters().OutUnicastPkts().State(), + time.Second*60, func(v *ygnmi.Value[uint64]) bool { + got, present := v.Val() + return present && got >= outTarget + }) + + inPktsV, ok := inWatcher.Await(t) + if !ok { + t.Fatalf("InPkts counter did not update in time") + } + outPktsV, ok := outWatcher.Await(t) + if !ok { + t.Fatalf("OutPkts counter did not update in time") + } + inPkts, _ := inPktsV.Val() + outPkts, _ := outPktsV.Val() + return map[string]uint64{"parent": inPkts}, map[string]uint64{"parent": outPkts} +} + func TestIntfCounterUpdate(t *testing.T) { dut := ondatra.DUT(t, "dut") dp1 := dut.Port(t, "port1") @@ -378,7 +403,14 @@ func TestIntfCounterUpdate(t *testing.T) { } } - dutInPktsAfterTraffic, dutOutPktsAfterTraffic := fetchInAndOutPkts(t, dut, i1, i2) + var dutInPktsAfterTraffic, dutOutPktsAfterTraffic map[string]uint64 + if deviations.InterfaceCountersUpdateDelayed(dut) { + dutInPktsAfterTraffic, dutOutPktsAfterTraffic = waitForCountersUpdate(t, dut, i1, i2, + dutInPktsBeforeTraffic["parent"]+ateInPkts["parent"], + dutOutPktsBeforeTraffic["parent"]+ateOutPkts["parent"]) + } else { + dutInPktsAfterTraffic, dutOutPktsAfterTraffic = fetchInAndOutPkts(t, dut, i1, i2) + } t.Logf("inPkts: %v and outPkts: %v after traffic: ", dutInPktsAfterTraffic, dutOutPktsAfterTraffic) for k := range dutInPktsAfterTraffic { diff --git a/feature/interface/aggregate/otg_tests/balancing_test/README.md b/feature/interface/aggregate/otg_tests/balancing_test/README.md index aceda7e25b6..d09453272e8 100644 --- a/feature/interface/aggregate/otg_tests/balancing_test/README.md +++ b/feature/interface/aggregate/otg_tests/balancing_test/README.md @@ -41,3 +41,26 @@ None ## Minimum DUT platform requirement vRX + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths and RPC intended to be covered by this test. + +```yaml +paths: + /interfaces/interface/ethernet/config/aggregate-id: + /interfaces/interface/aggregation/config/lag-type: + /lacp/config/system-priority: + /lacp/interfaces/interface/config/name: + /lacp/interfaces/interface/config/interval: + /lacp/interfaces/interface/config/lacp-mode: + /lacp/interfaces/interface/config/system-id-mac: + /lacp/interfaces/interface/config/system-priority: + +rpcs: + gnmi: + gNMI.Set: + union_replace: false + gNMI.Subscribe: + on_change: false +``` diff --git a/feature/interface/aggregate/otg_tests/balancing_test/balancing_test.go b/feature/interface/aggregate/otg_tests/balancing_test/balancing_test.go index 07b576adf29..0a84eef0ae2 100644 --- a/feature/interface/aggregate/otg_tests/balancing_test/balancing_test.go +++ b/feature/interface/aggregate/otg_tests/balancing_test/balancing_test.go @@ -569,6 +569,30 @@ func (tc *testCase) testFlow(t *testing.T, l3header string) { if pkts == 0 { t.Errorf("Flow sent packets: got %v, want non zero", pkts) } + + if deviations.InterfaceCountersUpdateDelayed(tc.dut) { + batch := gnmi.OCBatch() + for _, port := range tc.dutPorts[1:] { + batch.AddPaths(gnmi.OC().Interface(port.Name()).Counters()) + } + + _, ok := gnmi.Watch(t, tc.dut, batch.State(), time.Second*60, func(v *ygnmi.Value[*oc.Root]) bool { + got, present := v.Val() + if !present { + return false + } + totalPks := uint64(0) + for _, port := range tc.dutPorts[1:] { + totalPks += got.GetInterface(port.Name()).GetCounters().GetOutPkts() - beforeTrafficCounters[port.Name()].GetOutPkts() + } + return totalPks >= pkts + }).Await(t) + + if !ok { + t.Fatalf("Counters did not update in time") + } + } + afterTrafficCounters := tc.getCounters(t, "after") tc.verifyCounterDiff(t, beforeTrafficCounters, afterTrafficCounters) } diff --git a/feature/interface/aggregate/otg_tests/balancing_test/metadata.textproto b/feature/interface/aggregate/otg_tests/balancing_test/metadata.textproto index 68c8eb17c3a..f29298037aa 100644 --- a/feature/interface/aggregate/otg_tests/balancing_test/metadata.textproto +++ b/feature/interface/aggregate/otg_tests/balancing_test/metadata.textproto @@ -11,6 +11,7 @@ platform_exceptions: { } deviations: { ipv4_missing_enabled: true + interface_counters_update_delayed: true } } platform_exceptions: { diff --git a/feature/interface/singleton/otg_tests/singleton_test/README.md b/feature/interface/singleton/otg_tests/singleton_test/README.md index a80de7b2ef8..d8d218db6f9 100644 --- a/feature/interface/singleton/otg_tests/singleton_test/README.md +++ b/feature/interface/singleton/otg_tests/singleton_test/README.md @@ -169,3 +169,56 @@ a new testbed configuration with the desired port types. ## Minimum DUT Platform Requirement vRX + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths and RPC intended to be covered by this test. + +```yaml +paths: + /interfaces/interface/ethernet/state/counters/in-mac-pause-frames: + /interfaces/interface/ethernet/state/counters/out-mac-pause-frames: + /interfaces/interface/ethernet/state/mac-address: + /interfaces/interface/state/counters/in-broadcast-pkts: + /interfaces/interface/state/counters/in-discards: + /interfaces/interface/state/counters/in-errors: + /interfaces/interface/state/counters/in-multicast-pkts: + /interfaces/interface/state/counters/in-octets: + /interfaces/interface/state/counters/in-unicast-pkts: + /interfaces/interface/state/counters/in-unknown-protos: + /interfaces/interface/state/counters/out-broadcast-pkts: + /interfaces/interface/state/counters/out-discards: + /interfaces/interface/state/counters/out-errors: + /interfaces/interface/state/counters/out-multicast-pkts: + /interfaces/interface/state/counters/out-octets: + /interfaces/interface/state/counters/out-pkts: + /interfaces/interface/state/counters/out-unicast-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv4/state/mtu: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/mtu: + /interfaces/interface/state/oper-status: + /interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address/ip: + /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/in-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/out-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/addresses/address/ip: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/in-discarded-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/in-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-discarded-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-pkts: + /interfaces/interface/ethernet/state/aggregate-id: + /interfaces/interface/ethernet/state/port-speed: + /interfaces/interface/state/admin-status: + /interfaces/interface/state/description: + /interfaces/interface/state/type: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-forwarded-pkts: + /interfaces/interface/state/hardware-port: + /interfaces/interface/state/id: + /interfaces/interface/state/counters/in-fcs-errors: + /interfaces/interface/state/counters/carrier-transitions: + +rpcs: + gnmi: + gNMI.Set: + union_replace: false + gNMI.Subscribe: + on_change: false +``` diff --git a/feature/interface/singleton/otg_tests/singleton_test/metadata.textproto b/feature/interface/singleton/otg_tests/singleton_test/metadata.textproto index 76237f19190..926a5a3d560 100644 --- a/feature/interface/singleton/otg_tests/singleton_test/metadata.textproto +++ b/feature/interface/singleton/otg_tests/singleton_test/metadata.textproto @@ -12,6 +12,7 @@ platform_exceptions: { deviations: { ip_neighbor_missing: true ipv4_missing_enabled: true + interface_counters_update_delayed: true } } platform_exceptions: { diff --git a/feature/interface/singleton/otg_tests/singleton_test/singleton_test.go b/feature/interface/singleton/otg_tests/singleton_test/singleton_test.go index 4b38868f6ee..ffe41e929ff 100644 --- a/feature/interface/singleton/otg_tests/singleton_test/singleton_test.go +++ b/feature/interface/singleton/otg_tests/singleton_test/singleton_test.go @@ -30,6 +30,7 @@ import ( "github.com/openconfig/ondatra" "github.com/openconfig/ondatra/gnmi" "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ygnmi/ygnmi" "github.com/openconfig/ygot/ygot" otgtelemetry "github.com/openconfig/ondatra/gnmi/otg" @@ -430,6 +431,36 @@ func (tc *testCase) testFlow(t *testing.T, packetSize uint16, configIPHeader otg t.Logf("ap1 out-octets %d -> ap2 in-octets %d", aicp1.GetCounters().GetOutOctets(), aicp2.GetCounters().GetInOctets()) } + // Flow counters + otgutils.LogFlowMetrics(t, tc.ate.OTG(), tc.top) + fp := gnmi.Get(t, tc.ate.OTG(), gnmi.OTG().Flow(flow.Name()).State()) + fpc := fp.GetCounters() + + // Pragmatic check on the average in and out packet sizes. IPv4 may + // fragment the packet unless DF bit is set. IPv6 never fragments. + // Under no circumstances should DUT send packets greater than MTU. + + octets := fpc.GetOutOctets() + ateOutPkts := fpc.GetOutPkts() + ateInPkts := fpc.GetInPkts() + + if deviations.InterfaceCountersUpdateDelayed(tc.dut) { + batch := gnmi.OCBatch() + batch.AddPaths( + gnmi.OC().Interface(p1.Name()).Counters(), + gnmi.OC().Interface(p2.Name()).Counters(), + ) + gnmi.Watch(t, tc.dut, batch.State(), time.Second*60, func(v *ygnmi.Value[*oc.Root]) bool { + got, present := v.Val() + if !present { + return false + } + diffP1 := diffCounters(p1InBefore, inCounters(got.GetInterface(p1.Name()).GetCounters())) + diffP2 := diffCounters(p2OutBefore, outCounters(got.GetInterface(p2.Name()).GetCounters())) + return (diffP1.unicast+diffP1.drop >= ateOutPkts) && (diffP2.unicast >= ateInPkts-diffP2.drop) + }).Await(t) + } + // After Traffic Unicast, Multicast, Broadcast Counter p1InAfter := inCounters(gnmi.Get(t, tc.dut, p1Counter.State())) p2OutAfter := outCounters(gnmi.Get(t, tc.dut, p2Counter.State())) @@ -449,18 +480,6 @@ func (tc *testCase) testFlow(t *testing.T, packetSize uint16, configIPHeader otg t.Errorf("Large number of outbound Broadcast packets %d, want <= 100)", p2OutDiff.broadcast) } - // Flow counters - otgutils.LogFlowMetrics(t, tc.ate.OTG(), tc.top) - fp := gnmi.Get(t, tc.ate.OTG(), gnmi.OTG().Flow(flow.Name()).State()) - fpc := fp.GetCounters() - - // Pragmatic check on the average in and out packet sizes. IPv4 may - // fragment the packet unless DF bit is set. IPv6 never fragments. - // Under no circumstances should DUT send packets greater than MTU. - - octets := fpc.GetOutOctets() - ateOutPkts := fpc.GetOutPkts() - ateInPkts := fpc.GetInPkts() if ateOutPkts == 0 { t.Error("Flow did not send any packet") } else if avg := octets / ateOutPkts; avg > uint64(tc.mtu) { diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index 3e2a221ac20..16757a9ef72 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -1151,6 +1151,12 @@ func ComponentMfgDateUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetComponentMfgDateUnsupported() } +// InterfaceCountersUpdateDelayed returns true if telemetry for interface counters +// does not return the latest counter values. +func InterfaceCountersUpdateDelayed(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetInterfaceCountersUpdateDelayed() +} + // OTNChannelTribUnsupported returns true if TRIB parameter is unsupported under OTN channel configuration func OTNChannelTribUnsupported(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetOtnChannelTribUnsupported() diff --git a/proto/metadata.proto b/proto/metadata.proto index 9d5973aaa2e..bc6bd7fb913 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -621,6 +621,8 @@ message Metadata { bool eth_channel_ingress_parameters_unsupported = 222; // Cisco numbering for eth channel assignment starts from 1 instead of 0 bool eth_channel_assignment_cisco_numbering = 223; + // Devices needs time to update interface counters. + bool interface_counters_update_delayed = 224; // Reserved field numbers and identifiers. reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173; } diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 2472d35b23b..139b2058c16 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.34.2 -// protoc v5.28.0 +// protoc v5.27.1 // source: metadata.proto package metadata_go_proto @@ -903,6 +903,8 @@ type Metadata_Deviations struct { EthChannelIngressParametersUnsupported bool `protobuf:"varint,222,opt,name=eth_channel_ingress_parameters_unsupported,json=ethChannelIngressParametersUnsupported,proto3" json:"eth_channel_ingress_parameters_unsupported,omitempty"` // Cisco numbering for eth channel assignment starts from 1 instead of 0 EthChannelAssignmentCiscoNumbering bool `protobuf:"varint,223,opt,name=eth_channel_assignment_cisco_numbering,json=ethChannelAssignmentCiscoNumbering,proto3" json:"eth_channel_assignment_cisco_numbering,omitempty"` + // Devices needs time to update interface counters. + InterfaceCountersUpdateDelayed bool `protobuf:"varint,224,opt,name=interface_counters_update_delayed,json=interfaceCountersUpdateDelayed,proto3" json:"interface_counters_update_delayed,omitempty"` } func (x *Metadata_Deviations) Reset() { @@ -2351,6 +2353,13 @@ func (x *Metadata_Deviations) GetEthChannelAssignmentCiscoNumbering() bool { return false } +func (x *Metadata_Deviations) GetInterfaceCountersUpdateDelayed() bool { + if x != nil { + return x.InterfaceCountersUpdateDelayed + } + return false +} + type Metadata_PlatformExceptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2414,7 +2423,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x7d, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x7e, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -2448,7 +2457,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xb9, 0x75, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x85, 0x76, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, @@ -3383,45 +3392,50 @@ var file_metadata_proto_rawDesc = []byte{ 0x62, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xdf, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x65, 0x74, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x69, 0x73, 0x63, 0x6f, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x6e, - 0x67, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, - 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x4a, - 0x04, 0x08, 0x61, 0x10, 0x62, 0x4a, 0x04, 0x08, 0x37, 0x10, 0x38, 0x4a, 0x04, 0x08, 0x59, 0x10, - 0x5a, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x24, 0x10, 0x25, 0x4a, 0x04, 0x08, - 0x23, 0x10, 0x24, 0x4a, 0x04, 0x08, 0x28, 0x10, 0x29, 0x4a, 0x06, 0x08, 0xad, 0x01, 0x10, 0xae, - 0x01, 0x1a, 0xa0, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, - 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, - 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, - 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, - 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, - 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, - 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, - 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, - 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, - 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, - 0x45, 0x5f, 0x39, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, - 0x0a, 0x1a, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, - 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x12, 0x1a, + 0x67, 0x12, 0x4a, 0x0a, 0x21, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x64, + 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0xe0, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x4a, 0x04, 0x08, + 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, + 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x4a, 0x04, 0x08, 0x61, 0x10, + 0x62, 0x4a, 0x04, 0x08, 0x37, 0x10, 0x38, 0x4a, 0x04, 0x08, 0x59, 0x10, 0x5a, 0x4a, 0x04, 0x08, + 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x24, 0x10, 0x25, 0x4a, 0x04, 0x08, 0x23, 0x10, 0x24, 0x4a, + 0x04, 0x08, 0x28, 0x10, 0x29, 0x4a, 0x06, 0x08, 0xad, 0x01, 0x10, 0xae, 0x01, 0x1a, 0xa0, 0x01, + 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xfa, 0x01, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x62, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x13, + 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, + 0x5f, 0x44, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, + 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, + 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, + 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, - 0x45, 0x5f, 0x38, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x45, - 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x30, 0x30, 0x5a, 0x52, 0x10, - 0x08, 0x22, 0x6d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, - 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x5f, 0x34, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x39, 0x4c, + 0x49, 0x4e, 0x4b, 0x53, 0x5f, 0x4c, 0x41, 0x47, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, + 0x45, 0x5f, 0x32, 0x4c, 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x45, + 0x53, 0x54, 0x42, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x41, 0x54, 0x45, 0x5f, 0x38, 0x4c, + 0x49, 0x4e, 0x4b, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x45, 0x53, 0x54, 0x42, 0x45, + 0x44, 0x5f, 0x44, 0x55, 0x54, 0x5f, 0x34, 0x30, 0x30, 0x5a, 0x52, 0x10, 0x08, 0x22, 0x6d, 0x0a, + 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x41, 0x47, 0x53, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x01, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x43, 0x45, + 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x41, 0x47, 0x53, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, + 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10, 0x04, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( From 9743a568823d7a78797809b53bf9f752a97e309a Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 7 Oct 2024 22:02:22 -0700 Subject: [PATCH 11/27] Add sudhinj as codeowner for aft and sampling (#3500) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0ddfb1eacef..f4204382bcc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,6 +12,7 @@ # /feature folders each have owners who are auto requested for review and may merge PR's /feature/acl/ @alokmtri-g +/feature/aft/ @sudhinj /feature/bgp/ @dplore /feature/dhcp/ @alokmtri-g /feature/ethernet/ @ram-mac @@ -25,6 +26,7 @@ /feature/policy_forwarding/ @swetha-haridasula /feature/qos @sezhang2 /feature/routing_policy/ @swetha-haridasula +/feature/sampling/ @sudhinj /feature/security @mihirpitale-googler /feature/staticroute/ @swetha-haridasula /feature/stp/ @alokmtri-g From 9bf506f64578e39a185c4f0cb7386c453e1c3942 Mon Sep 17 00:00:00 2001 From: Mohana Date: Mon, 7 Oct 2024 23:04:28 -0700 Subject: [PATCH 12/27] Added mandatory instance-type config for default network-instance (#3497) Co-authored-by: KandukuriSudheer --- feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go b/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go index 2038b0e1899..b981ef03f55 100644 --- a/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go +++ b/feature/gribi/otg_tests/gribi_route_test/gribi_route_test.go @@ -227,6 +227,7 @@ func TestGRIBIFailover(t *testing.T) { // configureDUT configures port1-3 on the DUT. func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { + fptest.ConfigureDefaultNetworkInstance(t, dut) t.Logf("configureDUT") p1 := dut.Port(t, "port1") p2 := dut.Port(t, "port2") From bd96dd57b49037f27414b19522a89277c1d303e2 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Tue, 8 Oct 2024 20:29:07 -0700 Subject: [PATCH 13/27] Add TE-16.3 to test registry and fix descriptions (#3502) --- testregistry.textproto | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testregistry.textproto b/testregistry.textproto index 13f6945e21a..5711ed23b9f 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -1003,13 +1003,19 @@ test: { } test: { id: "TE-16.1" + description: "gRIBI Traffic Engineering - Basic encapsulation tests" readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/basic_encap_test/README.md" } test: { id: "TE-16.2" - description: "gRIBI encapsulation FRR scenarios" + description: "gRIBI Traffic Engineering encapsulation FRR scenarios" readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/encap_frr/README.md" } +test: { + id: "TE-16.3" + description: "gRIBI Traffic Engineering Encapsulation with Re-encap NI FRR scenarios" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/encap_frr_with_reencap_vrf_test/README.md" +} test: { id: "TE-17.1" readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md" From 2d9dd52f54483a6e839de2bf1e0e72deec01e014 Mon Sep 17 00:00:00 2001 From: Pramod Maurya Date: Wed, 9 Oct 2024 10:01:44 +0530 Subject: [PATCH 14/27] move tests from experimental to feature dir (#3488) * move tests from experimental to feature dir * removed experimental dir references * removed experimental dir references in contributing.md --- .github/workflows/readme_oc_path_and_rpc.yml | 2 +- .gitignore | 1 + CONTRIBUTING.md | 4 - .../bgp_long_lived_graceful_restart/README.md | 0 .../bgp_long_lived_graceful_restart_test.go | 0 .../metadata.textproto | 0 .../base_bgp_session_parameters/README.md | 63 +- .../base_bgp_session_parameters_test.go | 0 .../metadata.textproto | 0 .../otg_tests/bgp_2byte_4byte_asn/README.md | 0 .../bgp_2byte_4byte_asn_test.go | 0 .../bgp_2byte_4byte_asn/metadata.textproto | 0 .../bgp_2byte_4byte_asn_policy_test/README.md | 0 .../bgp_2byte_4byte_asn_policy_test.go | 0 .../metadata.textproto | 0 .../otg_tests/bgp_afi_safi_defaults/README.md | 0 .../bgp_afi_safi_defaults_test.go | 0 .../bgp_afi_safi_defaults/metadata.textproto | 0 .../bgp_always_compare_med/README.md | 30 +- .../bgp_always_compare_med_test.go | 0 .../bgp_always_compare_med/metadata.textproto | 0 .../README.md | 0 .../otg_tests/bgp_remove_private_as/README.md | 25 +- .../bgp_remove_private_as_test.go | 0 .../bgp_remove_private_as/metadata.textproto | 0 .../otg_tests/bgp_tcp_mss_path_mtu/README.md | 29 +- .../bgp_tcp_mss_path_mtu_test.go | 0 .../bgp_tcp_mss_path_mtu/metadata.textproto | 0 .../otg_tests/link_bandwidth_test/README.md | 0 .../link_bandwidth_test.go | 0 .../link_bandwidth_test/metadata.textproto | 0 .../isis/ate_tests/internal/session/attrs.go | 124 --- .../ate_tests/internal/session/session.go | 338 -------- .../README.md | 99 --- .../README.md | 102 --- .../README.md | 101 --- .../policy/policy_base/feature.textproto | 208 ----- .../policy_vrf_selection/feature.textproto | 45 - .../replay/tests/presession_test/README.md | 6 - .../otg_tests/backup_nhg_action_pbf/README.md | 0 .../backup_nhg_action_pbf_test.go | 0 .../backup_nhg_action_pbf/metadata.textproto | 0 .../otg_tests/dut_daemon_failure/README.md | 0 .../dut_daemon_failure_test.go | 0 .../dut_daemon_failure/metadata.textproto | 0 .../README.md | 0 .../fib_failed_due_to_hw_res_exhaust_test.go | 0 .../metadata.textproto | 0 .../README.md | 0 .../metadata.textproto | 0 .../route_addition_during_failover_test.go | 0 .../README.md | 0 .../metadata.textproto | 0 .../route_removal_during_failover_test.go | 0 .../otg_tests/vrf_policy_driven_te/README.md | 0 .../vrf_policy_driven_te/metadata.textproto | 0 .../vrf_policy_driven_te_test.go | 0 feature/gribi/vrf_policy_driven_te/README.md | 819 ------------------ .../otg_tests/base_adjacencies_test/README.md | 0 .../base_adjacencies_test.go | 0 .../base_adjacencies_test/metadata.textproto | 0 .../isis_change_lsp_lifetime_test/README.md | 35 +- .../isis_change_lsp_lifetime_test.go | 0 .../metadata.textproto | 0 .../isis/otg_tests/isis_drain_test/README.md | 16 +- .../isis_drain_test/isis_drain_test.go | 0 .../isis_drain_test/metadata.textproto | 0 .../README.md | 92 ++ ...sis_interface_hello_padding_enable_test.go | 0 .../metadata.textproto | 0 .../README.md | 95 ++ .../isis_interface_level_passive_test.go | 0 .../metadata.textproto | 0 .../isis_interface_passive_test/README.md | 2 +- .../isis_interface_passive_test.go | 0 .../metadata.textproto | 0 .../README.md | 0 .../isis_metric_style_wide_enabled_test.go | 0 .../metadata.textproto | 0 .../README.md | 94 ++ ...isis_metric_style_wide_not_enabled_test.go | 0 .../metadata.textproto | 0 .../isis/otg_tests/lsp_updates_test/README.md | 35 +- .../lsp_updates_test/lsp_updates_test.go | 0 .../lsp_updates_test/metadata.textproto | 0 feature/{experimental => }/p4rt/README.md | 8 +- .../p4rt/otg_tests/base_p4rt/README.md | 27 +- .../otg_tests/base_p4rt/base_p4rt_test.go | 0 .../otg_tests/base_p4rt/metadata.textproto | 0 .../README.md | 15 +- ...google_discovery_protocol_packetin_test.go | 0 .../metadata.textproto | 0 .../README.md | 0 ...e_discovery_protocol_packetout_lag_test.go | 0 .../metadata.textproto | 0 .../README.md | 17 +- ...oogle_discovery_protocol_packetout_test.go | 0 .../metadata.textproto | 0 .../otg_tests/lldp_packetin_test/README.md | 17 +- .../lldp_packetin_test/lldp_packetin_test.go | 0 .../lldp_packetin_test/metadata.textproto | 0 .../otg_tests/lldp_packetout_test/README.md | 20 +- .../lldp_packetout_test.go | 0 .../lldp_packetout_test/metadata.textproto | 0 .../p4rt/otg_tests/performance_test/README.md | 31 +- .../performance_test/metadata.textproto | 0 .../performance_test/performance_test.go | 0 .../traceroute_packetin_test/README.md | 28 +- .../metadata.textproto | 0 .../traceroute_packetin_test/packetin_test.go | 0 .../traceroute_packetin_test.go | 0 .../README.md | 2 +- .../metadata.textproto | 0 .../packetin_test.go | 0 .../traceroute_packetin_test.go | 0 ...eroute_packetin_with_vrf_selection_test.go | 0 .../traceroute_packetout_test/README.md | 0 .../metadata.textproto | 0 .../packetout_test.go | 0 .../traceroute_packetout_test.go | 0 .../tests/metadata_validation_test/README.md | 13 + .../metadata.textproto | 0 .../metadata_validation_test.go | 0 .../p4rt/tests/p4rt_election/README.md | 13 + .../tests/p4rt_election/metadata.textproto | 0 .../tests/p4rt_election/p4rt_election_test.go | 0 .../{experimental => }/p4rt/wbb.p4info.pb.txt | 0 .../otg_tests/prefix_set_test/README.md | 0 .../prefix_set_test/metadata.textproto | 0 .../prefix_set_test/prefix_set_test.go | 0 .../otg_tests/base_vrf_selection/README.md | 0 .../base_vrf_selection_test.go | 0 .../base_vrf_selection/metadata.textproto | 0 .../README.md | 0 .../metadata.textproto | 0 ...tocol_dscp_rules_for_vrf_selection_test.go | 0 .../replay/tests/diff_command_trees/README.md | 14 + .../diff_command_trees_test.go | 0 .../diff_command_trees/metadata.textproto | 0 .../replay/tests/p4rt_replay/README.md | 14 + .../tests/p4rt_replay/metadata.textproto | 0 .../tests/p4rt_replay/p4rt_replay_test.go | 0 .../replay/tests/presession_test/README.md | 20 + .../tests/presession_test/metadata.textproto | 0 .../tests/presession_test/presession_test.go | 0 .../README.md | 18 +- .../metadata.textproto | 0 .../tls_authentication_over_grpc_test.go | 0 testregistry.textproto | 52 +- 149 files changed, 567 insertions(+), 2107 deletions(-) rename feature/{experimental => }/bgp/ate_tests/bgp_long_lived_graceful_restart/README.md (100%) rename feature/{experimental => }/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go (100%) rename feature/{experimental => }/bgp/ate_tests/bgp_long_lived_graceful_restart/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/base_bgp_session_parameters/README.md (61%) rename feature/{experimental => }/bgp/otg_tests/base_bgp_session_parameters/base_bgp_session_parameters_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/base_bgp_session_parameters/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn/README.md (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn/bgp_2byte_4byte_asn_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_afi_safi_defaults/README.md (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_afi_safi_defaults/bgp_afi_safi_defaults_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_afi_safi_defaults/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_always_compare_med/README.md (57%) rename feature/{experimental => }/bgp/otg_tests/bgp_always_compare_med/bgp_always_compare_med_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_always_compare_med/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_override_as_path_split_horizon_test/README.md (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_remove_private_as/README.md (60%) rename feature/{experimental => }/bgp/otg_tests/bgp_remove_private_as/bgp_remove_private_as_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_remove_private_as/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md (67%) rename feature/{experimental => }/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto (100%) rename feature/{experimental => }/bgp/otg_tests/link_bandwidth_test/README.md (100%) rename feature/{experimental => }/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go (100%) rename feature/{experimental => }/bgp/otg_tests/link_bandwidth_test/metadata.textproto (100%) delete mode 100644 feature/experimental/isis/ate_tests/internal/session/attrs.go delete mode 100644 feature/experimental/isis/ate_tests/internal/session/session.go delete mode 100644 feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md delete mode 100644 feature/experimental/isis/otg_tests/isis_interface_level_passive_test/README.md delete mode 100644 feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md delete mode 100644 feature/experimental/policy/policy_base/feature.textproto delete mode 100644 feature/experimental/policy/policy_vrf_selection/feature.textproto delete mode 100644 feature/experimental/replay/tests/presession_test/README.md rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action_pbf/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action_pbf/backup_nhg_action_pbf_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/backup_nhg_action_pbf/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/dut_daemon_failure/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/dut_daemon_failure/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/fib_failed_due_to_hw_res_exhaust_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/route_addition_during_failover_test/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/route_addition_during_failover_test/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/route_removal_during_failover_test/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/route_removal_during_failover_test/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go (100%) rename feature/{experimental => }/gribi/otg_tests/vrf_policy_driven_te/README.md (100%) rename feature/{experimental => }/gribi/otg_tests/vrf_policy_driven_te/metadata.textproto (100%) rename feature/{experimental => }/gribi/otg_tests/vrf_policy_driven_te/vrf_policy_driven_te_test.go (100%) delete mode 100644 feature/gribi/vrf_policy_driven_te/README.md rename feature/{experimental => }/isis/otg_tests/base_adjacencies_test/README.md (100%) rename feature/{experimental => }/isis/otg_tests/base_adjacencies_test/base_adjacencies_test.go (100%) rename feature/{experimental => }/isis/otg_tests/base_adjacencies_test/metadata.textproto (100%) rename feature/{experimental => }/isis/otg_tests/isis_change_lsp_lifetime_test/README.md (70%) rename feature/{experimental => }/isis/otg_tests/isis_change_lsp_lifetime_test/isis_change_lsp_lifetime_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_change_lsp_lifetime_test/metadata.textproto (100%) rename feature/{experimental => }/isis/otg_tests/isis_drain_test/README.md (84%) rename feature/{experimental => }/isis/otg_tests/isis_drain_test/isis_drain_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_drain_test/metadata.textproto (100%) create mode 100644 feature/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md rename feature/{experimental => }/isis/otg_tests/isis_interface_hello_padding_enable_test/isis_interface_hello_padding_enable_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_interface_hello_padding_enable_test/metadata.textproto (100%) create mode 100644 feature/isis/otg_tests/isis_interface_level_passive_test/README.md rename feature/{experimental => }/isis/otg_tests/isis_interface_level_passive_test/isis_interface_level_passive_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_interface_level_passive_test/metadata.textproto (100%) rename feature/{experimental => }/isis/otg_tests/isis_interface_passive_test/README.md (99%) rename feature/{experimental => }/isis/otg_tests/isis_interface_passive_test/isis_interface_passive_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_interface_passive_test/metadata.textproto (100%) rename feature/{experimental => }/isis/otg_tests/isis_metric_style_wide_enabled_test/README.md (100%) rename feature/{experimental => }/isis/otg_tests/isis_metric_style_wide_enabled_test/isis_metric_style_wide_enabled_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_metric_style_wide_enabled_test/metadata.textproto (100%) create mode 100644 feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md rename feature/{experimental => }/isis/otg_tests/isis_metric_style_wide_not_enabled_test/isis_metric_style_wide_not_enabled_test.go (100%) rename feature/{experimental => }/isis/otg_tests/isis_metric_style_wide_not_enabled_test/metadata.textproto (100%) rename feature/{experimental => }/isis/otg_tests/lsp_updates_test/README.md (58%) rename feature/{experimental => }/isis/otg_tests/lsp_updates_test/lsp_updates_test.go (100%) rename feature/{experimental => }/isis/otg_tests/lsp_updates_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/README.md (94%) rename feature/{experimental => }/p4rt/otg_tests/base_p4rt/README.md (73%) rename feature/{experimental => }/p4rt/otg_tests/base_p4rt/base_p4rt_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/base_p4rt/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md (86%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetin_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/README.md (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/google_discovery_protocol_packetout_lag_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md (87%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/google_discovery_protocol_packetout_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetin_test/README.md (85%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetin_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetout_test/README.md (80%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/lldp_packetout_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/performance_test/README.md (73%) rename feature/{experimental => }/p4rt/otg_tests/performance_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/performance_test/performance_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_test/README.md (73%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md (98%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_with_vrf_selection_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetout_test/README.md (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetout_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetout_test/packetout_test.go (100%) rename feature/{experimental => }/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go (100%) rename feature/{experimental => }/p4rt/tests/metadata_validation_test/README.md (81%) rename feature/{experimental => }/p4rt/tests/metadata_validation_test/metadata.textproto (100%) rename feature/{experimental => }/p4rt/tests/metadata_validation_test/metadata_validation_test.go (100%) rename feature/{experimental => }/p4rt/tests/p4rt_election/README.md (96%) rename feature/{experimental => }/p4rt/tests/p4rt_election/metadata.textproto (100%) rename feature/{experimental => }/p4rt/tests/p4rt_election/p4rt_election_test.go (100%) rename feature/{experimental => }/p4rt/wbb.p4info.pb.txt (100%) rename feature/{experimental/policy => policy_forwarding}/otg_tests/prefix_set_test/README.md (100%) rename feature/{experimental/policy => policy_forwarding}/otg_tests/prefix_set_test/metadata.textproto (100%) rename feature/{experimental/policy => policy_forwarding}/otg_tests/prefix_set_test/prefix_set_test.go (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/base_vrf_selection/README.md (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/base_vrf_selection/base_vrf_selection_test.go (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/base_vrf_selection/metadata.textproto (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/metadata.textproto (100%) rename feature/{experimental/policy => policy_forwarding}/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/protocol_dscp_rules_for_vrf_selection_test.go (100%) rename feature/{experimental => }/replay/tests/diff_command_trees/README.md (62%) rename feature/{experimental => }/replay/tests/diff_command_trees/diff_command_trees_test.go (100%) rename feature/{experimental => }/replay/tests/diff_command_trees/metadata.textproto (100%) rename feature/{experimental => }/replay/tests/p4rt_replay/README.md (54%) rename feature/{experimental => }/replay/tests/p4rt_replay/metadata.textproto (100%) rename feature/{experimental => }/replay/tests/p4rt_replay/p4rt_replay_test.go (100%) create mode 100644 feature/replay/tests/presession_test/README.md rename feature/{experimental => }/replay/tests/presession_test/metadata.textproto (100%) rename feature/{experimental => }/replay/tests/presession_test/presession_test.go (100%) rename feature/{experimental => }/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md (91%) rename feature/{experimental => }/security/aaa/kne_tests/tls_authentication_over_grpc_test/metadata.textproto (100%) rename feature/{experimental => }/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go (100%) diff --git a/.github/workflows/readme_oc_path_and_rpc.yml b/.github/workflows/readme_oc_path_and_rpc.yml index b757f475a66..73e78f5be8d 100644 --- a/.github/workflows/readme_oc_path_and_rpc.yml +++ b/.github/workflows/readme_oc_path_and_rpc.yml @@ -37,7 +37,7 @@ jobs: exemption_flags=( --non-test-readme feature/security/gnsi/certz/test_data/README.md - --non-test-readme feature/experimental/p4rt/README.md + --non-test-readme feature/p4rt/README.md --non-test-readme feature/security/gnsi/acctz/README.md ) diff --git a/.gitignore b/.gitignore index 93acb89f3cb..07ebd5a939c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *~ topologies/kne/testbed.kne.yml .vscode/ +.idea/ # used by `make validate_paths` openconfig_public/ # used by `make proto/...` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5875bebd432..2290141cb5a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,10 +62,6 @@ The directory tree is organized as follows: * `cloudbuild/` contains google cloud build scripts for running virtual routers in containers on [KNE](https://github.com/openconfig/kne) * `feature/` contains definition and tests of feature profiles. -* `feature/experimental` contains tests which have automation which is - not confirmed to pass on any hardware platform or software release. - When the test automation is passing against at least one DUT, - it is moved to the `feature/` directory. * `internal/` contains packages used by feature profile tests. * `proto/` contains protobuf files for feature profiles. * `tools/` contains code used for CI checks. diff --git a/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/README.md b/feature/bgp/ate_tests/bgp_long_lived_graceful_restart/README.md similarity index 100% rename from feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/README.md rename to feature/bgp/ate_tests/bgp_long_lived_graceful_restart/README.md diff --git a/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go b/feature/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go similarity index 100% rename from feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go rename to feature/bgp/ate_tests/bgp_long_lived_graceful_restart/bgp_long_lived_graceful_restart_test.go diff --git a/feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/metadata.textproto b/feature/bgp/ate_tests/bgp_long_lived_graceful_restart/metadata.textproto similarity index 100% rename from feature/experimental/bgp/ate_tests/bgp_long_lived_graceful_restart/metadata.textproto rename to feature/bgp/ate_tests/bgp_long_lived_graceful_restart/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/base_bgp_session_parameters/README.md b/feature/bgp/otg_tests/base_bgp_session_parameters/README.md similarity index 61% rename from feature/experimental/bgp/otg_tests/base_bgp_session_parameters/README.md rename to feature/bgp/otg_tests/base_bgp_session_parameters/README.md index dc3416dbd47..8bdeb896e1a 100644 --- a/feature/experimental/bgp/otg_tests/base_bgp_session_parameters/README.md +++ b/feature/bgp/otg_tests/base_bgp_session_parameters/README.md @@ -48,48 +48,21 @@ Test the normal session establishment and termination: * Explicit holdtime interval and keepalive interval. * Explicit connect retry interval. -## Config Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/bgp/global - -* For Parameters: - - * config/as - * config/router-id - * config/peer-as - * config/local-as - * config/description - * timers/config/hold-time - * timers/config/keepalive-interval - * timers/config/minimum-route-advertisement-interval - -* For prefixes: - - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group - * /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor - -## Telemetry Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/bgp/ - -* For Parameters: - - * state/last-established - * state/messages/received/NOTIFICATION - * state/negotiated-hold-time - * state/supported-capabilities - -## Protocol/RPC Parameter coverage - -* BGP - - * OPEN - - * Version - * My Autonomous System - * BGP Identifier - * Hold Time +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/hold-time: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/keepalive-interval: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/last-established: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/NOTIFICATION: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/negotiated-hold-time: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/supported-capabilities: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` diff --git a/feature/experimental/bgp/otg_tests/base_bgp_session_parameters/base_bgp_session_parameters_test.go b/feature/bgp/otg_tests/base_bgp_session_parameters/base_bgp_session_parameters_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/base_bgp_session_parameters/base_bgp_session_parameters_test.go rename to feature/bgp/otg_tests/base_bgp_session_parameters/base_bgp_session_parameters_test.go diff --git a/feature/experimental/bgp/otg_tests/base_bgp_session_parameters/metadata.textproto b/feature/bgp/otg_tests/base_bgp_session_parameters/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/base_bgp_session_parameters/metadata.textproto rename to feature/bgp/otg_tests/base_bgp_session_parameters/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/README.md b/feature/bgp/otg_tests/bgp_2byte_4byte_asn/README.md similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/README.md rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn/README.md diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/bgp_2byte_4byte_asn_test.go b/feature/bgp/otg_tests/bgp_2byte_4byte_asn/bgp_2byte_4byte_asn_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/bgp_2byte_4byte_asn_test.go rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn/bgp_2byte_4byte_asn_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/metadata.textproto b/feature/bgp/otg_tests/bgp_2byte_4byte_asn/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/metadata.textproto rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md b/feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go b/feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/bgp_2byte_4byte_asn_policy_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/metadata.textproto b/feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/metadata.textproto rename to feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/README.md b/feature/bgp/otg_tests/bgp_afi_safi_defaults/README.md similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/README.md rename to feature/bgp/otg_tests/bgp_afi_safi_defaults/README.md diff --git a/feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/bgp_afi_safi_defaults_test.go b/feature/bgp/otg_tests/bgp_afi_safi_defaults/bgp_afi_safi_defaults_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/bgp_afi_safi_defaults_test.go rename to feature/bgp/otg_tests/bgp_afi_safi_defaults/bgp_afi_safi_defaults_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/metadata.textproto b/feature/bgp/otg_tests/bgp_afi_safi_defaults/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_afi_safi_defaults/metadata.textproto rename to feature/bgp/otg_tests/bgp_afi_safi_defaults/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_always_compare_med/README.md b/feature/bgp/otg_tests/bgp_always_compare_med/README.md similarity index 57% rename from feature/experimental/bgp/otg_tests/bgp_always_compare_med/README.md rename to feature/bgp/otg_tests/bgp_always_compare_med/README.md index 91fdcdad95e..d239bc302e9 100644 --- a/feature/experimental/bgp/otg_tests/bgp_always_compare_med/README.md +++ b/feature/bgp/otg_tests/bgp_always_compare_med/README.md @@ -18,20 +18,22 @@ BGP always compare MED * Validate the change of traffic flow because of the change (OTG Port2). * Validate session state and capabilities received on DUT using telemetry. -## Config Parameter coverage - -* /route-selection-options/config/always-compare-med -* /global/afi-safis/afi-safi/route-selection-options/config/always-compare-med -* /global/route-selection-options/config/always-compare-med - -## Telemetry Parameter coverage - -* /global/afi-safis/afi-safi/route-selection-options/state/always-compare-med -* /global/route-selection-options/state/always-compare-med - -## Protocol/RPC Parameter coverage - -N/A +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/config/always-compare-med: + /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/route-selection-options/config/always-compare-med: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/state/always-compare-med: + /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/route-selection-options/state/always-compare-med: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/bgp/otg_tests/bgp_always_compare_med/bgp_always_compare_med_test.go b/feature/bgp/otg_tests/bgp_always_compare_med/bgp_always_compare_med_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_always_compare_med/bgp_always_compare_med_test.go rename to feature/bgp/otg_tests/bgp_always_compare_med/bgp_always_compare_med_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_always_compare_med/metadata.textproto b/feature/bgp/otg_tests/bgp_always_compare_med/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_always_compare_med/metadata.textproto rename to feature/bgp/otg_tests/bgp_always_compare_med/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_override_as_path_split_horizon_test/README.md b/feature/bgp/otg_tests/bgp_override_as_path_split_horizon_test/README.md similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_override_as_path_split_horizon_test/README.md rename to feature/bgp/otg_tests/bgp_override_as_path_split_horizon_test/README.md diff --git a/feature/experimental/bgp/otg_tests/bgp_remove_private_as/README.md b/feature/bgp/otg_tests/bgp_remove_private_as/README.md similarity index 60% rename from feature/experimental/bgp/otg_tests/bgp_remove_private_as/README.md rename to feature/bgp/otg_tests/bgp_remove_private_as/README.md index 6a5ce3e8a52..7da3a2fc346 100644 --- a/feature/experimental/bgp/otg_tests/bgp_remove_private_as/README.md +++ b/feature/bgp/otg_tests/bgp_remove_private_as/README.md @@ -18,17 +18,20 @@ BGP remove private AS * PRIV_AS1 AS1 * AS1 PRIV_AS1 AS2 -## Config Parameter coverage - -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/remove-private-as - -## Telemetry Parameter coverage - -* /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as4-path/as4-segment/state - -## Protocol/RPC Parameter coverage - -N/A +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/remove-private-as: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as4-path/as4-segment/state/index: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/bgp/otg_tests/bgp_remove_private_as/bgp_remove_private_as_test.go b/feature/bgp/otg_tests/bgp_remove_private_as/bgp_remove_private_as_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_remove_private_as/bgp_remove_private_as_test.go rename to feature/bgp/otg_tests/bgp_remove_private_as/bgp_remove_private_as_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_remove_private_as/metadata.textproto b/feature/bgp/otg_tests/bgp_remove_private_as/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_remove_private_as/metadata.textproto rename to feature/bgp/otg_tests/bgp_remove_private_as/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md similarity index 67% rename from feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md rename to feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md index 45457c0b801..8c21d568b0e 100644 --- a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md +++ b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/README.md @@ -25,19 +25,22 @@ * Re-establish the IBGP sessions by tcp reset. * Validate that the min MSS value has been adjusted to be below 1500 bytes on the tcp session. -## Config Parameter coverage - -* /neighbors/neighbor/transport/config/tcp-mss -* /neighbors/neighbor/transport/config/mtu-discovery - -## Telemetry Parameter coverage - -* /neighbors/neighbor/transport/state/tcp-mss -* /neighbors/neighbor/transport/state/mtu-discovery - -## Protocol/RPC Parameter coverage - -N/A +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu-discovery: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp-mss: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu-discovery: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go rename to feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/bgp_tcp_mss_path_mtu_test.go diff --git a/feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto b/feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto rename to feature/bgp/otg_tests/bgp_tcp_mss_path_mtu/metadata.textproto diff --git a/feature/experimental/bgp/otg_tests/link_bandwidth_test/README.md b/feature/bgp/otg_tests/link_bandwidth_test/README.md similarity index 100% rename from feature/experimental/bgp/otg_tests/link_bandwidth_test/README.md rename to feature/bgp/otg_tests/link_bandwidth_test/README.md diff --git a/feature/experimental/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go b/feature/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go similarity index 100% rename from feature/experimental/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go rename to feature/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go diff --git a/feature/experimental/bgp/otg_tests/link_bandwidth_test/metadata.textproto b/feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto similarity index 100% rename from feature/experimental/bgp/otg_tests/link_bandwidth_test/metadata.textproto rename to feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto diff --git a/feature/experimental/isis/ate_tests/internal/session/attrs.go b/feature/experimental/isis/ate_tests/internal/session/attrs.go deleted file mode 100644 index 06dfae73b5b..00000000000 --- a/feature/experimental/isis/ate_tests/internal/session/attrs.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package session - -// This is identical to the internal/attrs library except it points to ygnmi -import ( - "fmt" - - "github.com/openconfig/featureprofiles/internal/deviations" - "github.com/openconfig/ondatra" - "github.com/openconfig/ondatra/gnmi/oc" - "github.com/openconfig/ygot/ygot" -) - -// Attributes bundles some common attributes for devices and/or interfaces. -// It provides helpers to generate appropriate configuration for OpenConfig -// and for an ATETopology. All fields are optional; only those that are -// non-empty will be set when configuring an interface. -type Attributes struct { - IPv4 string - IPv6 string - MAC string - Name string // Interface name, only applied to ATE ports. - Desc string // Description, only applied to DUT interfaces. - IPv4Len uint8 // Prefix length for IPv4. - IPv6Len uint8 // Prefix length for IPv6. - MTU uint16 -} - -// IPv4CIDR constructs the IPv4 CIDR notation with the given prefix -// length, e.g. "192.0.2.1/30". -func (a *Attributes) IPv4CIDR() string { - return fmt.Sprintf("%s/%d", a.IPv4, a.IPv4Len) -} - -// IPv6CIDR constructs the IPv6 CIDR notation with the given prefix -// length, e.g. "2001:db8::1/126". -func (a *Attributes) IPv6CIDR() string { - return fmt.Sprintf("%s/%d", a.IPv6, a.IPv6Len) -} - -// ConfigInterface configures an OpenConfig interface with these attributes. -func (a *Attributes) ConfigInterface(intf *oc.Interface, dut *ondatra.DUTDevice) *oc.Interface { - if a.Desc != "" { - intf.Description = ygot.String(a.Desc) - } - intf.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd - if deviations.InterfaceEnabled(dut) { - intf.Enabled = ygot.Bool(true) - } - if a.MTU > 0 && !deviations.OmitL2MTU(dut) { - intf.Mtu = ygot.Uint16(a.MTU + 14) - } - e := intf.GetOrCreateEthernet() - if a.MAC != "" { - e.MacAddress = ygot.String(a.MAC) - } - - s := intf.GetOrCreateSubinterface(0) - if a.IPv4 != "" { - s4 := s.GetOrCreateIpv4() - if deviations.InterfaceEnabled(dut) && !deviations.IPv4MissingEnabled(dut) { - s4.Enabled = ygot.Bool(true) - } - if a.MTU > 0 { - s4.Mtu = ygot.Uint16(a.MTU) - } - a4 := s4.GetOrCreateAddress(a.IPv4) - if a.IPv4Len > 0 { - a4.PrefixLength = ygot.Uint8(a.IPv4Len) - } - } - - if a.IPv6 != "" { - s6 := s.GetOrCreateIpv6() - if a.MTU > 0 { - s6.Mtu = ygot.Uint32(uint32(a.MTU)) - } - if deviations.InterfaceEnabled(dut) { - s6.Enabled = ygot.Bool(true) - } - a6 := s6.GetOrCreateAddress(a.IPv6) - if a.IPv6Len > 0 { - a6.PrefixLength = ygot.Uint8(a.IPv6Len) - } - } - return intf -} - -// NewOCInterface returns a new *oc.Interface configured with these attributes -func (a *Attributes) NewOCInterface(name string, dut *ondatra.DUTDevice) *oc.Interface { - return a.ConfigInterface(&oc.Interface{Name: ygot.String(name)}, dut) -} - -// AddToATE adds a new interface to an ATETopology with these attributes. -func (a *Attributes) AddToATE(top *ondatra.ATETopology, ap *ondatra.Port, peer *Attributes) *ondatra.Interface { - i := top.AddInterface(a.Name).WithPort(ap) - if a.MTU > 0 { - i.Ethernet().WithMTU(a.MTU) - } - if a.IPv4 != "" { - i.IPv4(). - WithAddress(a.IPv4CIDR()). - WithDefaultGateway(peer.IPv4) - } - if a.IPv6 != "" { - i.IPv6(). - WithAddress(a.IPv6CIDR()). - WithDefaultGateway(peer.IPv6) - } - return i -} diff --git a/feature/experimental/isis/ate_tests/internal/session/session.go b/feature/experimental/isis/ate_tests/internal/session/session.go deleted file mode 100644 index 6fbc5caa12c..00000000000 --- a/feature/experimental/isis/ate_tests/internal/session/session.go +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package session is deprecated and scoped only to be used with -// feature/experimental/isis/ate_tests/*. Do not use elsewhere. -package session - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/openconfig/featureprofiles/internal/deviations" - "github.com/openconfig/featureprofiles/internal/fptest" - "github.com/openconfig/ondatra" - "github.com/openconfig/ondatra/gnmi/oc" - "github.com/openconfig/ondatra/gnmi/oc/netinstisis" - "github.com/openconfig/ondatra/gnmi/oc/networkinstance" - "github.com/openconfig/ondatra/gnmi/oc/ocpath" - "github.com/openconfig/ondatra/ixnet" - "github.com/openconfig/ygnmi/ygnmi" - "github.com/openconfig/ygot/ygot" -) - -// PTISIS is shorthand for the long oc protocol type constant -const PTISIS = oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS - -// The testbed consists of a dut and an ate with two connections, labeled ISISIntf and Intf2. -// ISISIntf links dut:port1 and ate:port1, which are assigned 192.0.2.1/30 and 192.0.2.2/30 -// respectively. Intf2 connects dut:port2 to ate:port2, which are 192.0.2.5/30 and 192.0.2.6/30. -// We establish an IS-IS adjacency over ISISIntf. For traffic testing, we configure the ATE end -// of the IS-IS adjacency to advertise 198.51.100.0/24, then generate traffic through ate:port2 with -// IPv4 headers indicating that it should go to a random address in that range; the dut should -// route this traffic to the IS-IS link, where the ATE should log it arriving on ate:port1. -const ( - DUTAreaAddress = "49.0001" - ATEAreaAddress = "49.0002" - DUTSysID = "1920.0000.2001" - ISISName = "DEFAULT" - pLen4 = 30 - pLen6 = 126 -) - -var ( - // DUTNET is the Network Entity Title for the DUT - DUTNET = fmt.Sprintf("%v.%v.00", DUTAreaAddress, DUTSysID) - // DUTISISAttrs has attributes for the DUT ISIS connection on port1 - DUTISISAttrs = &Attributes{ - Desc: "DUT to ATE with IS-IS", - IPv4: "192.0.2.1", - IPv6: "2001:db8::1", - IPv4Len: pLen4, - IPv6Len: pLen6, - } - // ATEISISAttrs has attributes for the ATE ISIS connection on port1 - ATEISISAttrs = &Attributes{ - Name: "port1", - Desc: "ATE to DUT with IS-IS", - IPv4: "192.0.2.2", - IPv6: "2001:db8::2", - IPv4Len: pLen4, - IPv6Len: pLen6, - } - // DUTTrafficAttrs has attributes for the DUT end of the traffic connection (port2) - DUTTrafficAttrs = &Attributes{ - Desc: "DUT to ATE secondary link", - IPv4: "192.0.2.5", - IPv6: "2001:db8::5", - IPv4Len: pLen4, - IPv6Len: pLen6, - } - // ATETrafficAttrs has attributes for the ATE end of the traffic connection (port2) - ATETrafficAttrs = &Attributes{ - Name: "port2", - Desc: "ATE to DUT secondary link", - IPv4: "192.0.2.6", - IPv6: "2001:db8::6", - IPv4Len: pLen4, - IPv6Len: pLen6, - } -) - -// ISISPath is shorthand for ProtocolPath().Isis(). -func ISISPath(dut *ondatra.DUTDevice) *netinstisis.NetworkInstance_Protocol_IsisPath { - return ProtocolPath(dut).Isis() -} - -// ProtocolPath returns the path to the IS-IS protocol named ISISName on the -// default network instance. -func ProtocolPath(dut *ondatra.DUTDevice) *networkinstance.NetworkInstance_ProtocolPath { - return ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(PTISIS, ISISName) -} - -// addISISOC configures basic IS-IS on a device. -func addISISOC(dev *oc.Root, areaAddress, sysID, ifaceName string, dut *ondatra.DUTDevice) { - inst := dev.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) - prot := inst.GetOrCreateProtocol(PTISIS, ISISName) - prot.Enabled = ygot.Bool(true) - isis := prot.GetOrCreateIsis() - glob := isis.GetOrCreateGlobal() - if deviations.ISISInstanceEnabledRequired(dut) { - glob.Instance = ygot.String(ISISName) - } - glob.Net = []string{fmt.Sprintf("%v.%v.00", areaAddress, sysID)} - glob.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) - glob.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) - level := isis.GetOrCreateLevel(2) - level.MetricStyle = oc.Isis_MetricStyle_WIDE_METRIC - intf := isis.GetOrCreateInterface(ifaceName) - intf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT - intf.Enabled = ygot.Bool(true) - // Configure ISIS level at global mode if true else at interface mode - if deviations.ISISInterfaceLevel1DisableRequired(dut) { - intf.GetOrCreateLevel(1).Enabled = ygot.Bool(false) - } else { - intf.GetOrCreateLevel(2).Enabled = ygot.Bool(true) - } - glob.LevelCapability = oc.Isis_LevelType_LEVEL_2 - // Configure ISIS enable flag at interface level - intf.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV4, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) - intf.GetOrCreateAf(oc.IsisTypes_AFI_TYPE_IPV6, oc.IsisTypes_SAFI_TYPE_UNICAST).Enabled = ygot.Bool(true) - if deviations.ISISInterfaceAfiUnsupported(dut) { - intf.Af = nil - } - -} - -// addISISTopo configures basic IS-IS on an ATETopology interface. -func addISISTopo(iface *ondatra.Interface, areaAddress, sysID string) { - isis := iface.ISIS() - isis. - WithAreaID(areaAddress). - WithTERouterID(sysID). - WithNetworkTypePointToPoint(). - WithWideMetricEnabled(true). - WithLevelL2().WithMetric(10) -} - -// TestSession is a convenience wrapper around the dut, ate, ports, and -// topology we're using. -type TestSession struct { - DUT *ondatra.DUTDevice - DUTClient *ygnmi.Client - ATE *ondatra.ATEDevice - // Rather than looking these up all the time, we fetch all the relevant ports - // and interfaces at setup time. - DUTPort1, DUTPort2, ATEPort1, ATEPort2 *ondatra.Port - ATEIntf1, ATEIntf2 *ondatra.Interface - // DUTConf and ATETop can be modified by tests; calling .Push() will apply - // them to the dut and ate. - DUTConf *oc.Root - ATETop *ondatra.ATETopology -} - -// New creates a new TestSession using the default global config, and -// configures the interfaces on the dut and the ate. -func New(t testing.TB) (*TestSession, error) { - t.Helper() - s := &TestSession{} - s.DUT = ondatra.DUT(t, "dut") - var err error - 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) - } - s.DUTPort1 = s.DUT.Port(t, "port1") - s.DUTPort2 = s.DUT.Port(t, "port2") - s.DUTConf = &oc.Root{} - // configure dut ports - DUTISISAttrs.ConfigInterface(s.DUTConf.GetOrCreateInterface(s.DUTPort1.Name()), s.DUT) - DUTTrafficAttrs.ConfigInterface(s.DUTConf.GetOrCreateInterface(s.DUTPort2.Name()), s.DUT) - - // If there is no ate, any operation that requires the ATE will call - // t.Fatal() instead. This is helpful for debugging the parts of the test - // that don't use an ATE. - if ate, ok := ondatra.ATEs(t)["ate"]; ok { - s.ATE = ate - s.ATEPort1 = s.ATE.Port(t, "port1") - s.ATEPort2 = s.ATE.Port(t, "port2") - s.ATETop = s.ATE.Topology().New() - s.ATEIntf1 = ATEISISAttrs.AddToATE(s.ATETop, s.ATEPort1, DUTISISAttrs) - s.ATEIntf2 = ATETrafficAttrs.AddToATE(s.ATETop, s.ATEPort2, DUTTrafficAttrs) - } - return s, nil -} - -// MustNew creates a new TestSession or Fatal()s if anything goes wrong. -func MustNew(t testing.TB) *TestSession { - t.Helper() - v, err := New(t) - if err != nil { - t.Fatalf("Unable to initialize topology: %v", err) - } - return v -} - -// WithISIS adds ISIS to a test session. -func (s *TestSession) WithISIS() *TestSession { - if deviations.ExplicitInterfaceInDefaultVRF(s.DUT) { - addISISOC(s.DUTConf, DUTAreaAddress, DUTSysID, s.DUTPort1.Name()+".0", s.DUT) - } else { - addISISOC(s.DUTConf, DUTAreaAddress, DUTSysID, s.DUTPort1.Name(), s.DUT) - } - if s.ATE != nil { - addISISTopo(s.ATEIntf1, ATEAreaAddress, "*") - } - return s -} - -// ConfigISIS takes two functions, one that operates on an OC IS-IS block and -// one that operates on an ondatra ATE IS-IS block. The first will be applied -// to the IS-IS block of ts.DUTConfig, and the second will be applied to the -// IS-IS configuration of ts.ATETop -func (s *TestSession) ConfigISIS(ocFn func(*oc.NetworkInstance_Protocol_Isis), ateFn func(*ixnet.ISIS)) { - ocFn(s.DUTConf.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(s.DUT)).GetOrCreateProtocol(PTISIS, ISISName).GetOrCreateIsis()) - if s.ATE != nil { - ateFn(s.ATEIntf1.ISIS()) - } -} - -// PushAndStart calls PushDUT and PushAndStartATE to send config to both -// devices. -func (s *TestSession) PushAndStart(t testing.TB) error { - t.Helper() - if err := s.PushDUT(context.Background(), t); err != nil { - return err - } - s.PushAndStartATE(t) - return nil -} - -// PushDUT replaces DUT config with s.dutConf. Only interfaces and the ISIS -// protocol are written. -func (s *TestSession) PushDUT(ctx context.Context, t testing.TB) error { - // Push the interfaces - for name, conf := range s.DUTConf.Interface { - _, err := ygnmi.Replace(ctx, s.DUTClient, ocpath.Root().Interface(name).Config(), conf) - if err != nil { - return fmt.Errorf("configuring interface %s: %w", name, err) - } - } - if deviations.ExplicitInterfaceInDefaultVRF(s.DUT) { - fptest.AssignToNetworkInstance(t, s.DUT, s.DUTPort1.Name(), deviations.DefaultNetworkInstance(s.DUT), 0) - fptest.AssignToNetworkInstance(t, s.DUT, s.DUTPort2.Name(), deviations.DefaultNetworkInstance(s.DUT), 0) - } - if deviations.ExplicitPortSpeed(s.DUT) { - fptest.SetPortSpeed(t, s.DUTPort1) - fptest.SetPortSpeed(t, s.DUTPort2) - } - - // Push the ISIS protocol - if _, err := ygnmi.Update(ctx, s.DUTClient, ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(s.DUT)).Config(), &oc.NetworkInstance{ - Name: ygot.String(deviations.DefaultNetworkInstance(s.DUT)), - Type: oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE, - }); err != nil { - return fmt.Errorf("configuring network instance: %w", err) - } - dutConf := s.DUTConf.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(s.DUT)).GetOrCreateProtocol(PTISIS, ISISName) - _, err := ygnmi.Replace(ctx, s.DUTClient, ProtocolPath(s.DUT).Config(), dutConf) - if err != nil { - return fmt.Errorf("configuring ISIS: %w", err) - } - return nil -} - -// PushAndStartATE pushes the ATETop to the ATE and starts protocols on it. -func (s *TestSession) PushAndStartATE(t testing.TB) { - t.Helper() - if s.ATE == nil { - t.Fatal("Cannot run test without ATE") - } - s.ATETop.Push(t).StartProtocols(t) -} - -// AwaitAdjacency waits up to a minute for the dut to report that the ISISIntf -// link has formed any IS-IS adjacency, returning the adjacency ID or an error -// if one doesn't form. -func (s *TestSession) AwaitAdjacency() (string, error) { - intf := ISISPath(s.DUT).Interface(s.DUTPort1.Name()) - if deviations.ExplicitInterfaceInDefaultVRF(s.DUT) { - intf = ISISPath(s.DUT).Interface(s.DUTPort1.Name() + ".0") - } - query := intf.LevelAny().AdjacencyAny().AdjacencyState().State() - ctx, cancel := context.WithTimeout(context.Background(), time.Minute) - defer cancel() - watcher := ygnmi.WatchAll(ctx, s.DUTClient, query, func(val *ygnmi.Value[oc.E_Isis_IsisInterfaceAdjState]) error { - if val == nil || !val.IsPresent() { - return ygnmi.Continue - } - v, _ := val.Val() - if v == oc.Isis_IsisInterfaceAdjState_UP { - return nil - } - return ygnmi.Continue - }) - - got, err := watcher.Await() - if err != nil { - return "", err - } - return got.Path.GetElem()[10].GetKey()["system-id"], nil -} - -// MustAdjacency waits up to a minute for an IS-IS adjacency to form between -// the DUT and the ATE; it returns the adjacency ID or calls t.Fatal no -// adjacency forms. -func (s *TestSession) MustAdjacency(t testing.TB) string { - adjID, err := s.AwaitAdjacency() - if err != nil { - t.Fatalf("Waiting for adjacency to form: %v", err) - } - return adjID -} - -// MustATEInterface returns the ATE interface for the portID, or calls t.Fatal -// if this fails. -func (s *TestSession) MustATEInterface(t testing.TB, portID string) *ondatra.Interface { - if s.ATE == nil { - t.Fatal("Cannot run test without ATE") - } - iface, ok := s.ATETop.Interfaces()[portID] - if !ok { - t.Fatalf("No ATE interface with ID %v", portID) - } - return iface -} diff --git a/feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md b/feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md deleted file mode 100644 index 0a0d6fe16b1..00000000000 --- a/feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# RT-2.6: IS-IS Hello-Padding enabled at interface level - -## Summary - -* Base IS-IS functionality and adjacency establishment. -* Verifies isis adjacency by changing MTU. - -## Procedure - -* Configure IS-IS for ATE port-1 and DUT port-1. -* Configure DUT with global hello-padding enabled. -* Ensure that adjacencies are established with: - * Interface level hello padding is enabled. - * Verify that IPv4 and IPv6 IS-ISIS adjacency comes up fine. - * Verify the output of ST path displaying the status of ISIS hello padding. - * If we change the MTU on either side, then adjacency should not come up. - * Verify that IPv4 and IPv6 prefixes that are advertised by ATE correctly installed into DUTs route and forwarding table. - * TODO-Verify the Hellos are sent with Padding during adjacency turn-up if the padding is enabled adaptively/sometimes. - * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. - -## Config Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/config/authentication-check - * global/config/net - * global/config/level-capability - * global/config/hello-padding - * global/afi-safi/af/config/enabled - * levels/level/config/level-number - * levels/level/config/enabled - * levels/level/authentication/config/enabled - * levels/level/authentication/config/auth-mode - * levels/level/authentication/config/auth-password - * levels/level/authentication/config/auth-type - * interfaces/interface/config/interface-id - * interfaces/interface/config/enabled - * interfaces/interface/config/circuit-type - * interfaces/interface/timers/config/csnp-interval - * interfaces/interface/timers/config/lsp-pacing-interval - * interfaces/interface/levels/level/config/level-number - * interfaces/interface/levels/level/timers/config/hello-interval - * interfaces/interface/levels/level/timers/config/hello-multiplier - * interfaces/interface/levels/level/hello-authentication/config/auth-mode - * interfaces/interface/levels/level/hello-authentication/config/auth-password - * interfaces/interface/levels/level/hello-authentication/config/auth-type - * interfaces/interface/levels/level/hello-authentication/config/enabled - * interfaces/interface/afi-safi/af/config/afi-name - * interfaces/interface/afi-safi/af/config/safi-name - * interfaces/interface/afi-safi/af/config/metric - * interfaces/interface/afi-safi/af/config/enabled - -## Telemetry Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/state/hello-padding - * interfaces/interface/state/hello-padding - * interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/area-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa - * interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid - * interfaces/interface/levels/level/adjacencies/adjacency/state/priority - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress - * interfaces/interface/levels/level/afi-safi/af/state/afi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * interfaces/interface/levels/level/afi-safi/af/state/safi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * levels/level/system-level-counters/state/auth-fails - * levels/level/system-level-counters/state/auth-type-fails - * levels/level/system-level-counters/state/corrupted-lsps - * levels/level/system-level-counters/state/database-overloads - * levels/level/system-level-counters/state/exceed-max-seq-nums - * levels/level/system-level-counters/state/id-len-mismatch - * levels/level/system-level-counters/state/lsp-errors - * levels/level/system-level-counters/state/manual-address-drop-from-area - * levels/level/system-level-counters/state/max-area-address-mismatches - * levels/level/system-level-counters/state/own-lsp-purges - * levels/level/system-level-counters/state/part-changes - * levels/level/system-level-counters/state/seq-num-skips - * levels/level/system-level-counters/state/spf-runs diff --git a/feature/experimental/isis/otg_tests/isis_interface_level_passive_test/README.md b/feature/experimental/isis/otg_tests/isis_interface_level_passive_test/README.md deleted file mode 100644 index 6e80f5f2985..00000000000 --- a/feature/experimental/isis/otg_tests/isis_interface_level_passive_test/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# RT-2.11: IS-IS Passive is enabled at the area level - -## Summary - -* Verify isis adjacency with passive enabled under level. - -## Topology - -* ATE:port1 <-> port1:DUT:port2 <-> ATE:port2 - -## Procedure - -* Configure IS-IS for ATE port-1 and DUT port-1. -* Configure DUT interface with IS-IS passive configured at area level 2. - * Verify that IS-IS adjacency is not coming up in level-2 area for IPv4 and IPV6 address families. -* Undo the IS-IS passive configuration under level 2 - * Verify that IS-IS adjacency for IPv4 and IPV6 address families are coming up in the level-2 area. - * Verify that IPv4 and IPv6 prefixes that are advertised by ATE are correctly installed into DUTs route and forwarding table. - * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. - * TODO-Verify the output of ST path displaying the interface as passive in ISIS database/adj table - -## Config Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/config/authentication-check - * global/config/net - * global/config/level-capability - * global/config/hello-padding - * global/afi-safi/af/config/enabled - * levels/level/config/level-number - * levels/level/config/enabled - * levels/level/authentication/config/enabled - * levels/level/authentication/config/auth-mode - * levels/level/authentication/config/auth-password - * levels/level/authentication/config/auth-type - * interfaces/interface/config/interface-id - * interfaces/interface/config/enabled - * interfaces/interface/config/circuit-type - * interfaces/interface/config/passive - * interfaces/interface/timers/config/csnp-interval - * interfaces/interface/timers/config/lsp-pacing-interval - * interfaces/interface/levels/level/config/level-number - * interfaces/interface/levels/level/config/passive - * interfaces/interface/levels/level/timers/config/hello-interval - * interfaces/interface/levels/level/timers/config/hello-multiplier - * interfaces/interface/levels/level/hello-authentication/config/auth-mode - * interfaces/interface/levels/level/hello-authentication/config/auth-password - * interfaces/interface/levels/level/hello-authentication/config/auth-type - * interfaces/interface/levels/level/hello-authentication/config/enabled - * interfaces/interface/afi-safi/af/config/afi-name - * interfaces/interface/afi-safi/af/config/safi-name - * interfaces/interface/afi-safi/af/config/metric - * interfaces/interface/afi-safi/af/config/enabled - -## Telemetry Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * interfaces/interface/state/passive - * interfaces/interface/levels/level/state/passive - * interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/area-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa - * interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid - * interfaces/interface/levels/level/adjacencies/adjacency/state/priority - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress - * interfaces/interface/levels/level/afi-safi/af/state/afi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * interfaces/interface/levels/level/afi-safi/af/state/safi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * levels/level/system-level-counters/state/auth-fails - * levels/level/system-level-counters/state/auth-type-fails - * levels/level/system-level-counters/state/corrupted-lsps - * levels/level/system-level-counters/state/database-overloads - * levels/level/system-level-counters/state/exceed-max-seq-nums - * levels/level/system-level-counters/state/id-len-mismatch - * levels/level/system-level-counters/state/lsp-errors - * levels/level/system-level-counters/state/manual-address-drop-from-area - * levels/level/system-level-counters/state/max-area-address-mismatches - * levels/level/system-level-counters/state/own-lsp-purges - * levels/level/system-level-counters/state/part-changes - * levels/level/system-level-counters/state/seq-num-skips - * levels/level/system-level-counters/state/spf-runs diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md b/feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md deleted file mode 100644 index 4347c71375c..00000000000 --- a/feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# RT-2.8: IS-IS metric style wide not enabled - -## Summary - -* Base IS-IS functionality and adjacency establishment. -* Verifies route metric with wide metric disabled on DUT. - -## Procedure - -* TestISISWideMetricNotEnabled - - * Configure IS-IS for ATE port-1 and DUT port-1. - * Do not configure metric style wide under the area level. - * Enable wide metric style on ATE. - * Advertise ISIS prefixes from ATE with wide metrics (value > 63). - * Verify that IS-IS adjacency for IPv4 and IPV6 address family is coming up. - * Verify that IPv4 and IPv6 prefixes that are advertised by ATE correctly installed into DUTs route and forwarding table. - * TODO-Verify that the metrics of the IPv4 and IPv6 prefixes is 63. - * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. - - -## Config Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/config/authentication-check - * global/config/net - * global/config/level-capability - * global/config/hello-padding - * global/afi-safi/af/config/enabled - * levels/level/config/level-number - * levels/level/config/enabled - * levels/level/config/metric-style - * levels/level/authentication/config/enabled - * levels/level/authentication/config/auth-mode - * levels/level/authentication/config/auth-password - * levels/level/authentication/config/auth-type - * interfaces/interface/config/interface-id - * interfaces/interface/config/enabled - * interfaces/interface/config/circuit-type - * interfaces/interface/config/passive - * interfaces/interface/timers/config/csnp-interval - * interfaces/interface/timers/config/lsp-pacing-interval - * interfaces/interface/levels/level/config/level-number - * interfaces/interface/levels/level/config/passive - * interfaces/interface/levels/level/timers/config/hello-interval - * interfaces/interface/levels/level/timers/config/hello-multiplier - * interfaces/interface/levels/level/hello-authentication/config/auth-mode - * interfaces/interface/levels/level/hello-authentication/config/auth-password - * interfaces/interface/levels/level/hello-authentication/config/auth-type - * interfaces/interface/levels/level/hello-authentication/config/enabled - * interfaces/interface/afi-safi/af/config/afi-name - * interfaces/interface/afi-safi/af/config/safi-name - * interfaces/interface/afi-safi/af/config/enabled - -## Telemetry Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * levels/level/state/metric-style - * interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/area-address - * interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id - * interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa - * interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid - * interfaces/interface/levels/level/adjacencies/adjacency/state/priority - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support - * interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress - * interfaces/interface/levels/level/afi-safi/af/state/afi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * interfaces/interface/levels/level/afi-safi/af/state/safi-name - * interfaces/interface/levels/level/afi-safi/af/state/metric - * levels/level/system-level-counters/state/auth-fails - * levels/level/system-level-counters/state/auth-type-fails - * levels/level/system-level-counters/state/corrupted-lsps - * levels/level/system-level-counters/state/database-overloads - * levels/level/system-level-counters/state/exceed-max-seq-nums - * levels/level/system-level-counters/state/id-len-mismatch - * levels/level/system-level-counters/state/lsp-errors - * levels/level/system-level-counters/state/manual-address-drop-from-area - * levels/level/system-level-counters/state/max-area-address-mismatches - * levels/level/system-level-counters/state/own-lsp-purges - * levels/level/system-level-counters/state/part-changes - * levels/level/system-level-counters/state/seq-num-skips - * levels/level/system-level-counters/state/spf-runs diff --git a/feature/experimental/policy/policy_base/feature.textproto b/feature/experimental/policy/policy_base/feature.textproto deleted file mode 100644 index e0799b0980c..00000000000 --- a/feature/experimental/policy/policy_base/feature.textproto +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_policy_policy_base" - version: 1 -} - -# Policy base - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/config/policy-id" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/config/type" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/state/policy-id" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/state/type" -} - -# Rules base - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/config/sequence-id" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/sequence-id" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/matched-pkts" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/matched-octets" -} - -# Action base - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/discard" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/state/discard" -} - -# Interface base - -config_path { - path: "/network-instances/network-instance/policy-forwarding/interfaces/interface/config/interface-id" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/interfaces/interface/state/interface-id" -} - -# L2 rules - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/config/ethertype" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/config/source-mac" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/config/source-mac-mask" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/config/destination-mac" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/config/destination-mac-mask" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/state/ethertype" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/state/source-mac" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/state/source-mac-mask" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/state/destination-mac" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/l2/state/destination-mac-mask" -} - -# IPv4 rules - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/source-address" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/destination-address" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/dscp" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/dscp-set" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/protocol" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/hop-limit" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/source-address" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/destination-address" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/dscp" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/dscp-set" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/protocol" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/state/hop-limit" -} - -# IPv6 rules - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/source-address" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/source-flow-label" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/destination-address" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/destination-flow-label" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/dscp" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/dscp-set" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/protocol" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/hop-limit" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/source-address" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/source-flow-label" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/destination-address" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/destination-flow-label" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/dscp" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/dscp-set" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/protocol" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/state/hop-limit" -} - -# Transport rules - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/transport/config/source-port" -} -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/transport/config/destination-port" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/transport/state/source-port" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/transport/state/destination-port" -} - diff --git a/feature/experimental/policy/policy_vrf_selection/feature.textproto b/feature/experimental/policy/policy_vrf_selection/feature.textproto deleted file mode 100644 index a5262ef5612..00000000000 --- a/feature/experimental/policy/policy_vrf_selection/feature.textproto +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto -# proto-message: FeatureProfile - -id { - name: "experimental_policy_policy_vrf_selection" - version: 1 -} - -# Interface - -config_path { - path: "/network-instances/network-instance/policy-forwarding/interfaces/interface/config/apply-vrf-selection-policy" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/interfaces/interface/state/apply-vrf-selection-policy" -} - -# VRF actions - -config_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/network-instance" -} -telemetry_path { - path: "/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/state/network-instance" -} - - -feature_profile_dependency { - name: "bgp_policybase" - version: 1 -} diff --git a/feature/experimental/replay/tests/presession_test/README.md b/feature/experimental/replay/tests/presession_test/README.md deleted file mode 100644 index 2fcd2fc461d..00000000000 --- a/feature/experimental/replay/tests/presession_test/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Replay-1.0: Record/replay presession test - -## Summary - -This is an example record/replay test. -At this time, no vendor is expected to run this test. diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/README.md b/feature/gribi/otg_tests/backup_nhg_action_pbf/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/README.md rename to feature/gribi/otg_tests/backup_nhg_action_pbf/README.md diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/backup_nhg_action_pbf_test.go b/feature/gribi/otg_tests/backup_nhg_action_pbf/backup_nhg_action_pbf_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/backup_nhg_action_pbf_test.go rename to feature/gribi/otg_tests/backup_nhg_action_pbf/backup_nhg_action_pbf_test.go diff --git a/feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/metadata.textproto b/feature/gribi/otg_tests/backup_nhg_action_pbf/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/backup_nhg_action_pbf/metadata.textproto rename to feature/gribi/otg_tests/backup_nhg_action_pbf/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/dut_daemon_failure/README.md b/feature/gribi/otg_tests/dut_daemon_failure/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/dut_daemon_failure/README.md rename to feature/gribi/otg_tests/dut_daemon_failure/README.md diff --git a/feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go b/feature/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go rename to feature/gribi/otg_tests/dut_daemon_failure/dut_daemon_failure_test.go diff --git a/feature/experimental/gribi/otg_tests/dut_daemon_failure/metadata.textproto b/feature/gribi/otg_tests/dut_daemon_failure/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/dut_daemon_failure/metadata.textproto rename to feature/gribi/otg_tests/dut_daemon_failure/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/README.md b/feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/README.md rename to feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/README.md diff --git a/feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/fib_failed_due_to_hw_res_exhaust_test.go b/feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/fib_failed_due_to_hw_res_exhaust_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/fib_failed_due_to_hw_res_exhaust_test.go rename to feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/fib_failed_due_to_hw_res_exhaust_test.go diff --git a/feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/metadata.textproto b/feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/metadata.textproto rename to feature/gribi/otg_tests/fib_failed_due_to_hw_res_exhaust_test/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/README.md b/feature/gribi/otg_tests/route_addition_during_failover_test/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/route_addition_during_failover_test/README.md rename to feature/gribi/otg_tests/route_addition_during_failover_test/README.md diff --git a/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/metadata.textproto b/feature/gribi/otg_tests/route_addition_during_failover_test/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/route_addition_during_failover_test/metadata.textproto rename to feature/gribi/otg_tests/route_addition_during_failover_test/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go b/feature/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go rename to feature/gribi/otg_tests/route_addition_during_failover_test/route_addition_during_failover_test.go diff --git a/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/README.md b/feature/gribi/otg_tests/route_removal_during_failover_test/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/route_removal_during_failover_test/README.md rename to feature/gribi/otg_tests/route_removal_during_failover_test/README.md diff --git a/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/metadata.textproto b/feature/gribi/otg_tests/route_removal_during_failover_test/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/route_removal_during_failover_test/metadata.textproto rename to feature/gribi/otg_tests/route_removal_during_failover_test/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go b/feature/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go rename to feature/gribi/otg_tests/route_removal_during_failover_test/route_removal_during_failover_test.go diff --git a/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md b/feature/gribi/otg_tests/vrf_policy_driven_te/README.md similarity index 100% rename from feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md rename to feature/gribi/otg_tests/vrf_policy_driven_te/README.md diff --git a/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/metadata.textproto b/feature/gribi/otg_tests/vrf_policy_driven_te/metadata.textproto similarity index 100% rename from feature/experimental/gribi/otg_tests/vrf_policy_driven_te/metadata.textproto rename to feature/gribi/otg_tests/vrf_policy_driven_te/metadata.textproto diff --git a/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/vrf_policy_driven_te_test.go b/feature/gribi/otg_tests/vrf_policy_driven_te/vrf_policy_driven_te_test.go similarity index 100% rename from feature/experimental/gribi/otg_tests/vrf_policy_driven_te/vrf_policy_driven_te_test.go rename to feature/gribi/otg_tests/vrf_policy_driven_te/vrf_policy_driven_te_test.go diff --git a/feature/gribi/vrf_policy_driven_te/README.md b/feature/gribi/vrf_policy_driven_te/README.md deleted file mode 100644 index 41630244a0d..00000000000 --- a/feature/gribi/vrf_policy_driven_te/README.md +++ /dev/null @@ -1,819 +0,0 @@ -# TE-17.1 VRF selection policy driven TE - -## Summary - -Test VRF selection logic involving different decapsulation and encapsulation lookup scenarios via gRIBI. - -## Topology - -ATE port-1 <------> port-1 DUT -DUT port-2 <------> port-2 ATE -DUT port-3 <------> port-3 ATE -DUT port-4 <------> port-4 ATE -DUT port-5 <------> port-5 ATE -DUT port-6 <------> port-6 ATE -DUT port-7 <------> port-7 ATE -DUT port-8 <------> port-8 ATE - -## Variables - -``` -# DSCP value that will be matched to ENCAP_TE_VRF_A -* dscp_encap_a_1 = 10 -* dscp_encap_a_2 = 18 - -# DSCP value that will be matched to ENCAP_TE_VRF_B -* dscp_encap_b_1 = 20 -* dscp_encap_b_2 = 28 - -# DSCP value that will NOT be matched to any VRF for encapsulation. -* dscp_encap_no_match = 30 - -# Magic source IP addresses used in VRF selection policy -* ipv4_outer_src_111 = 198.51.100.111 -* ipv4_outer_src_222 = 198.51.100.222 - -# Magic destination MAC address -* magic_mac = 02:00:00:00:00:01` -``` - -vrf_selection_policy_c -``` -network-instances { - network-instance { - name: DEFAULT - policy-forwarding { - policies { - policy { - policy-id: "vrf_selection_policy_c" - rules { - rule { - sequence-id: 1 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 2 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 3 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 4 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 5 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 6 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 7 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 8 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 9 - ipv4 { - protocol: 4 - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 10 - ipv4 { - protocol: 41 - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 11 - ipv4 { - protocol: 4 - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 12 - ipv4 { - protocol: 41 - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 13 - ipv4 { - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - } - action { - network-instance: "ENCAP_TE_VRF_A" - } - } - rule { - sequence-id: 14 - ipv6 { - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - } - action { - network-instance: "ENCAP_TE_VRF_A" - } - } - rule { - sequence-id: 15 - ipv4 { - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - } - action { - network-instance: "ENCAP_TE_VRF_B" - } - } - rule { - sequence-id: 16 - ipv6 { - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - } - action { - network-instance: "ENCAP_TE_VRF_B" - } - } - rule { - sequence-id: 17 - action { - network-instance: "DEFAULT" - } - } - } - } - } - } - } -} -``` - -vrf_selection_policy_w -``` -network-instances { - network-instance { - name: DEFAULT - policy-forwarding { - policies { - policy { - policy-id: "vrf_selection_policy_w" - rules { - rule { - sequence-id: 1 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 2 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 3 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 4 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_a_1, dscp_encap_a_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_A" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 5 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 6 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 7 - ipv4 { - protocol: 4 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 8 - ipv4 { - protocol: 41 - dscp-set: [dscp_encap_b_1, dscp_encap_b_2] - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "ENCAP_TE_VRF_B" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 9 - ipv4 { - protocol: 4 - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 10 - ipv4 { - protocol: 41 - source-address: "ipv4_outer_src_222" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_222" - } - } - rule { - sequence-id: 11 - ipv4 { - protocol: 4 - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 12 - ipv4 { - protocol: 41 - source-address: "ipv4_outer_src_111" - } - action { - decap-network-instance: "DECAP_TE_VRF" - post-network-instance: "DEFAULT" - decap-fallback-network-instance: "TE_VRF_111" - } - } - rule { - sequence-id: 13 - action { - network-instance: "DEFAULT" - } - } - } - } - } - } - } -} -``` - -## Baseline - -* Install the following gRIBI AFTs. - -``` -IPv4Entry {138.0.11.0/24 (ENCAP_TE_VRF_A)} -> NHG#101 (DEFAULT VRF) -> { - {NH#101, DEFAULT VRF, weight:1}, - {NH#102, DEFAULT VRF, weight:3}, - backup_next_hop_group: 200 // in case specific vendor implementation or bugs pruned the NHs. -} -IPv4Entry {138.0.11.0/24 (ENCAP_TE_VRF_B)} -> NHG#102 (DEFAULT VRF) -> { - {NH#101, DEFAULT VRF, weight:3}, - {NH#102, DEFAULT VRF, weight:1}, - backup_next_hop_group: 200 // in case specific vendor implementation or bugs pruned the NHs. -} -NH#101 -> { - encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - ip_in_ip { - dst_ip: "203.0.113.1" - src_ip: "ipv4_outer_src_111" - } - network_instance: "TE_VRF_111" -} -NH#102 -> { - encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - ip_in_ip { - dst_ip: "203.10.113.2" - src_ip: "ipv4_outer_src_111" - } - network_instance: "TE_VRF_111" -} - -NHG#200 (Default VRF) { - {NH#200, DEFAULT VRF, weight:1} -} -NH#200 -> { - network_instance: "DEFAULT" -} - -IPv4Entry {203.0.113.1/32 (TE_VRF_111)} -> NHG#1 (DEFAULT VRF) -> { - {NH#1, DEFAULT VRF, weight:1,ip_address=192.0.2.101}, - {NH#2, DEFAULT VRF, weight:3,ip_address=192.0.2.102}, - backup_next_hop_group: 1000 // re-encap to 203.0.113.100 -} -IPv4Entry {192.0.2.101/32 (DEFAULT VRF)} -> NHG#11 (DEFAULT VRF) -> { - {NH#11, DEFAULT VRF, weight:1,mac_address:magic_mac, interface-ref:dut-port-2-interface}, - {NH#12, DEFAULT VRF, weight:3,mac_address:magic_mac, interface-ref:dut-port-3-interface}, -} -IPv4Entry {192.0.2.102/32 (DEFAUlT VRF)} -> NHG#12 (DEFAULT VRF) -> { - {NH#13, DEFAULT VRF, weight:2,mac_address:magic_mac, interface-ref:dut-port-4-interface}, -} - -NHG#1000 (Default VRF) { - {NH#1000, DEFAULT VRF} -} -NH#1000 -> { - decapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - ip_in_ip { - dst_ip: "203.0.113.100" - src_ip: "ipv4_outer_src_222" - } - network_instance: "TE_VRF_222" -} - -IPv4Entry {203.0.113.100/32 (TE_VRF_222)} -> NHG#2 (DEFAULT VRF) -> { - {NH#3, DEFAULT VRF, weight:1,ip_address=192.0.2.103}, - backup_next_hop_group: 1001 // decap to DEFAULT VRF -} -IPv4Entry {192.0.2.103/32 (DEFAULT VRF)} -> NHG#13 (DEFAULT VRF) -> { - {NH#14, DEFAULT VRF, weight:1,mac_address:magic_mac, interface-ref:dut-port-5-interface}, -} -NHG#1001 (Default VRF) { - {NH#2001, DEFAULT VRF, weight:1} -} -NH#1001 -> { - decapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - network_instance: "DEFAULT" -} - -// 203.10.113.2 is the tunnel IP address. Note that the NHG#3 is different than NHG#1. - -IPv4Entry {203.10.113.2/32 (TE_VRF_111)} -> NHG#3 (DEFAULT VRF) -> { - {NH#4, DEFAULT VRF, weight:1,ip_address=192.0.2.104}, - backup_next_hop_group: 1002 // re-encap to 203.10.113.101 -} -IPv4Entry {192.0.2.104/32 (DEFAULT VRF)} -> NHG#14 (DEFAULT VRF) -> { - {NH#15, DEFAULT VRF, weight:1,mac_address:magic_mac, interface-ref:dut-port-6-interface}, -} -NHG#1002 (DEFAULT VRF) { - {NH#1002, DEFAULT VRF} -} -NH#1002 -> { - decapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - encapsulate_header: OPENCONFIGAFTTYPESENCAPSULATIONHEADERTYPE_IPV4 - ip_in_ip { - dst_ip: "203.0.113.101" - src_ip: "ipv4_outer_src_222" - } - network_instance: "TE_VRF_222" -} -IPv4Entry {203.0.113.101/32 (TE_VRF_222)} -> NHG#4 (DEFAULT VRF) -> { - {NH#5, DEFAULT VRF, weight:1,ip_address=192.0.2.103}, - backup_next_hop_group: 1001 // decap to DEFAULT VRF -} -IPv4Entry {192.0.2.103/32 (DEFAULT VRF)} -> NHG#15 (DEFAULT VRF) -> { - {NH#16, DEFAULT VRF, weight:1,mac_address:magic_mac, interface-ref:dut-port-7-interface}, -} - -``` - -* Install a BGP route resolved by ISIS in default VRF to rout traffic out of DUT port-8. - -* Install an 0/0 static route in ENCAP_VRF_A and ENCAP_VRF_B pointing to the DEFAULT VRF. - -## Procedure - -The DUT should be reset to the baseline after each of the following tests. - -#### Test-1, match on source and protocol, no match on DSCP; flow VRF_DECAP hit -> DEFAULT - -1. Using gRIBI to install the following entries in the `DECAP_TE_VRF`: - - ``` - IPv4Entry {192.51.100.1/24 (DECAP_TE_VRF)} -> NHG#1001 (DEFAULT VRF) -> { - {NH#1001, DEFAULT VRF, weight:1} - } - NH#1001 -> { - decapsulate_header: OPENCONFIGAFTTYPESDECAPSULATIONHEADERTYPE_IPV4 - } - ``` - -2. Apply vrf selection policy `vrf_selection_policy_w` to DUT port-1. - -3. Send the following 6in4 and 4in4 flows to DUT port-1: - - ``` - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_match` - * dscp: `dscp_encap_no_match` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_no_match` - * proto: `4` - - * inner_src: `ipv6_inner_src` - * inner_dst: `ipv6_inner_encap_match` - * dscp: `dscp_encap_no_match` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_no_match` - * proto: `41` - ``` - -4. Verify that the packets have their outer v4 header stripped and are forwarded out of DUT port-8 per the BGP-ISIS routes in the DEFAULT VRF. - -5. Verify that the TTL value is copied from the outer header to the inner header. - -6. Change the subnet mask from /24 and repeat the test for the masks /32, /22, and /28 and verify again that the packets are decapped and forwarded correctly. - -7. Repeat the test with packets with a destination address that does not match the decap entry, and verify that such packets are not decapped. - -#### Test-2, match on source, protocol and DSCP, VRF_DECAP hit -> VRF_ENCAP_A miss -> DEFAULT - -1. Using gRIBI to install the following entries in the `DECAP_TE_VRF`: - - ``` - IPv4Entry {192.51.100.1/24 (DECAP_TE_VRF)} -> NHG#1001 (DEFAULT VRF) -> { - {NH#1001, DEFAULT VRF, weight:1} - } - NH#1001 -> { - decapsulate_header: OPENCONFIGAFTTYPESDECAPSULATIONHEADERTYPE_IPV4 - } - ``` - -2. Apply vrf selection policy `vrf_selection_policy_w` to DUT port-1. - -3. Send the following 6in4 and 4in4 flows to DUT port-1: - - ``` - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_no_match` - * dscp: `dscp_encap_a_1` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_a_1` - * proto: `4` - - * inner_src: `ipv6_inner_src` - * inner_dst: `ipv6_inner_encap_no_match` - * dscp: `dscp_encap_a_1` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_a_1` - * proto: `41` - ``` - -4. Verify that the packets have their outer v4 header stripped and are forwarded out of DUT port-8 per the BGP-ISIS routes in the DEFAULT VRF. - -5. Verify that the TTL value is copied from the outer header to the inner header. - -6. Change the subnet mask from /24 and repeat the test for the masks /32, /22, and /28 and verify again that the packets are decapped and forwarded correctly. - -#### Test-3, Mixed Prefix Decap gRIBI Entries - -Support for decap actions with mixed prefixes installed through gRIBI - -1. Add the following gRIBI entries: - - ``` - IPv4Entry {192.51.129.0/22 (DECAP_TE_VRF)} -> NHG#1001 (DEFAULT VRF) -> { - {NH#1001, DEFAULT VRF, weight:1} - } - IPv4Entry {192.55.200.3/32 (DECAP_TE_VRF)} -> NHG#1001 (DEFAULT VRF) -> { - {NH#1001, DEFAULT VRF, weight:1} - } - - NH#1001 -> { - decapsulate_header: OPENCONFIGAFTTYPESDECAPSULATIONHEADERTYPE_IPV4 - } - ``` - -2. Apply vrf selection policy `vrf_selection_policy_w` to DUT port-1. - -3. Send the following 6in4 and 4in4 flows to DUT port-1: - - ``` - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_match` - * dscp: `dscp_encap_no_match` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `192.51.100.64` - * dscp: `dscp_encap_no_match` - * proto: `4` - - * inner_src: `ipv6_inner_src` - * inner_dst: `ipv6_inner_encap_match` - * dscp: `dscp_encap_no_match` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `192.55.200.3` - * dscp: `dscp_encap_no_match` - * proto: `41` - - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_match` - * dscp: `dscp_encap_no_match` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `192.51.128.5` - * dscp: `dscp_encap_no_match` - * proto: `4` - ``` - -4. Verify that the packets have their outer v4 header stripped, and are forwarded according to the route in the DEFAULT VRF that matches the inner IP address. - -5. Repeat the test with packets with a destination address such as that does not match the decap route, and verify that such packets are not decapped. - -#### Test-4: Tunneled traffic with no decap - -Ensures that tunneled traffic is correctly forwarded when there is no match in the DECAP_VRF. The intent of this test is to ensure that the VRF selection policy correctly sends these packets to either `TE_VRF_111` or `TE_VRF_222`. - -1. Apply vrf selection policy `vrf_selection_policy_c` to DUT port-1. -2. Send 4in4 (IP protocol 4) and 6in4 (IP protocol 41) packets to DUT port-1 where - * The outer v4 header has the destination address 203.0.113.1. - * The outer v4 header has the source address ipv4_outer_src_111. - * The outer v4 header has DSCP value has `dscp_encap_no_match` and `dscp_encap_match` -3. We should expect that all egress packets (100%) are IPinIP encapped with 203.0.113.1 as the outer header, and egress on DUT port-2, port-3, port-4 and port-6 per the hierarchical weight. -4. Send 4in4 (IP protocol 4) and 6in4 (IP protocol 41) packets to DUT port-2 where - * The outer v4 header has the destination address 203.0.113.100. - * The outer v4 header has the source address ipv4_outer_src_222. - * The outer v4 header has DSCP value has `dscp_encap_no_match` and `dscp_encap_match` -We should expect that the egress traffic are 100% encapped with 203.0.113.100 as the outer header, and egress on DUT port-5. - -#### Test-5: match on "default term", send to default VRF - -Tests support for TE disabled IPinIP IPv4 (IP protocol 4) cluster traffic arriving on WAN facing ports. Specifically, this test verifies the tunnel traffic identification using ipv4_outer_src_111 and ipv4_outer_src_222 in the VRF selection policy. - -1. Apply vrf selection policy `vrf_selection_policy_w` to DUT port-1. -2. Send 6in4 and 4in4 packets to DUT port-1, where: - * The outer v4 header has the destination address 138.0.11.8. - * The outer v4 header has the source address that’s not ipv4_outer_src_111 or ipv4_outer_src_222. For example, we can use 198.100.200.123. -3. We should expect that all egress packets: - * 100% are still IPinIP (4in4) with outer v4 destination address as `138.0.11.8`. - * and, egressed out of DUT port-8 per the route in the DEFAULT VRF. -4. Send v4 packet with protocol `17` (not 6in4 or 4in4), where: - * The outer v4 header has the destination address 138.0.11.8. - * 50% of the packets with source address as ipv4_outer_src_111. - * 50% of the packets with source address as ipv4_outer_src_222. -5. We should expect that all egress packets: - * 100% are still of protocl `17` and with outer v4 destination address as `138.0.11.8`. - * and, egressed out of DUT port-8 per the route in the DEFAULT VRF. -6. Remove the matching route (e.g. stop the BGP routes) in the DEFAULT VRF and verify that the traffic are dropped. - -#### Test-6, decap then encap - -1. Apply vrf selection policy `vrf_selection_policy_w` to DUT port-1. - -2. Send the following packets to DUT port-1: - - ``` - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_match` - * dscp: `dscp_encap_a_1` - * outter_src: `ipv4_outter_src_222` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_a_1` - * proto: `4` - ``` - - ``` - * inner_src: `ipv6_inner_src` - * inner_dst: `ipv6_inner_encap_match` - * dscp: `dscp_encap_a_1` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_a_1` - * proto: `41` - ``` - -3. We should expect that all egress packets: - - * are IPinIP encapped with outer source IP as `ipv4_outter_src_111` and dscp value `dscp_encap_a_1`. - * 1/4 are with 203.0.113.1 as the outer header destination IP. - * 3/4 are with 203.10.113.2 as the outer header destination IPs. - * egress on DUT port-2, port-3, port-4 and port-6 per the hierarchical weight. - -4. Send the following packets to DUT port -1 - - ``` - * inner_src: `ipv4_inner_src` - * inner_dst: `ipv4_inner_encap_match` - * dscp: `dscp_encap_b_1` - * outter_src: `ipv4_outter_src_111` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_b_1` - * proto: `4` - - * inner_src: `ipv6_inner_src` - * inner_dst: `ipv6_inner_encap_match` - * dscp: `dscp_encap_b_1` - * outter_src: `ipv4_outter_src_222` - * outter_dst: `ipv4_outter_decap_match` - * dscp: `dscp_encap_b_1` - * proto: `41` - ``` - -5. We should expect that all egress packets: - - * are IPinIP encapped with outer source IP as `ipv4_outter_src_111` and dscp value `dscp_encap_b_1`. - * 3/4 are with 203.0.113.1 as the outer header destination IP. - * 1/4 are with 203.10.113.2 as the outer header destination IPs. - * egress on DUT port-2, port-3, port-4 and port-6 per the hierarchical weight. - - -## Config Parameter Coverage - -* network-instances/network-instance/name -* network-instances/network-instance/policy-forwarding/policies/policy/policy-id -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/sequence-id -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/protocol -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/dscp-set -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/source-address -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/protocol -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/dscp-set -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/source-address -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/decap-network-instance -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/post-network-instance -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/decap-fallback-network-instance - -## Telemetry Parameter Coverage - -* network-instances/network-instance/name -* network-instances/network-instance/policy-forwarding/policies/policy/policy-id -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/sequence-id -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/protocol -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/dscp-set -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/source-address -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/protocol -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/dscp-set -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/source-address -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/decap-network-instance -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/post-network-instance -* network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/decap-fallback-network-instance - -## Protocol/RPC Parameter Coverage - -* gRIBI: - * Modify - * ModifyRequest - -## Required DUT platform - -vRX \ No newline at end of file diff --git a/feature/experimental/isis/otg_tests/base_adjacencies_test/README.md b/feature/isis/otg_tests/base_adjacencies_test/README.md similarity index 100% rename from feature/experimental/isis/otg_tests/base_adjacencies_test/README.md rename to feature/isis/otg_tests/base_adjacencies_test/README.md diff --git a/feature/experimental/isis/otg_tests/base_adjacencies_test/base_adjacencies_test.go b/feature/isis/otg_tests/base_adjacencies_test/base_adjacencies_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/base_adjacencies_test/base_adjacencies_test.go rename to feature/isis/otg_tests/base_adjacencies_test/base_adjacencies_test.go diff --git a/feature/experimental/isis/otg_tests/base_adjacencies_test/metadata.textproto b/feature/isis/otg_tests/base_adjacencies_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/base_adjacencies_test/metadata.textproto rename to feature/isis/otg_tests/base_adjacencies_test/metadata.textproto diff --git a/feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/README.md b/feature/isis/otg_tests/isis_change_lsp_lifetime_test/README.md similarity index 70% rename from feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/README.md rename to feature/isis/otg_tests/isis_change_lsp_lifetime_test/README.md index 02310135271..a7bd7a209cd 100644 --- a/feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/README.md +++ b/feature/isis/otg_tests/isis_change_lsp_lifetime_test/README.md @@ -23,23 +23,18 @@ * Verify that the remaining lifetime of the lsp is remaining lifetime = configured lifetime - time passed since the LSP PDU generation. * Verify that once the new LSP PDU is generated the sequence number and checksum of the new LSP PDU is updated -## Config Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/timers/config/lsp-lifetime-interval - -## Telemetry Parameter coverage - -* For prefix: - - * /network-instances/network-instance/protocols/protocol/isis/ - -* Parameters: - - * global/timers/state/lsp-lifetime-interval - * levels/level/link-state-database/lsp/state/remaining-lifetime +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/timers/config/lsp-lifetime-interval: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/timers/state/lsp-lifetime-interval: + /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/state/remaining-lifetime: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` diff --git a/feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/isis_change_lsp_lifetime_test.go b/feature/isis/otg_tests/isis_change_lsp_lifetime_test/isis_change_lsp_lifetime_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/isis_change_lsp_lifetime_test.go rename to feature/isis/otg_tests/isis_change_lsp_lifetime_test/isis_change_lsp_lifetime_test.go diff --git a/feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/metadata.textproto b/feature/isis/otg_tests/isis_change_lsp_lifetime_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_change_lsp_lifetime_test/metadata.textproto rename to feature/isis/otg_tests/isis_change_lsp_lifetime_test/metadata.textproto diff --git a/feature/experimental/isis/otg_tests/isis_drain_test/README.md b/feature/isis/otg_tests/isis_drain_test/README.md similarity index 84% rename from feature/experimental/isis/otg_tests/isis_drain_test/README.md rename to feature/isis/otg_tests/isis_drain_test/README.md index 8c2bf143e5f..67410a03579 100644 --- a/feature/experimental/isis/otg_tests/isis_drain_test/README.md +++ b/feature/isis/otg_tests/isis_drain_test/README.md @@ -12,15 +12,13 @@ Ensure that IS-IS metric change can drain traffic from a DUT trunk interface * Change the ISIS metric of trunk-2 to 1000 value. Validate that 100% of the traffic is going out of only trunk-3 and there is no traffic loss. * Revert back the ISIS metric on trunk-2. Validate that the traffic is going via both trunk-2 and trunk-3, and there is no traffic loss. -## Config Parameter Coverage - -## Telemetry Parameter Coverage - -## Protocol/RPC Parameter Coverage - -* IS-IS - * LSP - * TLV 22 metric field. +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT Platform Requirement diff --git a/feature/experimental/isis/otg_tests/isis_drain_test/isis_drain_test.go b/feature/isis/otg_tests/isis_drain_test/isis_drain_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_drain_test/isis_drain_test.go rename to feature/isis/otg_tests/isis_drain_test/isis_drain_test.go diff --git a/feature/experimental/isis/otg_tests/isis_drain_test/metadata.textproto b/feature/isis/otg_tests/isis_drain_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_drain_test/metadata.textproto rename to feature/isis/otg_tests/isis_drain_test/metadata.textproto diff --git a/feature/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md b/feature/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md new file mode 100644 index 00000000000..7448bf4d1b8 --- /dev/null +++ b/feature/isis/otg_tests/isis_interface_hello_padding_enable_test/README.md @@ -0,0 +1,92 @@ +# RT-2.6: IS-IS Hello-Padding enabled at interface level + +## Summary + +* Base IS-IS functionality and adjacency establishment. +* Verifies isis adjacency by changing MTU. + +## Procedure + +* Configure IS-IS for ATE port-1 and DUT port-1. +* Configure DUT with global hello-padding enabled. +* Ensure that adjacencies are established with: + * Interface level hello padding is enabled. + * Verify that IPv4 and IPv6 IS-ISIS adjacency comes up fine. + * Verify the output of ST path displaying the status of ISIS hello padding. + * If we change the MTU on either side, then adjacency should not come up. + * Verify that IPv4 and IPv6 prefixes that are advertised by ATE correctly installed into DUTs route and forwarding table. + * TODO-Verify the Hellos are sent with Padding during adjacency turn-up if the padding is enabled adaptively/sometimes. + * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. + +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/config/authentication-check: + /network-instances/network-instance/protocols/protocol/isis/global/config/net: + /network-instances/network-instance/protocols/protocol/isis/global/config/level-capability: + /network-instances/network-instance/protocols/protocol/isis/global/config/hello-padding: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/interface-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/csnp-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/lsp-pacing-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-multiplier: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/safi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/enabled: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/state/hello-padding: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/state/hello-padding: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/area-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/priority: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/safi-name: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-type-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/corrupted-lsps: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/database-overloads: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/exceed-max-seq-nums: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/id-len-mismatch: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/lsp-errors: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/manual-address-drop-from-areas: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/max-area-address-mismatches: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/own-lsp-purges: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/part-changes: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/seq-num-skips: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/spf-runs: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` \ No newline at end of file diff --git a/feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/isis_interface_hello_padding_enable_test.go b/feature/isis/otg_tests/isis_interface_hello_padding_enable_test/isis_interface_hello_padding_enable_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/isis_interface_hello_padding_enable_test.go rename to feature/isis/otg_tests/isis_interface_hello_padding_enable_test/isis_interface_hello_padding_enable_test.go diff --git a/feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/metadata.textproto b/feature/isis/otg_tests/isis_interface_hello_padding_enable_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_hello_padding_enable_test/metadata.textproto rename to feature/isis/otg_tests/isis_interface_hello_padding_enable_test/metadata.textproto diff --git a/feature/isis/otg_tests/isis_interface_level_passive_test/README.md b/feature/isis/otg_tests/isis_interface_level_passive_test/README.md new file mode 100644 index 00000000000..b0d7374a153 --- /dev/null +++ b/feature/isis/otg_tests/isis_interface_level_passive_test/README.md @@ -0,0 +1,95 @@ +# RT-2.11: IS-IS Passive is enabled at the area level + +## Summary + +* Verify isis adjacency with passive enabled under level. + +## Topology + +* ATE:port1 <-> port1:DUT:port2 <-> ATE:port2 + +## Procedure + +* Configure IS-IS for ATE port-1 and DUT port-1. +* Configure DUT interface with IS-IS passive configured at area level 2. + * Verify that IS-IS adjacency is not coming up in level-2 area for IPv4 and IPV6 address families. +* Undo the IS-IS passive configuration under level 2 + * Verify that IS-IS adjacency for IPv4 and IPV6 address families are coming up in the level-2 area. + * Verify that IPv4 and IPv6 prefixes that are advertised by ATE are correctly installed into DUTs route and forwarding table. + * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. + * TODO-Verify the output of ST path displaying the interface as passive in ISIS database/adj table + +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/config/authentication-check: + /network-instances/network-instance/protocols/protocol/isis/global/config/net: + /network-instances/network-instance/protocols/protocol/isis/global/config/level-capability: + /network-instances/network-instance/protocols/protocol/isis/global/config/hello-padding: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/interface-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/csnp-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/lsp-pacing-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-multiplier: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/safi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/enabled: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/state/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/state/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/area-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/priority: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/safi-name: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-type-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/corrupted-lsps: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/database-overloads: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/exceed-max-seq-nums: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/id-len-mismatch: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/lsp-errors: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/manual-address-drop-from-areas: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/max-area-address-mismatches: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/own-lsp-purges: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/part-changes: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/seq-num-skips: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/spf-runs: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` \ No newline at end of file diff --git a/feature/experimental/isis/otg_tests/isis_interface_level_passive_test/isis_interface_level_passive_test.go b/feature/isis/otg_tests/isis_interface_level_passive_test/isis_interface_level_passive_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_level_passive_test/isis_interface_level_passive_test.go rename to feature/isis/otg_tests/isis_interface_level_passive_test/isis_interface_level_passive_test.go diff --git a/feature/experimental/isis/otg_tests/isis_interface_level_passive_test/metadata.textproto b/feature/isis/otg_tests/isis_interface_level_passive_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_level_passive_test/metadata.textproto rename to feature/isis/otg_tests/isis_interface_level_passive_test/metadata.textproto diff --git a/feature/experimental/isis/otg_tests/isis_interface_passive_test/README.md b/feature/isis/otg_tests/isis_interface_passive_test/README.md similarity index 99% rename from feature/experimental/isis/otg_tests/isis_interface_passive_test/README.md rename to feature/isis/otg_tests/isis_interface_passive_test/README.md index cd87a3ba503..bf600ec87b0 100644 --- a/feature/experimental/isis/otg_tests/isis_interface_passive_test/README.md +++ b/feature/isis/otg_tests/isis_interface_passive_test/README.md @@ -76,7 +76,7 @@ paths: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/exceed-max-seq-nums: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/id-len-mismatch: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/lsp-errors: -/network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/manual-address-drop-from-area : +/network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/manual-address-drop-from-areas: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/max-area-address-mismatches: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/own-lsp-purges: /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/part-changes : diff --git a/feature/experimental/isis/otg_tests/isis_interface_passive_test/isis_interface_passive_test.go b/feature/isis/otg_tests/isis_interface_passive_test/isis_interface_passive_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_passive_test/isis_interface_passive_test.go rename to feature/isis/otg_tests/isis_interface_passive_test/isis_interface_passive_test.go diff --git a/feature/experimental/isis/otg_tests/isis_interface_passive_test/metadata.textproto b/feature/isis/otg_tests/isis_interface_passive_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_interface_passive_test/metadata.textproto rename to feature/isis/otg_tests/isis_interface_passive_test/metadata.textproto diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/README.md b/feature/isis/otg_tests/isis_metric_style_wide_enabled_test/README.md similarity index 100% rename from feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/README.md rename to feature/isis/otg_tests/isis_metric_style_wide_enabled_test/README.md diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/isis_metric_style_wide_enabled_test.go b/feature/isis/otg_tests/isis_metric_style_wide_enabled_test/isis_metric_style_wide_enabled_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/isis_metric_style_wide_enabled_test.go rename to feature/isis/otg_tests/isis_metric_style_wide_enabled_test/isis_metric_style_wide_enabled_test.go diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/metadata.textproto b/feature/isis/otg_tests/isis_metric_style_wide_enabled_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_metric_style_wide_enabled_test/metadata.textproto rename to feature/isis/otg_tests/isis_metric_style_wide_enabled_test/metadata.textproto diff --git a/feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md b/feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md new file mode 100644 index 00000000000..49fa92ad9b2 --- /dev/null +++ b/feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/README.md @@ -0,0 +1,94 @@ +# RT-2.8: IS-IS metric style wide not enabled + +## Summary + +* Base IS-IS functionality and adjacency establishment. +* Verifies route metric with wide metric disabled on DUT. + +## Procedure + +* TestISISWideMetricNotEnabled + + * Configure IS-IS for ATE port-1 and DUT port-1. + * Do not configure metric style wide under the area level. + * Enable wide metric style on ATE. + * Advertise ISIS prefixes from ATE with wide metrics (value > 63). + * Verify that IS-IS adjacency for IPv4 and IPV6 address family is coming up. + * Verify that IPv4 and IPv6 prefixes that are advertised by ATE correctly installed into DUTs route and forwarding table. + * TODO-Verify that the metrics of the IPv4 and IPv6 prefixes is 63. + * Ensure that IPv4 and IPv6 prefixes that are advertised as part of an (emulated) neighboring system are installed into the DUT routing table, and validate that packets are sent and received to them. + +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/config/authentication-check: + /network-instances/network-instance/protocols/protocol/isis/global/config/net: + /network-instances/network-instance/protocols/protocol/isis/global/config/level-capability: + /network-instances/network-instance/protocols/protocol/isis/global/config/hello-padding: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/metric-style: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/interface-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/csnp-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config/lsp-pacing-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/level-number: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/passive: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-interval: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello-multiplier: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-mode: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-password: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/auth-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/safi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config/enabled: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/levels/level/state/metric-style: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv4-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-ipv6-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/area-address: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/local-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/multi-topology: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-circuit-type: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-extended-circuit-id: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor-snpa: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/priority: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-status: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-support: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart-suppress: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/afi-name: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/safi-name: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/auth-type-fails: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/corrupted-lsps: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/database-overloads: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/exceed-max-seq-nums: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/id-len-mismatch: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/lsp-errors: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/manual-address-drop-from-areas: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/max-area-address-mismatches: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/own-lsp-purges: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/part-changes: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/seq-num-skips: + /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/spf-runs: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` \ No newline at end of file diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/isis_metric_style_wide_not_enabled_test.go b/feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/isis_metric_style_wide_not_enabled_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/isis_metric_style_wide_not_enabled_test.go rename to feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/isis_metric_style_wide_not_enabled_test.go diff --git a/feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/metadata.textproto b/feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/isis_metric_style_wide_not_enabled_test/metadata.textproto rename to feature/isis/otg_tests/isis_metric_style_wide_not_enabled_test/metadata.textproto diff --git a/feature/experimental/isis/otg_tests/lsp_updates_test/README.md b/feature/isis/otg_tests/lsp_updates_test/README.md similarity index 58% rename from feature/experimental/isis/otg_tests/lsp_updates_test/README.md rename to feature/isis/otg_tests/lsp_updates_test/README.md index d207d7c482a..b1f4c16e5bc 100644 --- a/feature/experimental/isis/otg_tests/lsp_updates_test/README.md +++ b/feature/isis/otg_tests/lsp_updates_test/README.md @@ -20,26 +20,21 @@ Ensure that IS-IS updates reflect parameter changes on DUT. port via configuration, update value in configuration, and ensure that ATE and DUT telemetry reflects the change. -## Config Parameter Coverage - -For prefix: /network-instances/network-instance/protocols/protocol/isis/ - -Parameters: - -* global/lsp-bit/overload-bit/config/set-bit - -## Telemetry Parameter Coverage - -* /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric - -* /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/state/set-bit - -## Protocol/RPC Parameter Coverage - -* IS-IS - * LSP - * Flags - overload bit (5) - * TLV 22 metric field. +## OpenConfig Path and RPC Coverage +```yaml +paths: + ## Config Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/config/set-bit: + + ## Telemetry Parameter Coverage + /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/state/set-bit: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state/metric: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT Platform Requirement diff --git a/feature/experimental/isis/otg_tests/lsp_updates_test/lsp_updates_test.go b/feature/isis/otg_tests/lsp_updates_test/lsp_updates_test.go similarity index 100% rename from feature/experimental/isis/otg_tests/lsp_updates_test/lsp_updates_test.go rename to feature/isis/otg_tests/lsp_updates_test/lsp_updates_test.go diff --git a/feature/experimental/isis/otg_tests/lsp_updates_test/metadata.textproto b/feature/isis/otg_tests/lsp_updates_test/metadata.textproto similarity index 100% rename from feature/experimental/isis/otg_tests/lsp_updates_test/metadata.textproto rename to feature/isis/otg_tests/lsp_updates_test/metadata.textproto diff --git a/feature/experimental/p4rt/README.md b/feature/p4rt/README.md similarity index 94% rename from feature/experimental/p4rt/README.md rename to feature/p4rt/README.md index a2dc5701736..3acc900e9fc 100644 --- a/feature/experimental/p4rt/README.md +++ b/feature/p4rt/README.md @@ -52,9 +52,9 @@ This document specifies the requirements for p4rt test implementation. `p4rtutils.P4RTNodesByPort()`. ## OpenConfig Path and RPC Coverage - -The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. - ```yaml - +rpcs: + gnmi: + gNMI.Set: + gNMI.Subscribe: ``` diff --git a/feature/experimental/p4rt/otg_tests/base_p4rt/README.md b/feature/p4rt/otg_tests/base_p4rt/README.md similarity index 73% rename from feature/experimental/p4rt/otg_tests/base_p4rt/README.md rename to feature/p4rt/otg_tests/base_p4rt/README.md index e4ca8068fb1..e690e261459 100644 --- a/feature/experimental/p4rt/otg_tests/base_p4rt/README.md +++ b/feature/p4rt/otg_tests/base_p4rt/README.md @@ -24,19 +24,16 @@ Validate that the P4RT server can accept basic configuration and Read/Write RPCs * Repeat the same steps for another FAP and verify the Table entries. - -## Config Parameter Coverage - -* /components/component/integrated-circuit/config/node-id -* /interfaces/interface/config/id - - -## Telemetry Parameter coverage - -No new telemetry covered. - - -## Protocol/RPC Parameter coverage - -No new Protocol/RPC covered. +## OpenConfig Path and RPC Coverage +```yaml +paths: + /components/component/integrated-circuit/config/node-id: + platform_type: ["INTEGRATED_CIRCUIT"] + /interfaces/interface/config/id: +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go b/feature/p4rt/otg_tests/base_p4rt/base_p4rt_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/base_p4rt/base_p4rt_test.go rename to feature/p4rt/otg_tests/base_p4rt/base_p4rt_test.go diff --git a/feature/experimental/p4rt/otg_tests/base_p4rt/metadata.textproto b/feature/p4rt/otg_tests/base_p4rt/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/base_p4rt/metadata.textproto rename to feature/p4rt/otg_tests/base_p4rt/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md b/feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md similarity index 86% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md rename to feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md index a5bffb0cdd9..8c5f6f83043 100644 --- a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md +++ b/feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md @@ -14,13 +14,14 @@ Verify that GDP packets are punted with correct metadata. * Verify that the packet has the ingress_singleton_port metadata set and it corresponds to the interface ID of the port that the packet was received on. -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go b/feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go rename to feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/google_discovery_protocol_packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/metadata.textproto b/feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/metadata.textproto rename to feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/README.md b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/README.md similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/README.md rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/README.md diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/google_discovery_protocol_packetout_lag_test.go b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/google_discovery_protocol_packetout_lag_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/google_discovery_protocol_packetout_lag_test.go rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/google_discovery_protocol_packetout_lag_test.go diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/metadata.textproto b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/metadata.textproto rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_lag_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md similarity index 87% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md index 8d6fd5b5870..d1ba03f1f5b 100644 --- a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md +++ b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md @@ -15,15 +15,14 @@ Verify that GDP packets can be sent by the controller. * Repeat sending the packet in the same way but from the secondary connection. * Verify that the packet is not received on the ATE. - - -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/google_discovery_protocol_packetout_test.go diff --git a/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/metadata.textproto b/feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/metadata.textproto rename to feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/README.md b/feature/p4rt/otg_tests/lldp_packetin_test/README.md similarity index 85% rename from feature/experimental/p4rt/otg_tests/lldp_packetin_test/README.md rename to feature/p4rt/otg_tests/lldp_packetin_test/README.md index 4af42c8c091..e3398a89860 100644 --- a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/README.md +++ b/feature/p4rt/otg_tests/lldp_packetin_test/README.md @@ -13,15 +13,14 @@ Verify that LLDP packets are punted with correct metadata. * Send an LLDP packet from the ATE and verify that it is received by the client. * Verify that the packet has the ingress_singleton_port metadata set and it corresponds to the interface ID of the port that the packet was received on. - - -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go b/feature/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go rename to feature/p4rt/otg_tests/lldp_packetin_test/lldp_packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetin_test/metadata.textproto b/feature/p4rt/otg_tests/lldp_packetin_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/lldp_packetin_test/metadata.textproto rename to feature/p4rt/otg_tests/lldp_packetin_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/README.md b/feature/p4rt/otg_tests/lldp_packetout_test/README.md similarity index 80% rename from feature/experimental/p4rt/otg_tests/lldp_packetout_test/README.md rename to feature/p4rt/otg_tests/lldp_packetout_test/README.md index ec9b4d9d73a..97616953d12 100644 --- a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/README.md +++ b/feature/p4rt/otg_tests/lldp_packetout_test/README.md @@ -13,17 +13,13 @@ Verify that LLDP packets can be sent by the controller. * Send an LLDP packet from the client with egress_singleton_port set to one of the connected interfaces. * Verify that the LLDP packet is received on the ATE port connected to the indicated interface. - - - -## Config Parameter coverage - -No new configuration covered. - -## Telemetry Parameter coverage - -No new telemetry covered. - -## Minimum DUT platform requirement +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` vRX if the vendor implementation supports FIB-ACK simulation, otherwise FFF. \ No newline at end of file diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go b/feature/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go rename to feature/p4rt/otg_tests/lldp_packetout_test/lldp_packetout_test.go diff --git a/feature/experimental/p4rt/otg_tests/lldp_packetout_test/metadata.textproto b/feature/p4rt/otg_tests/lldp_packetout_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/lldp_packetout_test/metadata.textproto rename to feature/p4rt/otg_tests/lldp_packetout_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/performance_test/README.md b/feature/p4rt/otg_tests/performance_test/README.md similarity index 73% rename from feature/experimental/p4rt/otg_tests/performance_test/README.md rename to feature/p4rt/otg_tests/performance_test/README.md index 470f6c467be..fb7d6b31e32 100644 --- a/feature/experimental/p4rt/otg_tests/performance_test/README.md +++ b/feature/p4rt/otg_tests/performance_test/README.md @@ -15,21 +15,18 @@ Verify that both Packetin and Packetout traffic is handled by the P4RT server at * Setup packetout packets for GDP, LLDP and traceroute from the P4RT client. * Start both packetin and packetout traffic at the same rate simultaneously. * Verify no packetloss for both directions of traffic. -* Verify the metadata ID and the value for all three traffic types on the P4RT client for packetin. - - -## Config Parameter coverage - -* /components/component/integrated-circuit/config/node-id -* /interfaces/interface/config/id - - -## Telemetry Parameter coverage - -No new telemetry covered. - - -## Protocol/RPC Parameter coverage - -No new Protocol/RPC covered. +* Verify the metadata ID and the value for all three traffic types on the P4RT client for packetin. + +## OpenConfig Path and RPC Coverage +```yaml +paths: + /components/component/integrated-circuit/config/node-id: + platform_type: ["INTEGRATED_CIRCUIT"] + /interfaces/interface/config/id: +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/p4rt/otg_tests/performance_test/metadata.textproto b/feature/p4rt/otg_tests/performance_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/performance_test/metadata.textproto rename to feature/p4rt/otg_tests/performance_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/performance_test/performance_test.go b/feature/p4rt/otg_tests/performance_test/performance_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/performance_test/performance_test.go rename to feature/p4rt/otg_tests/performance_test/performance_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/README.md b/feature/p4rt/otg_tests/traceroute_packetin_test/README.md similarity index 73% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_test/README.md rename to feature/p4rt/otg_tests/traceroute_packetin_test/README.md index 8a69af7d868..0aee47016e4 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/README.md +++ b/feature/p4rt/otg_tests/traceroute_packetin_test/README.md @@ -16,19 +16,15 @@ Verify that Traceroute packets are punted with correct metadata. * Send IPv6 packets from the ATE with HopLimit=1 and verify that packets with HopLimit=1 are received by the client. * Verify that the packets have both ingress_singleton_port and egress_singleton_port metadata set. - -## Config Parameter coverage - -* /components/component/integrated-circuit/config/node-id -* /interfaces/interface/config/id - - -## Telemetry Parameter coverage - -No new telemetry covered. - - -## Protocol/RPC Parameter coverage - -No new Protocol/RPC covered. - +## OpenConfig Path and RPC Coverage +```yaml +paths: + /components/component/integrated-circuit/config/node-id: + platform_type: ["INTEGRATED_CIRCUIT"] + /interfaces/interface/config/id: +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/metadata.textproto b/feature/p4rt/otg_tests/traceroute_packetin_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_test/metadata.textproto rename to feature/p4rt/otg_tests/traceroute_packetin_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go b/feature/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go rename to feature/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go b/feature/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go rename to feature/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md similarity index 98% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md rename to feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md index d15347dad27..ec980072fd7 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md +++ b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/README.md @@ -17,7 +17,7 @@ DUT port-8 <------> port-8 ATE ## Baseline setup -* Setup equivalent to [TE-17.1 vrf_policy_driven_te](https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md), including GRibi programming. +* Setup equivalent to [TE-17.1 vrf_policy_driven_te](https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/vrf_policy_driven_te/README.md), including GRibi programming. * Install a BGP route resolved by ISIS in default VRF to route traffic out of DUT port-8 for 203.0.113.0. diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/metadata.textproto b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/metadata.textproto rename to feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/packetin_test.go b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/packetin_test.go rename to feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_test.go b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_test.go rename to feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_with_vrf_selection_test.go b/feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_with_vrf_selection_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_with_vrf_selection_test.go rename to feature/p4rt/otg_tests/traceroute_packetin_with_vrf_selection_test/traceroute_packetin_with_vrf_selection_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/README.md b/feature/p4rt/otg_tests/traceroute_packetout_test/README.md similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetout_test/README.md rename to feature/p4rt/otg_tests/traceroute_packetout_test/README.md diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/metadata.textproto b/feature/p4rt/otg_tests/traceroute_packetout_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetout_test/metadata.textproto rename to feature/p4rt/otg_tests/traceroute_packetout_test/metadata.textproto diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/packetout_test.go b/feature/p4rt/otg_tests/traceroute_packetout_test/packetout_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetout_test/packetout_test.go rename to feature/p4rt/otg_tests/traceroute_packetout_test/packetout_test.go diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go b/feature/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go similarity index 100% rename from feature/experimental/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go rename to feature/p4rt/otg_tests/traceroute_packetout_test/traceroute_packetout_test.go diff --git a/feature/experimental/p4rt/tests/metadata_validation_test/README.md b/feature/p4rt/tests/metadata_validation_test/README.md similarity index 81% rename from feature/experimental/p4rt/tests/metadata_validation_test/README.md rename to feature/p4rt/tests/metadata_validation_test/README.md index 8ad072ab172..8a311ea7d05 100644 --- a/feature/experimental/p4rt/tests/metadata_validation_test/README.md +++ b/feature/p4rt/tests/metadata_validation_test/README.md @@ -23,3 +23,16 @@ Validate the P4RT server handles Metadata set in Table Entry correctly. ## Notes * [P4RT Proto](https://github.com/p4lang/p4runtime/blob/main/proto/p4/v1/p4runtime.proto) + +## OpenConfig Path and RPC Coverage +```yaml +paths: + /components/component/integrated-circuit/config/node-id: + platform_type: ["INTEGRATED_CIRCUIT"] + /interfaces/interface/config/id: +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/p4rt/tests/metadata_validation_test/metadata.textproto b/feature/p4rt/tests/metadata_validation_test/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/tests/metadata_validation_test/metadata.textproto rename to feature/p4rt/tests/metadata_validation_test/metadata.textproto diff --git a/feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go b/feature/p4rt/tests/metadata_validation_test/metadata_validation_test.go similarity index 100% rename from feature/experimental/p4rt/tests/metadata_validation_test/metadata_validation_test.go rename to feature/p4rt/tests/metadata_validation_test/metadata_validation_test.go diff --git a/feature/experimental/p4rt/tests/p4rt_election/README.md b/feature/p4rt/tests/p4rt_election/README.md similarity index 96% rename from feature/experimental/p4rt/tests/p4rt_election/README.md rename to feature/p4rt/tests/p4rt_election/README.md index 5b77cea3ccf..9226182e9e4 100644 --- a/feature/experimental/p4rt/tests/p4rt_election/README.md +++ b/feature/p4rt/tests/p4rt_election/README.md @@ -106,3 +106,16 @@ Validate the P4RT server handles primary election and failover. writes for clients with `election_id=9` & `election_id=10`. * TODO: Enable P4RT on an additional FAP and verify that the same set of scenarios work independently of the first FAP + +## OpenConfig Path and RPC Coverage +```yaml +paths: + /components/component/integrated-circuit/config/node-id: + platform_type: ["INTEGRATED_CIRCUIT"] + /interfaces/interface/config/id: +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: +``` diff --git a/feature/experimental/p4rt/tests/p4rt_election/metadata.textproto b/feature/p4rt/tests/p4rt_election/metadata.textproto similarity index 100% rename from feature/experimental/p4rt/tests/p4rt_election/metadata.textproto rename to feature/p4rt/tests/p4rt_election/metadata.textproto diff --git a/feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go b/feature/p4rt/tests/p4rt_election/p4rt_election_test.go similarity index 100% rename from feature/experimental/p4rt/tests/p4rt_election/p4rt_election_test.go rename to feature/p4rt/tests/p4rt_election/p4rt_election_test.go diff --git a/feature/experimental/p4rt/wbb.p4info.pb.txt b/feature/p4rt/wbb.p4info.pb.txt similarity index 100% rename from feature/experimental/p4rt/wbb.p4info.pb.txt rename to feature/p4rt/wbb.p4info.pb.txt diff --git a/feature/experimental/policy/otg_tests/prefix_set_test/README.md b/feature/policy_forwarding/otg_tests/prefix_set_test/README.md similarity index 100% rename from feature/experimental/policy/otg_tests/prefix_set_test/README.md rename to feature/policy_forwarding/otg_tests/prefix_set_test/README.md diff --git a/feature/experimental/policy/otg_tests/prefix_set_test/metadata.textproto b/feature/policy_forwarding/otg_tests/prefix_set_test/metadata.textproto similarity index 100% rename from feature/experimental/policy/otg_tests/prefix_set_test/metadata.textproto rename to feature/policy_forwarding/otg_tests/prefix_set_test/metadata.textproto diff --git a/feature/experimental/policy/otg_tests/prefix_set_test/prefix_set_test.go b/feature/policy_forwarding/otg_tests/prefix_set_test/prefix_set_test.go similarity index 100% rename from feature/experimental/policy/otg_tests/prefix_set_test/prefix_set_test.go rename to feature/policy_forwarding/otg_tests/prefix_set_test/prefix_set_test.go diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/README.md b/feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/README.md similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/README.md rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/README.md diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/base_vrf_selection_test.go b/feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/base_vrf_selection_test.go similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/base_vrf_selection_test.go rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/base_vrf_selection_test.go diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/metadata.textproto b/feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/metadata.textproto similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/base_vrf_selection/metadata.textproto rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/metadata.textproto diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md b/feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/metadata.textproto b/feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/metadata.textproto similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/metadata.textproto rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/metadata.textproto diff --git a/feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/protocol_dscp_rules_for_vrf_selection_test.go b/feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/protocol_dscp_rules_for_vrf_selection_test.go similarity index 100% rename from feature/experimental/policy/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/protocol_dscp_rules_for_vrf_selection_test.go rename to feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/protocol_dscp_rules_for_vrf_selection_test.go diff --git a/feature/experimental/replay/tests/diff_command_trees/README.md b/feature/replay/tests/diff_command_trees/README.md similarity index 62% rename from feature/experimental/replay/tests/diff_command_trees/README.md rename to feature/replay/tests/diff_command_trees/README.md index 91720b7d422..61ddc439b53 100644 --- a/feature/experimental/replay/tests/diff_command_trees/README.md +++ b/feature/replay/tests/diff_command_trees/README.md @@ -7,3 +7,17 @@ diff the command trees" error when applying certain gNMI config on Arista devices. At this time, no vendor is expected to run this test. + +## OpenConfig Path and RPC Coverage + +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` diff --git a/feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go b/feature/replay/tests/diff_command_trees/diff_command_trees_test.go similarity index 100% rename from feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go rename to feature/replay/tests/diff_command_trees/diff_command_trees_test.go diff --git a/feature/experimental/replay/tests/diff_command_trees/metadata.textproto b/feature/replay/tests/diff_command_trees/metadata.textproto similarity index 100% rename from feature/experimental/replay/tests/diff_command_trees/metadata.textproto rename to feature/replay/tests/diff_command_trees/metadata.textproto diff --git a/feature/experimental/replay/tests/p4rt_replay/README.md b/feature/replay/tests/p4rt_replay/README.md similarity index 54% rename from feature/experimental/replay/tests/p4rt_replay/README.md rename to feature/replay/tests/p4rt_replay/README.md index 6861b35f9cb..f23fe835e7e 100644 --- a/feature/experimental/replay/tests/p4rt_replay/README.md +++ b/feature/replay/tests/p4rt_replay/README.md @@ -6,3 +6,17 @@ This is an example record/replay test. It is meant to reproduce an error when replaying P4RT messages. At this time, no vendor is expected to run this test. + +## OpenConfig Path and RPC Coverage + +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` diff --git a/feature/experimental/replay/tests/p4rt_replay/metadata.textproto b/feature/replay/tests/p4rt_replay/metadata.textproto similarity index 100% rename from feature/experimental/replay/tests/p4rt_replay/metadata.textproto rename to feature/replay/tests/p4rt_replay/metadata.textproto diff --git a/feature/experimental/replay/tests/p4rt_replay/p4rt_replay_test.go b/feature/replay/tests/p4rt_replay/p4rt_replay_test.go similarity index 100% rename from feature/experimental/replay/tests/p4rt_replay/p4rt_replay_test.go rename to feature/replay/tests/p4rt_replay/p4rt_replay_test.go diff --git a/feature/replay/tests/presession_test/README.md b/feature/replay/tests/presession_test/README.md new file mode 100644 index 00000000000..f1528f687b0 --- /dev/null +++ b/feature/replay/tests/presession_test/README.md @@ -0,0 +1,20 @@ +# Replay-1.0: Record/replay presession test + +## Summary + +This is an example record/replay test. +At this time, no vendor is expected to run this test. + +## OpenConfig Path and RPC Coverage + +```yaml +rpcs: + gnmi: + gNMI.Get: + gNMI.Set: + gNMI.Subscribe: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` diff --git a/feature/experimental/replay/tests/presession_test/metadata.textproto b/feature/replay/tests/presession_test/metadata.textproto similarity index 100% rename from feature/experimental/replay/tests/presession_test/metadata.textproto rename to feature/replay/tests/presession_test/metadata.textproto diff --git a/feature/experimental/replay/tests/presession_test/presession_test.go b/feature/replay/tests/presession_test/presession_test.go similarity index 100% rename from feature/experimental/replay/tests/presession_test/presession_test.go rename to feature/replay/tests/presession_test/presession_test.go diff --git a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md b/feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md similarity index 91% rename from feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md rename to feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md index 4515b12bb87..f1e22c2734e 100644 --- a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md +++ b/feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/README.md @@ -25,17 +25,13 @@ and gRPC connections. * Ensure gNMI set/get requests are denied with incorrect login or incorrect password. -## Config Parameter coverage - -N/A - -## Telemetry Parameter coverage - -N/A - -## Protocol/RPC Parameter coverage - -N/A +## OpenConfig Path and RPC Coverage +```yaml +rpcs: + gnmi: + gNMI.Set: + gNMI.Subscribe: +``` ## Minimum DUT platform requirement diff --git a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/metadata.textproto b/feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/metadata.textproto similarity index 100% rename from feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/metadata.textproto rename to feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/metadata.textproto diff --git a/feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go b/feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go similarity index 100% rename from feature/experimental/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go rename to feature/security/aaa/kne_tests/tls_authentication_over_grpc_test/tls_authentication_over_grpc_test.go diff --git a/testregistry.textproto b/testregistry.textproto index 5711ed23b9f..e501eac1cad 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -277,7 +277,7 @@ test: { test: { id: "Health-1.1" description: "Generic Health Check" - readme: "https://github.com/openconfig/featureprofiles/blob/d26ac7fac5406af29c9a582b8d8ee73d56953e3b/feature/experimental/system/health/tests/system_generic_health_check/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/system/health/tests/system_generic_health_check/README.md" exec: " " } test: { @@ -336,7 +336,7 @@ test: { } test: { id: "P4RT-1.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/base_p4rt/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/base_p4rt/README.md" } test: { id: "P4RT-1.2" @@ -344,39 +344,39 @@ test: { } test: { id: "P4RT-2.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/tests/p4rt_election/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/tests/p4rt_election/README.md" } test: { id: "P4RT-2.2" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/tests/metadata_validation_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/tests/metadata_validation_test/README.md" } test: { id: "P4RT-3.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/google_discovery_protocol_packetin_test/README.md" } test: { id: "P4RT-3.2" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/google_discovery_protocol_packetout_test/README.md" } test: { id: "P4RT-5.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/traceroute_packetin_test/README.md" } test: { id: "P4RT-5.2" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/traceroute_packetout_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/traceroute_packetout_test/README.md" } test: { id: "P4RT-6.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/performance_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/performance_test/README.md" } test: { id: "P4RT-7.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/lldp_packetin_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/lldp_packetin_test/README.md" } test: { id: "P4RT-7.2" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/p4rt/otg_tests/lldp_packetout_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/p4rt/otg_tests/lldp_packetout_test/README.md" } test: { id: "PF-1.1" @@ -411,7 +411,7 @@ test: { test: { id: "PLT-1.1" description: "Interface breakout Test" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/platform/tests/breakout_configuration/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/platform/tests/breakout_configuration/README.md" exec: " " } test: { @@ -466,13 +466,13 @@ test: { test: { id: "RT-1.11" description: "RT-1.11: BGP remove private AS" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/bgp/ate_tests/bgp_remove_private_as/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_remove_private_as/README.md" exec: " " } test: { id: "RT-1.12" description: "RT-1.12: BGP always compare MED" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/bgp/ate_tests/bgp_always_compare_med/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_always_compare_med/README.md" exec: " " } test: { @@ -514,7 +514,7 @@ test: { test: { id: "RT-1.19" description: "BGP 2-Byte and 4-Byte ASN support" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_2byte_4byte_asn/README.md" exec: " " } test: { @@ -538,7 +538,7 @@ test: { test: { id: "RT-1.24" description: "BGP 2-byte and 4-byte ASN support with policy" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/bgp_2byte_4byte_asn_policy_test/README.md" exec: " " } test: { @@ -620,7 +620,7 @@ test: { test: { id: "RT-1.53" description: "Prefix-set test" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/policy/prefix_set/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/policy_forwarding/otg_tests/prefix_set_test/README.md" exec: " " } test: { @@ -697,13 +697,13 @@ test: { test: { id: "RT-2.14" description: "ISIS Drain Test" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/isis/otg_tests/isis_drain_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/isis/otg_tests/isis_drain_test/README.md" exec: " " } test: { id: "RT-2.2" description: "IS-IS LSP Updates" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/isis/otg_tests/lsp_updates_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/isis/otg_tests/lsp_updates_test/README.md" } test: { id: "RT-2.6" @@ -732,13 +732,13 @@ test: { test: { id: "RT-3.1" description: "Policy based VRF selection base" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/policy/policy_vrf_selection/ate_tests/base_vrf_selection/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/policy_forwarding/policy_vrf_selection/otg_tests/base_vrf_selection/README.md" exec: " " } test: { id: "RT-3.2" description: "Policy based VRF selection with multiple protocol and DSCP values" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/policy/policy_vrf_selection/ate_tests/protocol_dscp_rules_for_vrf_selection_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/policy_forwarding/policy_vrf_selection/otg_tests/protocol_dscp_rules_for_vrf_selection_test/README.md" exec: " " } test: { @@ -822,7 +822,7 @@ test: { test: { id: "RT-5.6" description: "Interface Loopback mode" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/interface/interface_loopback_aggregate/otg_tests/interface_loopback_aggregate/README.md" } test: { id: "RT-5.7" @@ -885,7 +885,7 @@ test: { test: { id: "RT-7.5" description: "BGP Policy - Set Link Bandwidth Community" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/bgp/otg_tests/link_bandwidth_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/otg_tests/link_bandwidth_test/README.md" } test: { id: "RT-7.6" @@ -936,7 +936,7 @@ test: { } test: { id: "Replay-1.2" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/replay/tests/p4rt_replay/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/replay/tests/p4rt_replay/README.md" } test: { id: "SFLOW-1" @@ -1018,7 +1018,7 @@ test: { } test: { id: "TE-17.1" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/vrf_policy_driven_te/README.md" } test { id: "TE-18.1" @@ -1568,7 +1568,7 @@ test: { test: { id: "gNMI-1.20" description: "Telemetry: Optics Thresholds" - readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/platform/tests/optics_thresholds_test/README.md" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/platform/tests/optics_thresholds_test/README.md" exec: " " } test: { From c208987edc4c4bcdfc12f9d5fe3dbf5b0e3a2427 Mon Sep 17 00:00:00 2001 From: ihebboubaker <126072465+ihebboubaker@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:37:22 +0100 Subject: [PATCH 15/27] Create README FOR MPLS2-2 (#3460) * Create README FOR MPLS-2.2 --- .../otg_tests/static_bgp_nexthop/README.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 feature/mpls/otg_tests/static_bgp_nexthop/README.md diff --git a/feature/mpls/otg_tests/static_bgp_nexthop/README.md b/feature/mpls/otg_tests/static_bgp_nexthop/README.md new file mode 100644 index 00000000000..7ed0a06fe99 --- /dev/null +++ b/feature/mpls/otg_tests/static_bgp_nexthop/README.md @@ -0,0 +1,121 @@ +# MPLS-2.2: MPLS forwarding via static LSP to BGP next-hop. + +## Summary + +Validate static LSP functionality with BGP resolved next-hop. This test verifies that the DUT can forward MPLS traffic based on a static LSP that uses a next-hop resolved via BGP. + +## Testbed type + +* [`featureprofiles/topologies/atedut_4.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_4.testbed) + +## Procedure + +### Configuration + +1) Create the topology below: + + ``` + | | ---- | ATE Port 2 | ---- [eBGP peer] + [ ATE Port 1 ] ---- | DUT | | | + | | ---- | ATE Port 3 | + ``` + +2) Configure eBGP peer on ATE Port 2 interface and advertise `BGP-NH-V4= 203.0.200.0/24` and `BGP-NH-V6= 2001:db8:128:200::/64` +3) Configure static routes on the DUT to discard traffic destined for BGP-NH-V4 and BGP-NH-V6. These routes should point to a Null0 with an administrative distance of 254 to ensure they are less preferred than the BGP routes. This prevents the DUT from using its IGP to reach the BGP next-hops. +4) Enable MPLS forwarding. +5) Create egress static LSP for IPv4 and IPV6 traffic to pop the label and resolve the next-hop BGP-NH-V4 and BGP-NH-V6 respectivelly + +```yaml +network-instances: + - network-instance: + mpls: + lsps: + static-lsps: + - static-lsp: + config: + name: "lsp-egress-v4" + egress: + next-hop: 203.0.200.1 + incoming-label: 1000004 + - static-lsp: + config: + name: "lsp-egress-v6" + egress: + next-hop: 2001:db8:128:200::1 + incoming-label: 1000006 +``` + * Set resolve NH action for both LSPs. + +**TODO:** OC model does not support resolve next-hop option for LSPs. + +7) Configure static routes i.e. `IPV4-DST = 203.0.113.0/24` and `IPV6-DST = 2001:db8:128:128::/64` to ATE Port 3. +```yaml +network-instances: + - network-instance: + protocols: + - protocol: + static-routes: + - static: + config: + prefix: "203.0.113.0/24" + next-hops: + - next-hop: + config: + index: 1 + next-hop: "ATE PORT 3" + - static: + config: + prefix: "2001:db8:128:128::/64" + next-hops: + - next-hop: + config: + index: 1 + next-hop: "ATE PORT 3" +``` + +### MPLS-2.2.1: Verify IPv4 MPLS forwarding + +* Push the above DUT configuration. +* Start traffic flow with MPLS[lbl-1000004] and IPv4 destined to IPV4-DST. +* Verify that traffic arrives to ATE Port 2. + +### MPLS-2.2.2: Verify IPv6 MPLS forwarding + +* Push the above DUT configuration. +* Start traffic flow with MPLS[lbl-1000006] and IPv4 destined to IPV6-DST. +* Verify that traffic arrives to ATE Port 2. + +### MPLS-2.2.3: Verify IPv4 traffic discard when BGP-NH is not available. + +* Withdraw BGP-NH-V4 advertisement. +* Push the above DUT configuration. +* Start traffic flow with MPLS[lbl-1000004] and IPv4 destination set to IPV4-DST. +* Verify that traffic is discarded. + +### MPLS-2.2.4: Verify IPv6 traffic discard when BGP-NH is not available. + +* Withdraw BGP-NH-V6 advertisement. +* Push the above DUT configuration. +* Start traffic flow with MPLS[lbl-1000006] and IPv6 destination set to IPV6-DST. +* Verify that traffic is discarded. + +## OpenConfig Path and RPC Coverage + +```yaml +paths: + ## Config paths + /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/config/incoming-label: + /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/config/next-hop: + /network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/index: + + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + replace: true + gNMI.Subscribe: + on_change: true +``` \ No newline at end of file From c6f9386195c3e55f7516462b37e9c36303d5fe84 Mon Sep 17 00:00:00 2001 From: Lakshmana Varahabhotla <77013369+vvlakshmanamurthy@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:48:06 -0500 Subject: [PATCH 16/27] Update testregistry.textproto (#3494) * Update testregistry.textproto --- testregistry.textproto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testregistry.textproto b/testregistry.textproto index e501eac1cad..45abadc10fd 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -408,6 +408,12 @@ test: { readme: " " exec: " " } +test: { + id: "PF-1.6" + description: "IPv4 & IPV6 based traffic steering from Non-default VRF to Default VRF using Policy based VRF selection" + readme: "" + exec: " " +} test: { id: "PLT-1.1" description: "Interface breakout Test" From 38440cb60efee9899f7f745c4cc0ddefe5f8ade7 Mon Sep 17 00:00:00 2001 From: cprabha Date: Thu, 10 Oct 2024 09:40:37 -0700 Subject: [PATCH 17/27] RT-1.51 bgp_multipath_ecmp_test.go (#3484) * Adding pps for ncptx * generic kne platform var * generic kne platform var * updated --------- Co-authored-by: Rohit Rattan --- .../bgp_multipath_ecmp_test/bgp_multipath_ecmp_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/feature/bgp/multipath/otg_tests/bgp_multipath_ecmp_test/bgp_multipath_ecmp_test.go b/feature/bgp/multipath/otg_tests/bgp_multipath_ecmp_test/bgp_multipath_ecmp_test.go index 2354ccc83ac..6991c940414 100644 --- a/feature/bgp/multipath/otg_tests/bgp_multipath_ecmp_test/bgp_multipath_ecmp_test.go +++ b/feature/bgp/multipath/otg_tests/bgp_multipath_ecmp_test/bgp_multipath_ecmp_test.go @@ -15,6 +15,7 @@ package bgp_multipath_ecmp_test import ( + "slices" "sort" "strconv" "testing" @@ -40,6 +41,7 @@ const ( pathID = 1 maxPaths = 2 trafficPps = 100000 + kneTrafficPps = 1000 totalPackets = 12000000 lossTolerancePct = 0 lbToleranceFms = 20 @@ -49,6 +51,10 @@ func TestMain(m *testing.M) { fptest.RunTests(m) } +var ( + kneDeviceModelList = []string{"ncptx"} +) + func configureOTG(t *testing.T, bs *cfgplugins.BGPSession) { devices := bs.ATETop.Devices().Items() byName := func(i, j int) bool { return devices[i].Name() < devices[j].Name() } @@ -104,6 +110,10 @@ func configureFlow(t *testing.T, bs *cfgplugins.BGPSession) { flow.Size().SetFixed(1500) flow.Rate().SetPps(trafficPps) + if slices.Contains(kneDeviceModelList, bs.DUT.Model()) { + flow.Rate().SetPps(kneTrafficPps) + } + e := flow.Packet().Add().Ethernet() e.Src().SetValue(bs.ATEPorts[0].MAC) v4 := flow.Packet().Add().Ipv4() From 29594e368c41d1133fe212a48ca166cf74eda106 Mon Sep 17 00:00:00 2001 From: Swetha-haridasula Date: Fri, 11 Oct 2024 10:46:43 +0530 Subject: [PATCH 18/27] added changes to .github/CODEOWNERS to remove ownership for policy_forwarding (#3511) --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f4204382bcc..3fb7dc761bb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -23,7 +23,6 @@ /feature/mtu/ @swetha-haridasula /feature/networkinstance/ @swetha-haridasula /feature/platform/ @amrindrr -/feature/policy_forwarding/ @swetha-haridasula /feature/qos @sezhang2 /feature/routing_policy/ @swetha-haridasula /feature/sampling/ @sudhinj From 9dedc7a041a42ee083903174e9123b325705d909 Mon Sep 17 00:00:00 2001 From: vishnureddybadveli <112267356+vishnureddybadveli@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:32:24 -0700 Subject: [PATCH 19/27] DP-2.4 Police traffic on input interface matching all packets using 1 rate, 2 color marker. (#3385) Adding test case for interface based policer for routes injected by gRIBI --------- Co-authored-by: dplore --- .../ingress_police_default/README.md | 195 ++++++++++++++++++ testregistry.textproto | 4 + 2 files changed, 199 insertions(+) create mode 100644 feature/qos/otg_tests/ingress_police_default/README.md diff --git a/feature/qos/otg_tests/ingress_police_default/README.md b/feature/qos/otg_tests/ingress_police_default/README.md new file mode 100644 index 00000000000..df47044e638 --- /dev/null +++ b/feature/qos/otg_tests/ingress_police_default/README.md @@ -0,0 +1,195 @@ +# DP-2.4 Police traffic on input matching all packets using 1 rate, 2 color marker + +## Summary + +Use the gRIBI applied ip entries from TE-18.1 gRIBI. +Configure an ingress scheduler to police traffic using a 1 rate, 2 color policer and attach the scheduler to the interface without a classifier. +Lack of match conditions will cause all packets to be matched. +Send traffic to validate the policer. + +## Topology + +* [`featureprofiles/topologies/atedut_2.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) + +## Test setup + +Use TE-18.1 test environment setup. + +## Procedure + +### DP-2.4.1 Generate and push configuration + +* Generate config for 2 scheduler polices with an input rate limit. +* Apply scheduler to DUT subinterface with vlan. +* Use gnmi.Replace to push the config to the DUT. + +```json +{ + "openconfig-qos": { + "scheduler-policies": [ + { + "scheduler-policy": null, + "config": { + "name": "limit_1Gb" + }, + "schedulers": [ + { + "scheduler": null, + "config": { + "sequence": 1, + "type": "ONE_RATE_TWO_COLOR" + }, + "inputs": [ + { + "input": "my input policer 1Gb", + "config": { + "id": "my input policer 1Gb", + "input-type": "QUEUE", + "queue": "dummy_input_queue_A" + } + } + ], + "one-rate-two-color": { + "config": { + "cir": 1000000000, + "bc": 100000, + "queuing-behavior": "POLICE" + }, + "exceed-action": { + "config": { + "drop": true + } + } + } + } + ] + }, + { + "scheduler-policy": null, + "config": { + "name": "limit_2Gb" + }, + "schedulers": [ + { + "scheduler": null, + "config": { + "sequence": 1, + "type": "ONE_RATE_TWO_COLOR" + }, + "inputs": [ + { + "input": "my input policer 2Gb", + "config": { + "id": "my input policer 2Gb", + "input-type": "QUEUE", + "queue": "dummy_input_queue_B" + } + } + ], + "one-rate-two-color": { + "config": { + "cir": 2000000000, + "bc": 100000, + "queuing-behavior": "POLICE" + }, + "exceed-action": { + "config": { + "drop": true + } + } + } + } + ] + } + ], + # + # Interfaces input are mapped to the desired scheduler. + "interfaces": [ + { + "interface": null, + "config": { + "interface-id": "PortChannel1.100" + }, + "input": { + "scheduler-policy": { + "config": { + "name": "limit_group_A_1Gb" + } + } + } + }, + { + "interface": null, + "config": { + "interface-id": "PortChannel1.200" + }, + "input": { + "scheduler-policy": { + "config": { + "name": "limit_group_B_1Gb" + } + } + } + } + ] + } +} +``` + +### DP-2.4.2 Test traffic + +* Send traffic + * Send flow A traffic from ATE port 1 to DUT for dest_A at 0.7Gbps (note cir is 1Gbps). + * Send flow B traffic from ATE port 1 to DUT for to dest_B at 1.5Gbps (note cir is 2Gbps). + * Validate qos counters per DUT. + * Validate qos counters by ATE port. + * Validate packets are received by ATE port 2. + * Validate DUT qos interface scheduler counters count packets as conforming-pkts and conforming-octets + * Validate at OTG that 0 packets are lost on flow A and flow B + * When the outer packet is IPv6, the flow-label should be inspected on the ATE. + * If the inner packet is IPv4, the outer IPv6 flow label should be computed based on the IPv4 5 tuple src,dst address and ports, plus protocol. + * If the inner packet is IPv6, the inner flow label should be copied to the outer packet. + * To validate the flow label, use the ATE to verify that the packets for + * flow A all have the same flow label + * flow B have the same flow label + * flow A and B labels do not match + * Increase traffic on flow to dest_B to 2Gbps + * Validate that flow dest_B experiences ~50% packet loss (+/- 1%) + + +#### OpenConfig Path and RPC Coverage + +```yaml +paths: + # qos scheduler config + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config/drop: + + # qos interfaces config + /qos/interfaces/interface/config/interface-id: + /qos/interfaces/interface/input/scheduler-policy/config/name: + + # qos interface scheduler counters + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-pkts: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-octets: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-pkts: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-octets: + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + replace: true + gNMI.Subscribe: + on_change: true +``` + +## Required DUT platform + +* FFF + + diff --git a/testregistry.textproto b/testregistry.textproto index 45abadc10fd..9d0f6823aa4 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -269,6 +269,10 @@ test: { readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/qos/ate_tests/wrr_traffic_test/README.md" exec: " " } +test: { + id: "DP-2.4" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/qos/otg_tests/ingress_police_nhg/README.md" +} test: { id: "FP-1.1" description: "Power admin DOWN/UP Test" From c813af4f5f5d2fe6946177a2d1986931d153bf62 Mon Sep 17 00:00:00 2001 From: cprabha Date: Tue, 15 Oct 2024 18:55:10 -0700 Subject: [PATCH 20/27] RT-1.55: bgp_session_mode_configuration_test.go (#3397) * Initial commit for RT-1.55 --- .../README.md | 0 .../bgp_session_mode_configuration_test.go | 326 ++++++++++++++++++ .../metadata.textproto | 41 +++ 3 files changed, 367 insertions(+) rename feature/bgp/{ => bgp_session_mode/otg_tests}/bgp_session_mode_configuration_test/README.md (100%) create mode 100644 feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/bgp_session_mode_configuration_test.go create mode 100644 feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/metadata.textproto diff --git a/feature/bgp/bgp_session_mode_configuration_test/README.md b/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/README.md similarity index 100% rename from feature/bgp/bgp_session_mode_configuration_test/README.md rename to feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/README.md diff --git a/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/bgp_session_mode_configuration_test.go b/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/bgp_session_mode_configuration_test.go new file mode 100644 index 00000000000..80fc518aee2 --- /dev/null +++ b/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/bgp_session_mode_configuration_test.go @@ -0,0 +1,326 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bgp_session_mode_configuration_test + +import ( + "testing" + "time" + + "github.com/open-traffic-generator/snappi/gosnappi" + "github.com/openconfig/featureprofiles/internal/attrs" + "github.com/openconfig/featureprofiles/internal/deviations" + "github.com/openconfig/featureprofiles/internal/fptest" + "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi" + "github.com/openconfig/ondatra/gnmi/oc" + "github.com/openconfig/ondatra/otg" + "github.com/openconfig/ygnmi/ygnmi" + "github.com/openconfig/ygot/ygot" +) + +// The testbed consists of ate:port1 -> dut:port1. +func TestMain(m *testing.M) { + fptest.RunTests(m) +} + +// List of variables. +var ( + dutAttrs = attrs.Attributes{ + Desc: "To ATE", + IPv4: "192.0.2.1", + IPv4Len: 30, + } + ateAttrs = attrs.Attributes{ + Desc: "To DUT", + Name: "ateSrc", + MAC: "02:00:01:01:01:01", + IPv4: "192.0.2.2", + IPv4Len: 30, + } +) + +// Constants. +const ( + dutAS = 65540 + ateAS = 65550 + peerGrpName = "eBGP-PEER-GROUP" + peerLvlPassive = "PeerGrpLevelPassive" + peerLvlActive = "PeerGrpLevelActive" + nbrLvlPassive = "nbrLevelPassive" + nbrLvlActive = "nbrLevelActive" +) + +// configureDUT is used to configure interfaces on the DUT. +func configureDUT(t *testing.T, dut *ondatra.DUTDevice) { + dc := gnmi.OC() + i1 := dutAttrs.NewOCInterface(dut.Port(t, "port1").Name(), dut) + gnmi.Replace(t, dut, dc.Interface(i1.GetName()).Config(), i1) + + if deviations.ExplicitPortSpeed(dut) { + fptest.SetPortSpeed(t, dut.Port(t, "port1")) + } + if deviations.ExplicitInterfaceInDefaultVRF(dut) { + fptest.AssignToNetworkInstance(t, dut, i1.GetName(), deviations.DefaultNetworkInstance(dut), 0) + } +} + +// verifyPortsUp asserts that each port on the device is operating. +func verifyPortsUp(t *testing.T, dev *ondatra.Device) { + t.Helper() + for _, p := range dev.Ports() { + status := gnmi.Get(t, dev, gnmi.OC().Interface(p.Name()).OperStatus().State()) + if want := oc.Interface_OperStatus_UP; status != want { + t.Errorf("%s Status: got %v, want %v", p, status, want) + } + } +} + +// Struct is to pass bgp session parameters. +type bgpTestParams struct { + localAS, peerAS, nbrLocalAS uint32 + peerIP string + transportMode string +} + +// bgpCreateNbr creates a BGP object with neighbors pointing to ate and returns bgp object. +func bgpCreateNbr(bgpParams *bgpTestParams, dut *ondatra.DUTDevice) *oc.NetworkInstance_Protocol { + d := &oc.Root{} + ni1 := d.GetOrCreateNetworkInstance(deviations.DefaultNetworkInstance(dut)) + niProto := ni1.GetOrCreateProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + + bgp := niProto.GetOrCreateBgp() + + global := bgp.GetOrCreateGlobal() + global.As = ygot.Uint32(bgpParams.localAS) + global.RouterId = ygot.String(dutAttrs.IPv4) + + // Note: we have to define the peer group even if we aren't setting any policy because it's + // invalid OC for the neighbor to be part of a peer group that doesn't exist. + pg := bgp.GetOrCreatePeerGroup(peerGrpName) + pg.PeerAs = ygot.Uint32(dutAS) + pg.PeerGroupName = ygot.String(peerGrpName) + + nv4 := bgp.GetOrCreateNeighbor(ateAttrs.IPv4) + nv4.PeerGroup = ygot.String(peerGrpName) + nv4.PeerAs = ygot.Uint32(ateAS) + nv4.Enabled = ygot.Bool(true) + + nv4.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true) + + switch bgpParams.transportMode { + case nbrLvlPassive: + nv4.GetOrCreateTransport().SetPassiveMode(true) + case nbrLvlActive: + nv4.GetOrCreateTransport().SetPassiveMode(false) + case peerLvlPassive: + pg.GetOrCreateTransport().SetPassiveMode(true) + case peerLvlActive: + pg.GetOrCreateTransport().SetPassiveMode(false) + } + + return niProto +} + +// bgpClearConfig removes all BGP configuration from the DUT. +func bgpClearConfig(t *testing.T, dut *ondatra.DUTDevice) { + resetBatch := &gnmi.SetBatch{} + gnmi.BatchDelete(resetBatch, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Config()) + + if deviations.NetworkInstanceTableDeletionRequired(dut) { + tablePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).TableAny() + for _, table := range gnmi.LookupAll[*oc.NetworkInstance_Table](t, dut, tablePath.Config()) { + if val, ok := table.Val(); ok { + if val.GetProtocol() == oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP { + gnmi.BatchDelete(resetBatch, gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Table(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, val.GetAddressFamily()).Config()) + } + } + } + } + resetBatch.Set(t, dut) +} + +// verifyBgpTelemetry checks that the dut has an established BGP session with reasonable settings. +func verifyBgpTelemetry(t *testing.T, dut *ondatra.DUTDevice, wantState oc.E_Bgp_Neighbor_SessionState, transMode string) { + statePath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP").Bgp() + nbrPath := statePath.Neighbor(ateAttrs.IPv4) + + // Get BGP adjacency state + t.Log("Checking BGP neighbor to state...") + _, ok := gnmi.Watch(t, dut, nbrPath.SessionState().State(), time.Minute, func(val *ygnmi.Value[oc.E_Bgp_Neighbor_SessionState]) bool { + state, present := val.Val() + return present && state == wantState + }).Await(t) + if !ok { + fptest.LogQuery(t, "BGP reported state", nbrPath.State(), gnmi.Get(t, dut, nbrPath.State())) + t.Errorf("BGP Session state is not as expected.") + } + status := gnmi.Get(t, dut, nbrPath.SessionState().State()) + t.Logf("BGP adjacency for %s: %s", ateAttrs.IPv4, status) + if status != wantState { + t.Errorf("BGP peer %s status got %d, want %d", ateAttrs.IPv4, status, wantState) + } + + nbrTransMode := gnmi.Get(t, dut, nbrPath.Transport().State()) + pgTransMode := gnmi.Get(t, dut, statePath.PeerGroup(peerGrpName).Transport().State()) + // Check transport mode telemetry. + switch transMode { + case nbrLvlPassive: + if nbrTransMode.GetPassiveMode() != true { + t.Errorf("Neighbor level passive mode is not set to true on DUT. want true, got %v", nbrTransMode.GetPassiveMode()) + } + t.Logf("Neighbor level passive mode is set to %v on DUT", nbrTransMode.GetPassiveMode()) + case nbrLvlActive: + if nbrTransMode.GetPassiveMode() != false { + t.Errorf("Neighbor level passive mode is not set to false on DUT. want false, got %v", nbrTransMode.GetPassiveMode()) + } + t.Logf("Neighbor level passive mode is set to %v on DUT", nbrTransMode.GetPassiveMode()) + case peerLvlPassive: + if pgTransMode.GetPassiveMode() != true { + t.Errorf("Peer group level passive mode is not set to true on DUT. want true, got %v", pgTransMode.GetPassiveMode()) + } + t.Logf("Peer group level passive mode is set to %v on DUT", pgTransMode.GetPassiveMode()) + case peerLvlActive: + if pgTransMode.GetPassiveMode() != false { + t.Errorf("Peer group level passive mode is not set to false on DUT. want false, got %v", pgTransMode.GetPassiveMode()) + } + t.Logf("Peer group level passive mode is set to %v on DUT", pgTransMode.GetPassiveMode()) + } +} + +// Function to configure ATE configs based on args and returns ate topology handle. +func configureATE(t *testing.T, ateParams *bgpTestParams) gosnappi.Config { + t.Helper() + ate := ondatra.ATE(t, "ate") + port1 := ate.Port(t, "port1") + topo := gosnappi.NewConfig() + + topo.Ports().Add().SetName(port1.ID()) + dev := topo.Devices().Add().SetName(ateAttrs.Name) + eth := dev.Ethernets().Add().SetName(ateAttrs.Name + ".Eth") + eth.Connection().SetPortName(port1.ID()) + eth.SetMac(ateAttrs.MAC) + + ip := eth.Ipv4Addresses().Add().SetName(dev.Name() + ".IPv4") + ip.SetAddress(ateAttrs.IPv4).SetGateway(dutAttrs.IPv4).SetPrefix(uint32(ateAttrs.IPv4Len)) + + bgp := dev.Bgp().SetRouterId(ateAttrs.IPv4) + peerBGP := bgp.Ipv4Interfaces().Add().SetIpv4Name(ip.Name()).Peers().Add() + peerBGP.SetName(ateAttrs.Name + ".BGP4.peer") + peerBGP.SetPeerAddress(ip.Gateway()).SetAsNumber(uint32(ateParams.localAS)) + peerBGP.SetAsType(gosnappi.BgpV4PeerAsType.EBGP) + + switch ateParams.transportMode { + case nbrLvlPassive: + case peerLvlPassive: + peerBGP.Advanced().SetPassiveMode(true) + case peerLvlActive: + case nbrLvlActive: + peerBGP.Advanced().SetPassiveMode(false) + } + + return topo +} + +func verifyOTGBGPTelemetry(t *testing.T, otg *otg.OTG, c gosnappi.Config) { + //nbrPath := gnmi.OTG().BgpPeer("ateSrc.BGP4.peer") + t.Log("OTG telemetry does not support checking transport mode.") +} + +// TestBgpSessionModeConfiguration is to verify when transport mode is set +// active/passive at both neighbor level and peer group level. +func TestBgpSessionModeConfiguration(t *testing.T) { + dutIP := dutAttrs.IPv4 + dut := ondatra.DUT(t, "dut") + ate := ondatra.ATE(t, "ate") + + // Configure interface on the DUT + t.Log("Start DUT interface Config") + configureDUT(t, dut) + + // Configure Network instance type on DUT + t.Log("Configure Network Instance") + fptest.ConfigureDefaultNetworkInstance(t, dut) + + // Verify Port Status + t.Log("Verifying port status") + verifyPortsUp(t, dut.Device) + + dutConfPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut)).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "BGP") + + cases := []struct { + name string + dutConf *oc.NetworkInstance_Protocol + ateConf gosnappi.Config + wantBGPState oc.E_Bgp_Neighbor_SessionState + dutTransportMode string + otgTransportMode string + }{ + { + name: "Test transport mode passive at neighbor level on both DUT and ATE ", + dutConf: bgpCreateNbr(&bgpTestParams{localAS: dutAS, peerAS: ateAS, transportMode: nbrLvlPassive}, dut), + ateConf: configureATE(t, &bgpTestParams{localAS: ateAS, peerIP: dutIP, transportMode: nbrLvlPassive}), + wantBGPState: oc.Bgp_Neighbor_SessionState_ACTIVE, + dutTransportMode: nbrLvlPassive, + otgTransportMode: nbrLvlPassive, + }, + { + name: "Test transport mode active on ATE and passive on DUT at neighbor level", + dutConf: bgpCreateNbr(&bgpTestParams{localAS: dutAS, peerAS: ateAS, nbrLocalAS: dutAS, transportMode: nbrLvlPassive}, dut), + ateConf: configureATE(t, &bgpTestParams{localAS: ateAS, peerIP: dutIP, transportMode: nbrLvlActive}), + wantBGPState: oc.Bgp_Neighbor_SessionState_ESTABLISHED, + dutTransportMode: nbrLvlPassive, + otgTransportMode: nbrLvlActive, + }, + { + name: "Test transport passive mode at Peer group level on both DUT and ATE.", + dutConf: bgpCreateNbr(&bgpTestParams{localAS: dutAS, peerAS: ateAS, transportMode: peerLvlPassive}, dut), + ateConf: configureATE(t, &bgpTestParams{localAS: ateAS, peerIP: dutIP, transportMode: peerLvlPassive}), + wantBGPState: oc.Bgp_Neighbor_SessionState_ACTIVE, + dutTransportMode: peerLvlPassive, + otgTransportMode: peerLvlPassive, + }, + { + name: "Test transport mode active on ATE and passive on DUT at peer group level", + dutConf: bgpCreateNbr(&bgpTestParams{localAS: dutAS, peerAS: ateAS, nbrLocalAS: dutAS, transportMode: peerLvlPassive}, dut), + ateConf: configureATE(t, &bgpTestParams{localAS: ateAS, peerIP: dutIP, transportMode: peerLvlActive}), + wantBGPState: oc.Bgp_Neighbor_SessionState_ESTABLISHED, + dutTransportMode: peerLvlPassive, + otgTransportMode: peerLvlActive, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + t.Log("Clear BGP configuration") + bgpClearConfig(t, dut) + + t.Log("Configure BGP Configs on DUT") + gnmi.Replace(t, dut, dutConfPath.Config(), tc.dutConf) + fptest.LogQuery(t, "DUT BGP Config ", dutConfPath.Config(), gnmi.Get(t, dut, dutConfPath.Config())) + + t.Log("Configure BGP on ATE") + ate.OTG().PushConfig(t, tc.ateConf) + ate.OTG().StartProtocols(t) + + t.Logf("Verify BGP telemetry") + verifyBgpTelemetry(t, dut, tc.wantBGPState, tc.dutTransportMode) + + t.Logf("Verify BGP telemetry on otg") + verifyOTGBGPTelemetry(t, ate.OTG(), tc.ateConf) + + t.Log("Clear BGP Configs on ATE") + ate.OTG().StopProtocols(t) + }) + } +} diff --git a/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/metadata.textproto b/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/metadata.textproto new file mode 100644 index 00000000000..2b5a539450e --- /dev/null +++ b/feature/bgp/bgp_session_mode/otg_tests/bgp_session_mode_configuration_test/metadata.textproto @@ -0,0 +1,41 @@ +# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto +# proto-message: Metadata + +uuid: "7e2082f6-4fbc-4e2b-a8a8-c83af2574ec4" +plan_id: "RT-1.55" +description: "BGP session mode (active/passive)" +testbed: TESTBED_DUT_ATE_2LINKS +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + ipv4_missing_enabled: true + connect_retry: true + } +} +platform_exceptions: { + platform: { + vendor: NOKIA + } + deviations: { + explicit_port_speed: true + explicit_interface_in_default_vrf: true + missing_value_for_defaults: true + interface_enabled: true + } +} +platform_exceptions: { + platform: { + vendor: ARISTA + } + deviations: { + connect_retry: true + omit_l2_mtu: true + network_instance_table_deletion_required: true + bgp_md5_requires_reset: true + missing_value_for_defaults: true + interface_enabled: true + default_network_instance: "default" + } +} From c5a2e178ffb50c8a5c4a66b9d429ed67c8aff2cc Mon Sep 17 00:00:00 2001 From: Ram Date: Wed, 16 Oct 2024 10:54:07 +0530 Subject: [PATCH 21/27] fix prefix_set_test (#3517) --- internal/gnoi/gnoi.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/gnoi/gnoi.go b/internal/gnoi/gnoi.go index 48eec464b83..cf7892ecea6 100644 --- a/internal/gnoi/gnoi.go +++ b/internal/gnoi/gnoi.go @@ -40,6 +40,7 @@ var ( }, ondatra.CISCO: { GRIBI: "emsd", + OCAGENT: "emsd", P4RT: "emsd", ROUTING: "emsd", }, From 38706dc55f681b5ca45af62b0a61185317e44137 Mon Sep 17 00:00:00 2001 From: Swetha-haridasula Date: Wed, 16 Oct 2024 12:29:46 +0530 Subject: [PATCH 22/27] System ownership (#3518) * added changes to .github/CODEOWNERS to remove ownership for policy_forwarding * added changes to .github/CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3fb7dc761bb..df375ba3436 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -29,7 +29,7 @@ /feature/security @mihirpitale-googler /feature/staticroute/ @swetha-haridasula /feature/stp/ @alokmtri-g -/feature/system @self-maurya +/feature/system @swetha-haridasula /feature/vrrp @amrindrr # Common OTG utilities From 2d9b0b5a7cc37e96e139776351508a64f44c5130 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Wed, 16 Oct 2024 16:37:22 -0700 Subject: [PATCH 23/27] TE-18.3 gRIBI and Scheduler mpls-in-udp scale test (#3375) * introduce mpls-in-udp scale test --- .../otg_tests/mpls_in_udp_scale/README.md | 145 ++++++++++++++++++ testregistry.textproto | 4 + 2 files changed, 149 insertions(+) create mode 100644 feature/gribi/otg_tests/mpls_in_udp_scale/README.md diff --git a/feature/gribi/otg_tests/mpls_in_udp_scale/README.md b/feature/gribi/otg_tests/mpls_in_udp_scale/README.md new file mode 100644 index 00000000000..e2f42b8c481 --- /dev/null +++ b/feature/gribi/otg_tests/mpls_in_udp_scale/README.md @@ -0,0 +1,145 @@ +# TE-18.3 MPLS in UDP Encapsulation with QoS Scheduler Scale Test + +Building on TE-18.1 and TE-18.2, add scaling parameters + +## Topology + +* 32 ports as the 'input port set' +* 4 ports as "uplink facing" +* VLAN configurations + * input vlans are distributed evenly across the 'input port set' + +## Test setup + +TODO: Complete test environment setup steps + +inner_ipv6_dst_A = "2001:aa:bb::1/128" +inner_ipv6_dst_B = "2001:aa:bb::2/128" +inner_ipv6_default = "::/0" + +ipv4_inner_dst_A = "10.5.1.1/32" +ipv4_inner_dst_B = "10.5.1.2/32" +ipv4_inner_default = "0.0.0.0/0" + +outer_ipv6_src = "2001:f:a:1::0" +outer_ipv6_dst_A = "2001:f:c:e::1" +outer_ipv6_dst_B = "2001:f:c:e::2" +outer_ipv6_dst_def = "2001:1:1:1::0" +outer_dst_udp_port = "5555" +outer_dscp = "26" +outer_ip-ttl = "64" + +## Procedure + +### TE-18.3.1 Scale + +#### Scale targets + +* Flow scale + * 20,000 IPv4/IPv6 destinations + * 1,000 vlans + * Inner IP address space should be reused for each network-instance. + * gRIBI client update rate `flow_r` = 1 update per second + * Each gRIBI update include ip entries in batches of `flow_q` = 200 + * DUT packet forwarding updated within 1 second after adding entries + +* Scheduler (policer) scale + * 1,000 policer rates + * 20,000 policer-policies / token buckets instantiations + * Update policer-policies at 1 per `sched_r` = 60 seconds + * Update policer-policies in a batch of `sched_q` = 1,000 + * Policer-policies changes should take effect within `sched_r` / 2 time + +#### Scale profile A - many vlans + +* 20 ip destinations * 1,000 vlans = 20,000 'flows' +* Each ingress vlan has 20 policer-policies = 10,000 'token buckets' +* The 20 ip destinations are split evenly between the 20 policers +* Each policer is assigned rate limits matching one of 800 different possible limits between 1Gbps to 400Gbps in 0.5Gbps increments + +#### Scale profile B - many destinations, few vlans + +* 200 ip destinations * 100 vlans = 20,000 'flows' +* Each ingress vlan has 4 policer-policies = 4,000 'token buckets' +* The 200 ip destinations are split evenly between the 4 policers +* Each policer is assigned rate limits matching one of 800 different possible limits between 1Gbps to 400Gbps in 0.5Gbps increments + +#### Procedure - Flow Scale + +* For each scale profile, create the following subsets TE-18.1.5.n + * Configure ATE flows to send 100 pps per flow and wait for ARP + * Send traffic for q flows (destination IP prefixes) for 2 seconds + * At traffic start time, gRIBI client to send `flow_q` aft entries and their + related NHG and NH at rate `flow_r` + * Validate RIB_AND_FIB_ACK with FIB_PROGRAMMED is received from DUT within + 1 second + * Measure packet loss. Target packet loss <= 50%. + * Repeat adding 200 flows until 20,000 flows have been added + * Once reaching 20,000 flows, perform 1 iteration of modifying the first + `flow_q` flows to use different NH,NHG + +#### Procedure - Policer + Flow Scale + +* For each scale profile, create the following subsets TE-18.1.6.n + * Program all 20,000 flows + * Every `sched_r` interval use gnmi.Set to replace `sched_q` scheduler policies + * Verify packet loss changes for all flows within `sched_r` / 2 time + +#### OpenConfig Path and RPC Coverage + +```yaml +paths: + # qos scheduler config + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config/drop: + + # qos classifier config + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/terms/term/config/id: + #/qos/classifiers/classifier/terms/term/conditions/next-hop-group/config/name: # TODO: new OC leaf to be added + + # qos input-policies config - TODO: a new OC subtree (/qos/input-policies) + # /qos/input-policies/input-policy/config/name: + # /qos/input-policies/input-policy/config/classifier: + # /qos/input-policies/input-policy/config/scheduler-policy: + + # qos interface config + #/qos/interfaces/interface/subinterface/input/config/policies: # TODO: new OC leaf-list (/qos/interfaces/interface/input/config/policies) + + # qos interface scheduler counters + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-pkts: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-octets: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-pkts: + /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-octets: + + # afts next-hop counters + /network-instances/network-instance/afts/next-hops/next-hop/state/counters/packets-forwarded: + /network-instances/network-instance/afts/next-hops/next-hop/state/counters/octets-forwarded: + + # afts state paths set via gRIBI + # TODO: https://github.com/openconfig/public/pull/1153 + #/network-instances/network-instance/afts/next-hops/next-hop/mpls-in-udp/state/src-ip: + #/network-instances/network-instance/afts/next-hops/next-hop/mpls-in-udp/state/dst-ip: + #/network-instances/network-instance/afts/next-hops/next-hop/mpls-in-udp/state/ip-ttl: + #/network-instances/network-instance/afts/next-hops/next-hop/mpls-in-udp/state/dst-udp-port: + #/network-instances/network-instance/afts/next-hops/next-hop/mpls-in-udp/state/dscp: + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + replace: true + gNMI.Subscribe: + on_change: true + gribi: + gRIBI.Modify: + gRIBI.Flush: +``` + +## Required DUT platform + +* FFF diff --git a/testregistry.textproto b/testregistry.textproto index 9d0f6823aa4..6019019e80f 100644 --- a/testregistry.textproto +++ b/testregistry.textproto @@ -1035,6 +1035,10 @@ test { description: "MPLS in UDP Encapsulation with QoS scheduler" readme: "" } +test: { + id: "TE-18.3" + readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/gribi/otg_tests/mpls_in_udp_scale/README.md" +} test: { id: "TE-2.1" description: "gRIBI IPv4 Entry" From bc1eec65bee4aeb53e9edd326df5a0ffe4f0cfd1 Mon Sep 17 00:00:00 2001 From: Karthikeya Remilla Date: Thu, 17 Oct 2024 06:32:51 +0530 Subject: [PATCH 24/27] healthz parameters for cisco (#3326) Add healthz parameters related to Cisco IOS XR --------- Co-authored-by: Darren Loher --- .../chassis_reboot_status_and_cancel_test.go | 2 +- .../copying_debug_files_test.go | 34 ++++++++++++++++--- .../metadata.textproto | 8 +++++ .../per_component_reboot_test.go | 2 +- .../supervisor_switchover_test.go | 4 +-- internal/components/components.go | 18 +++++----- internal/deviations/deviations.go | 5 +++ proto/metadata.proto | 2 ++ proto/metadata_go_proto/metadata.pb.go | 21 +++++++++--- 9 files changed, 75 insertions(+), 21 deletions(-) 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 30d20401fc6..d709bd4adaa 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 @@ -197,7 +197,7 @@ func getSubCompPath(t *testing.T, dut *ondatra.DUTDevice) *tpb.Path { } activeRP := controllerCards[0] if len(controllerCards) == 2 { - _, activeRP = components.FindStandbyRP(t, dut, controllerCards) + _, activeRP = components.FindStandbyControllerCard(t, dut, controllerCards) } useNameOnly := deviations.GNOISubcomponentPath(dut) return components.GetSubcomponentPath(activeRP, useNameOnly) diff --git a/feature/gnoi/system/tests/copying_debug_files_test/copying_debug_files_test.go b/feature/gnoi/system/tests/copying_debug_files_test/copying_debug_files_test.go index 7a2bfcfc27a..27bbc03efb5 100644 --- a/feature/gnoi/system/tests/copying_debug_files_test/copying_debug_files_test.go +++ b/feature/gnoi/system/tests/copying_debug_files_test/copying_debug_files_test.go @@ -18,12 +18,15 @@ import ( "testing" "time" + comps "github.com/openconfig/featureprofiles/internal/components" + "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/featureprofiles/internal/fptest" "github.com/openconfig/featureprofiles/internal/system" hpb "github.com/openconfig/gnoi/healthz" spb "github.com/openconfig/gnoi/system" tpb "github.com/openconfig/gnoi/types" "github.com/openconfig/ondatra" + "github.com/openconfig/ondatra/gnmi/oc" ) var ( @@ -31,13 +34,15 @@ var ( ondatra.NOKIA: "sr_qos_mgr", ondatra.ARISTA: "IpRib", ondatra.JUNIPER: "rpd", + ondatra.CISCO: "ifmgr", } components = map[ondatra.Vendor]string{ ondatra.ARISTA: "Chassis", - ondatra.CISCO: "Chassis", + ondatra.CISCO: "Rack 0", ondatra.JUNIPER: "CHASSIS0", ondatra.NOKIA: "Chassis", } + componentName = map[string]string{} ) func TestMain(m *testing.M) { @@ -86,9 +91,29 @@ func TestCopyingDebugFiles(t *testing.T) { t.Logf("Wait 60 seconds for process to restart ...") time.Sleep(60 * time.Second) - componentName := map[string]string{"name": components[dut.Vendor()]} + ccList := comps.FindComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_CONTROLLER_CARD) + t.Logf("Found CONTROLLER_CARD list: %v", ccList) + var activeCC string + if deviations.ChassisGetRPCUnsupported(dut) { + if len(ccList) < 2 { + switch dut.Vendor() { + case ondatra.CISCO: + activeCC = "0/RP0/CPU0" + } + } else { + standbyControllerName, activeControllerName := comps.FindStandbyControllerCard(t, dut, ccList) + t.Logf("Standby RP: %v, Active RP: %v", standbyControllerName, activeControllerName) + activeCC = activeControllerName + } + componentName = map[string]string{"name": activeCC + "-" + processName[dut.Vendor()]} // example: 0/RP0/CPU0-ifmgr + } else { + componentName = map[string]string{"name": components[dut.Vendor()]} + } + t.Logf("Component Name: %v", componentName) + req := &hpb.GetRequest{ Path: &tpb.Path{ + Origin: "openconfig", Elem: []*tpb.PathElem{ { Name: "components", @@ -106,10 +131,10 @@ func TestCopyingDebugFiles(t *testing.T) { case ondatra.ARISTA: t.Log("Skip logging validResponse for Arista") default: - t.Logf("Response: %v", (validResponse)) + t.Logf("Response: %v", validResponse) } if err != nil { - t.Fatalf("Unexpected error on healthz get response after restart of %v: %v", processName[dut.Vendor()], err) + t.Errorf("Unexpected error on healthz get response after restart of %v: %v", processName[dut.Vendor()], err) } } @@ -120,6 +145,7 @@ func TestChassisComponentArtifacts(t *testing.T) { // Execute Healthz Check RPC for the chassis component. chkReq := &hpb.CheckRequest{ Path: &tpb.Path{ + Origin: "openconfig", Elem: []*tpb.PathElem{ { Name: "components", diff --git a/feature/gnoi/system/tests/copying_debug_files_test/metadata.textproto b/feature/gnoi/system/tests/copying_debug_files_test/metadata.textproto index 4d3c878aa43..fc3f0cd55ac 100644 --- a/feature/gnoi/system/tests/copying_debug_files_test/metadata.textproto +++ b/feature/gnoi/system/tests/copying_debug_files_test/metadata.textproto @@ -5,3 +5,11 @@ uuid: "3265de19-8fb8-4b0c-8a71-a75df008aa61" plan_id: "gNOI-5.3" description: "Copying Debug Files" testbed: TESTBED_DUT_ATE_2LINKS +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + chassis_get_rpc_unsupported: true + } +} \ No newline at end of file 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 53824b90d0c..18ccb12057d 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 @@ -95,7 +95,7 @@ func TestStandbyControllerCardReboot(t *testing.T) { t.Skipf("Not enough controller cards for the test on %v: got %v, want at least %v", dut.Model(), got, want) } - rpStandby, rpActive := components.FindStandbyRP(t, dut, controllerCards) + rpStandby, rpActive := components.FindStandbyControllerCard(t, dut, controllerCards) t.Logf("Detected rpStandby: %v, rpActive: %v", rpStandby, rpActive) gnoiClient := dut.RawAPIs().GNOI(t) diff --git a/feature/gnoi/system/tests/supervisor_switchover_test/supervisor_switchover_test.go b/feature/gnoi/system/tests/supervisor_switchover_test/supervisor_switchover_test.go index 4ce309a06c4..d40c60d8f67 100644 --- a/feature/gnoi/system/tests/supervisor_switchover_test/supervisor_switchover_test.go +++ b/feature/gnoi/system/tests/supervisor_switchover_test/supervisor_switchover_test.go @@ -85,7 +85,7 @@ func TestSupervisorSwitchover(t *testing.T) { t.Skipf("Not enough controller cards for the test on %v: got %v, want at least %v", dut.Model(), got, want) } - rpStandbyBeforeSwitch, rpActiveBeforeSwitch := components.FindStandbyRP(t, dut, controllerCards) + rpStandbyBeforeSwitch, rpActiveBeforeSwitch := components.FindStandbyControllerCard(t, dut, controllerCards) t.Logf("Detected rpStandby: %v, rpActive: %v", rpStandbyBeforeSwitch, rpActiveBeforeSwitch) switchoverReady := gnmi.OC().Component(rpActiveBeforeSwitch).SwitchoverReady() @@ -150,7 +150,7 @@ func TestSupervisorSwitchover(t *testing.T) { } t.Logf("RP switchover time: %.2f seconds", time.Since(startSwitchover).Seconds()) - rpStandbyAfterSwitch, rpActiveAfterSwitch := components.FindStandbyRP(t, dut, controllerCards) + rpStandbyAfterSwitch, rpActiveAfterSwitch := components.FindStandbyControllerCard(t, dut, controllerCards) t.Logf("Found standbyRP after switchover: %v, activeRP: %v", rpStandbyAfterSwitch, rpActiveAfterSwitch) if got, want := rpActiveAfterSwitch, rpStandbyBeforeSwitch; got != want { diff --git a/internal/components/components.go b/internal/components/components.go index c2e6a8b2896..e13fd064046 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -171,9 +171,9 @@ func (y Y) FindByType(ctx context.Context, want oc.Component_Type_Union) ([]stri return names, nil } -// FindStandbyRP gets a list of two components and finds out the active and standby rp. -func FindStandbyRP(t *testing.T, dut *ondatra.DUTDevice, supervisors []string) (string, string) { - var activeRP, standbyRP string +// FindStandbyControllerCard gets a list of two components and finds out the active and standby controller_cards. +func FindStandbyControllerCard(t *testing.T, dut *ondatra.DUTDevice, supervisors []string) (string, string) { + var activeCC, standbyCC string for _, supervisor := range supervisors { watch := gnmi.Watch(t, dut, gnmi.OC().Component(supervisor).RedundantRole().State(), 10*time.Minute, func(val *ygnmi.Value[oc.E_Platform_ComponentRedundantRole]) bool { return val.IsPresent() @@ -184,19 +184,19 @@ func FindStandbyRP(t *testing.T, dut *ondatra.DUTDevice, supervisors []string) ( role := gnmi.Get(t, dut, gnmi.OC().Component(supervisor).RedundantRole().State()) t.Logf("Component(supervisor).RedundantRole().Get(t): %v, Role: %v", supervisor, role) if role == standbyController { - standbyRP = supervisor + standbyCC = supervisor } else if role == activeController { - activeRP = supervisor + activeCC = supervisor } else { t.Fatalf("Expected controller %s to be active or standby, got %v", supervisor, role) } } - if standbyRP == "" || activeRP == "" { - t.Fatalf("Expected non-empty activeRP and standbyRP, got activeRP: %v, standbyRP: %v", activeRP, standbyRP) + if standbyCC == "" || activeCC == "" { + t.Fatalf("Expected non-empty activeCC and standbyCC, got activeCC: %v, standbyCC: %v", activeCC, standbyCC) } - t.Logf("Detected activeRP: %v, standbyRP: %v", activeRP, standbyRP) + t.Logf("Detected activeCC: %v, standbyCC: %v", activeCC, standbyCC) - return standbyRP, activeRP + return standbyCC, activeCC } // OpticalChannelComponentFromPort finds the optical channel component for a port. diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index 16757a9ef72..9c663b56ad2 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -1171,3 +1171,8 @@ func EthChannelIngressParametersUnsupported(dut *ondatra.DUTDevice) bool { func EthChannelAssignmentCiscoNumbering(dut *ondatra.DUTDevice) bool { return lookupDUTDeviations(dut).GetEthChannelAssignmentCiscoNumbering() } + +// ChassisGetRPCUnsupported returns true if a Healthz Get RPC against the Chassis component is unsupported +func ChassisGetRPCUnsupported(dut *ondatra.DUTDevice) bool { + return lookupDUTDeviations(dut).GetChassisGetRpcUnsupported() +} diff --git a/proto/metadata.proto b/proto/metadata.proto index bc6bd7fb913..35a62494db8 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -623,6 +623,8 @@ message Metadata { bool eth_channel_assignment_cisco_numbering = 223; // Devices needs time to update interface counters. bool interface_counters_update_delayed = 224; + // device does not support a Healthz GET RPC against Chassis level component like "CHASSIS" or "Rack 0" + bool chassis_get_rpc_unsupported = 225; // Reserved field numbers and identifiers. reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173; } diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index 139b2058c16..6a587b520f6 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.34.2 -// protoc v5.27.1 +// protoc v5.28.0 // source: metadata.proto package metadata_go_proto @@ -905,6 +905,8 @@ type Metadata_Deviations struct { EthChannelAssignmentCiscoNumbering bool `protobuf:"varint,223,opt,name=eth_channel_assignment_cisco_numbering,json=ethChannelAssignmentCiscoNumbering,proto3" json:"eth_channel_assignment_cisco_numbering,omitempty"` // Devices needs time to update interface counters. InterfaceCountersUpdateDelayed bool `protobuf:"varint,224,opt,name=interface_counters_update_delayed,json=interfaceCountersUpdateDelayed,proto3" json:"interface_counters_update_delayed,omitempty"` + // device does not support a Healthz GET RPC against Chassis level component like "CHASSIS" or "Rack 0" + ChassisGetRpcUnsupported bool `protobuf:"varint,225,opt,name=chassis_get_rpc_unsupported,json=chassisGetRpcUnsupported,proto3" json:"chassis_get_rpc_unsupported,omitempty"` } func (x *Metadata_Deviations) Reset() { @@ -2360,6 +2362,13 @@ func (x *Metadata_Deviations) GetInterfaceCountersUpdateDelayed() bool { return false } +func (x *Metadata_Deviations) GetChassisGetRpcUnsupported() bool { + if x != nil { + return x.ChassisGetRpcUnsupported + } + return false +} + type Metadata_PlatformExceptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2423,7 +2432,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x6e, 0x64, 0x61, 0x74, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x65, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x7e, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x7e, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, @@ -2457,7 +2466,7 @@ var file_metadata_proto_rawDesc = []byte{ 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x85, 0x76, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xc5, 0x76, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, @@ -3396,7 +3405,11 @@ var file_metadata_proto_rawDesc = []byte{ 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0xe0, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x4a, 0x04, 0x08, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x12, 0x3e, 0x0a, + 0x1b, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x70, 0x63, + 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0xe1, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x18, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x47, 0x65, 0x74, 0x52, + 0x70, 0x63, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x54, 0x10, 0x55, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x14, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x5a, 0x10, 0x5b, 0x4a, 0x04, 0x08, 0x61, 0x10, 0x62, 0x4a, 0x04, 0x08, 0x37, 0x10, 0x38, 0x4a, 0x04, 0x08, 0x59, 0x10, 0x5a, 0x4a, 0x04, 0x08, From 69c6c31eb67b8ea57d1a1611a779bfe1ce053832 Mon Sep 17 00:00:00 2001 From: rszarecki <46606165+rszarecki@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:04:40 -0700 Subject: [PATCH 25/27] Readme update for link-bandwidth handling (#3496) * Add tests for checking different load balancing weights using bgp link bandwidth community --------- Co-authored-by: Pramod Maurya Co-authored-by: Darren Loher --- .../README.md | 113 ++++++++++++++---- .../link_bandwidth_test/metadata.textproto | 41 ------- .../otg_tests/link_bandwidth_test/README.md | 83 ++++++------- .../link_bandwidth_test.go | 0 .../link_bandwidth_test/metadata.textproto | 42 ++++++- 5 files changed, 163 insertions(+), 116 deletions(-) delete mode 100644 feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto rename feature/bgp/{ => policybase}/otg_tests/link_bandwidth_test/README.md (75%) rename feature/bgp/{ => policybase}/otg_tests/link_bandwidth_test/link_bandwidth_test.go (100%) diff --git a/feature/bgp/multipath/otg_tests/bgp_multipath_wecmp_lbw_community_test/README.md b/feature/bgp/multipath/otg_tests/bgp_multipath_wecmp_lbw_community_test/README.md index fb8c4ec0341..2456301ebd0 100644 --- a/feature/bgp/multipath/otg_tests/bgp_multipath_wecmp_lbw_community_test/README.md +++ b/feature/bgp/multipath/otg_tests/bgp_multipath_wecmp_lbw_community_test/README.md @@ -4,6 +4,8 @@ Validate BGP in multipath UCMP support with link bandwidth community +NOTE: [TODO] items are tracked at https://github.com/openconfig/featureprofiles/issues/3520 + ## Testbed type [TESTBED_DUT_ATE_4LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_4.testbed) @@ -19,43 +21,104 @@ Validate BGP in multipath UCMP support with link bandwidth community * ATE port-2 and DUT port-2 * ATE port-3 and DUT port-3 * Enable an Accept-route all import-policy/export-policy for eBGP session - under the neighbor AFI/SAFI -* Create an IPv4 internal target network attached to ATE port 2 and 3 + under the neighbor AFI/SAFI - IPv6 unicast and IPv4 unicast. +* Create an single IPv4 internal target network attached to ATE port 2 and 3 +* [TODO] Create an single IPv6 internal target network attached to ATE port 2 and 3 + ### Tests -* RT-1.52.1: Verify use of community type - - * Configure ATE port 1, 2 and 3 on different AS - * Enable multipath, set maximum-paths limit to 2, enable allow multiple - AS, and send community type to BOTH (STANDARD and EXTENDED) - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/config/enabled - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/config/allow-multiple-as - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/config/maximum-paths - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/send-community-type - * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ebgp/link-bandwidth-ext-community/config/enabled - * Advertise equal cost paths from port2 and port3 of ATE - * Check entries in FIB for advertised prefix, it should have 2 entries - * /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops - * Initiate traffic from ATE port-1 to the DUT and destined to internal - target network - * Check entire traffic should only be unequally forwarded between DUT - port2 and port3 +* RT-1.52.1: Verify use of unequal community type + + * Test Configuration + * Configure ATE port 1, 2 and 3 on different AS, with boths AFI/SAFI + * Advertise IPv4 and IPv6 internal target, both, form both ATE port-1 and ATE port-2 in eBGP. + * [TODO] For ATE port 2 attach `link-bandwidth:23456:10K` extended-community + * [TODO] For ATE port 3 attach `link-bandwidth:23456:5K` extended-community + * Enable multipath, set maximum-paths limit to 2, enable allow multiple + AS, and send community type to [STANDARD, EXTENDED, LARGE] + * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/config/enabled + * [TODO] /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp/config/allow-multiple-as + * [TODO] /network-instances/network-instance/protocols/protocol/bgp/globalp/afi-safis/afi-safi/use-multiple-paths/ebgp/config/maximum-paths + * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/send-community-type + * /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ebgp/link-bandwidth-ext-community/config/enabled + * Advertise equal cost paths from port2 and port3 of ATE + * Initiate traffic from ATE port-1 to the DUT and destined to internal + target network. + * Use UDP traffic with src and dst port randomly selected from 1-65535 range for each packet. Or equivalent pattern guaranteeng high entropy of traffic. + * Behaviour Validation + * Check entries in AFT for advertised prefix, it should have 2 entries.\ + [TODO] The `weight` leafs of next-hops shall be in 2:1 ratio. + * Find next-hop-group IDs for both internal target networks: + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv4 internal target network]/state/**next-hop-group** + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv6 internal target network]/state/**next-hop-group** + * using next-hop-group as key find number and weight of next-hops of both internal target network + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/index + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/**weight** + * [TODO] Check entire traffic should be unequally forwarded between DUT + port2 and port3 only + * 66% via port2 + * 33% via port3 + * with +/-5% tolerance + +* [TODO] RT-1.52.2: Verify use of equal community type + + * Test Configuration + Use test configuration as in RT-1.52.1 above with following modifications: + * Advertise IPv4 and IPv6 internal target, both, form both ATE port-1 and ATE port-2 in eBGP. + * For ATE port 2 attach `link-bandwidth:23456:10K` extended-community + * For ATE port 3 attach `link-bandwidth:23456:10K` extended-community + * Behaviour Validation + * Check entries in AFT for advertised prefix, it should have 2 entries.\ + [TODO] The `weight` leafs of next-hops shall be in 1:1 ratio. + * Find next-hop-group IDs for both internal target networks: + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv4 internal target network]/state/**next-hop-group** + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv6 internal target network]/state/**next-hop-group** + * using next-hop-group as key find number and weight of next-hops of both internal target network + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/index + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/**weight** + * [TODO] Check entire traffic should be unequally forwarded between DUT + port2 and port3 only + * 50% via port2 + * 50% via port3 + * with +/-5% tolerance + +* [TODO] RT-1.52.3: Verify BGP multipath when some path missing link-bandwidth extended-community + + * Test Configuration + Use test configuration as in RT-1.52.1 above with following modifications: + * Configure ATE port 1, 2 and 3 on different AS, with boths AFI/SAFI + * Advertise IPv4 and IPv6 internal target, both, form both ATE port-1 and ATE port-2 in eBGP. + * For ATE port 2 attach `link-bandwidth:23456:10K` extended-community + * For ATE port 3 **DO NOT** attach any link-bandwidth extended-community + * Behaviour Validation + * Check entries in AFT for advertised prefix, it should have 2 entries.\ + [TODO] The `weight` leafs of next-hops shall be in 1:1 ratio. + * Find next-hop-group IDs for both internal target networks: + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv4 internal target network]/state/**next-hop-group** + * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry[prefix=IPv6 internal target network]/state/**next-hop-group** + * using next-hop-group as key find number and weight of next-hops of both internal target network + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/index + * /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=next-hop-group ID]/next-hops/next-hop/state/**weight** + * [TODO] Check entire traffic should be unequally forwarded between DUT + port2 and port3 only + * 50% via port2 + * 50% via port3 + * with +/-5% tolerance + ## Config Parameter Coverage * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/config/enabled -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/config/allow-multiple-as -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/config/maximum-paths +* /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp/config/allow-multiple-as +* /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp/config/maximum-paths * /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/send-community-type -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ebgp/link-bandwidth-ext-community/config/enabled +* /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ebgp/link-bandwidth-ext-community/config/enabled ## Telemetry Parameter Coverage -* /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state * /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group -* /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=]/state -* /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops +* /network-instances/network-instance/afts/next-hop-groups/next-hop-group[id=]/next-hops/next-hop[index=]/state/weight ## OpenConfig Path and RPC Coverage diff --git a/feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto b/feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto deleted file mode 100644 index 5d2b671575b..00000000000 --- a/feature/bgp/otg_tests/link_bandwidth_test/metadata.textproto +++ /dev/null @@ -1,41 +0,0 @@ -# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto -# proto-message: Metadata - -uuid: "a8344612-0db0-42a1-96cf-38846a7f1603" -plan_id: "RT-7.5" -description: "BGP Policy - Match and Set Link Bandwidth Community" -testbed: TESTBED_DUT_ATE_2LINKS -platform_exceptions: { - platform: { - vendor: ARISTA - } - deviations: { - route_policy_under_afi_unsupported: true - omit_l2_mtu: true - missing_value_for_defaults: true - interface_enabled: true - default_network_instance: "default" - skip_set_rp_match_set_options: true - skip_setting_disable_metric_propagation: true - bgp_conditions_match_community_set_unsupported: true - bgp_extended_community_index_unsupported: true - } -} -platform_exceptions: { - platform: { - vendor: CISCO - } - deviations: { - bgp_extended_community_set_unsupported: true - community_member_regex_unsupported: true - skip_setting_statement_for_policy: true - bgp_set_ext_community_set_refs_unsupported: true - bgp_delete_link_bandwidth_unsupported: true - skip_bgp_send_community_type: true - bgp_extended_community_index_unsupported: true - bgp_conditions_match_community_set_unsupported: true - bgp_explicit_extended_community_enable: true - } -} -tags: TAGS_AGGREGATION -tags: TAGS_DATACENTER_EDGE diff --git a/feature/bgp/otg_tests/link_bandwidth_test/README.md b/feature/bgp/policybase/otg_tests/link_bandwidth_test/README.md similarity index 75% rename from feature/bgp/otg_tests/link_bandwidth_test/README.md rename to feature/bgp/policybase/otg_tests/link_bandwidth_test/README.md index 4fa01af7fec..c725c5e4c7d 100644 --- a/feature/bgp/otg_tests/link_bandwidth_test/README.md +++ b/feature/bgp/policybase/otg_tests/link_bandwidth_test/README.md @@ -26,9 +26,9 @@ bandwidth communities to routes based on a prefix match. * Advertise ipv4 and ipv6 prefixes to DUT port 1 using the following communities: * prefix-set-1 with 2 ipv4 and 2 ipv6 routes without communities. * prefix-set-2 with 2 ipv4 and 2 ipv6 routes with communities `[ "100:100" ]`. - * prefix-set-3 with 2 ipv4 and 2 ipv6 routes with extended communities `[ "link-bandwidth:23456:0" ]`. + * [TODO value change] prefix-set-3 with 2 ipv4 and 2 ipv6 routes with extended communities `[ "link-bandwidth:23456:1000" ]`. * Configure Send community knob to IBGP neigbour to advertise the communities to IBGP peer - * use `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/send-community`. + * [TODO] use `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/send-community-type` leaf-list with value `[STANDARD EXTENDED]`. * RT-7.5.1 - Validate bgp sessions and traffic * For IPv4 and IPv6 prefixes: * Observe received prefixes at ATE port-2. @@ -48,18 +48,6 @@ bandwidth communities to routes based on a prefix match. * Create an ext-community-set named 'linkbw_any' with members as follows: * ext-community-member = [ "^link-bandwidth:.*:.*$" ] - - * Create a `/routing-policy/policy-definitions/policy-definition/policy-definition` named **'not_match_100_set_linkbw_1M'** with the following `statements` * statement[name='1-megabit-match']/ @@ -71,7 +59,7 @@ bandwidth communities to routes based on a prefix match. * actions/config/policy-result = ACCEPT_ROUTE * Create a `/routing-policy/policy-definitions/policy-definition/policy-definition` - named 'match_100_set_linkbw_2G' with the following `statements` + named **'match_100_set_linkbw_2G'** with the following `statements` * statement[name='2-gigabit-match']/ * conditions/bgp-conditions/match-community-set/config/community-set = 'regex_match_comm100' * conditions/bgp-conditions/match-community-set/config/match-set-options = ANY @@ -90,21 +78,7 @@ bandwidth communities to routes based on a prefix match. * statement[name='accept_all_routes']/ * actions/config/policy-result = ACCEPT_ROUTE - - - * For each policy-definition created, run a subtest (RT-7.8.3.x-) to + * For each policy-definition created, run a subtest (RT-7.5.3.x--import) to * Use gnmi Set REPLACE option for: * `/routing-policy/policy-definitions` to configure the policy * Use `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config/import-policy` @@ -119,32 +93,49 @@ bandwidth communities to routes based on a prefix match. * Expected community values for each policy | | set_linkbw_0 | not_match_100_set_linkbw_1M | | ------------ | -------------------------------------- | --------------------------- | - | prefix-set-1 | *DEPRECATED* | [none] | + | prefix-set-1 | *DEPRECATED* | [ "link-bandwidth:23456:1000000" ] | | prefix-set-2 | *DEPRECATED* | [ "100:100" ] | - | prefix-set-3 | *DEPRECATED* | [ "link-bandwidth:23456:0" ] | + | prefix-set-3 | *DEPRECATED* | [ "link-bandwidth:23456:1000000" ] | | | match_100_set_linkbw_2G | del_linkbw | rm_any_zero_bw_set_LocPref_5 | | ------------ | ------------------------------------------------- | ------------- | ---------------------------- | | prefix-set-1 | [ none ] | [none] | *DEPRECATED* | | prefix-set-2 | [ "100:100", "link-bandwidth:23456:2000000000" ] | [ "100:100" ] | *DEPRECATED* | - | prefix-set-3 | [ "link-bandwidth:23456:0" ] | [ none ] | *DEPRECATED* | + | prefix-set-3 | [ "link-bandwidth:23456:1000" ] | [ none ] | *DEPRECATED* | * Regarding prefix-set-3 and policy "nomatch_100_set_linkbw_2G" * prefix-set-3 is advertised to the DUT with community "link-bandwidth:100:0" set. * The DUT evaluates a match for "regex_nomatch_as100". This does not match because the regex pattern does not include the link-bandwidth community type. * Community linkbw_2G should be added. - - + +[TODO] For each policy-definition created, run a subtest (RT-7.5.4.x--export) to + + * Use gnmi Set REPLACE option to attach `allow_all` policy using `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config/export-policy` to apply the policy on the DUT bgp neighbor to the ATE port 1. + * Use gnmi Set REPLACE option for: + * `/routing-policy/policy-definitions` to configure the policy + * Use `/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config/export-policy` + to apply the policy on the DUT bgp neighbor to the ATE port 2. + * Verify expected communities are present in ATE port 2. + * Mark test as passing if Global Administartive valuee (ASN) of link-bakdwidth extended community **send by DUT** is either `23456` or ASN of DUT. + + * Expected community values for each policy + + | | set_linkbw_0 | not_match_100_set_linkbw_1M | + | ------------ | -------------------------------------- | --------------------------- | + | prefix-set-1 | *DEPRECATED* | [ "link-bandwidth:23456:1000000" ] | + | prefix-set-2 | *DEPRECATED* | [ "100:100" ] | + | prefix-set-3 | *DEPRECATED* | [ "link-bandwidth:23456:1000000" ] | + + | | match_100_set_linkbw_2G | del_linkbw | rm_any_zero_bw_set_LocPref_5 | + | ------------ | ------------------------------------------------- | ------------- | ---------------------------- | + | prefix-set-1 | [ none ] | [none] | *DEPRECATED* | + | prefix-set-2 | [ "100:100", "link-bandwidth:23456:2000000000" ] | [ "100:100" ] | *DEPRECATED* | + | prefix-set-3 | [ "link-bandwidth:23456:1000" ] | [ none ] | *DEPRECATED* | + + * Regarding prefix-set-3 and policy "nomatch_100_set_linkbw_2G" + * prefix-set-3 is advertised to the DUT with community "link-bandwidth:100:0" set. + * The DUT evaluates a match for "regex_nomatch_as100". This does not match because the regex pattern does not include the link-bandwidth community type. + * Community linkbw_2G should be added. ## OpenConfig Path and RPC Coverage @@ -154,7 +145,7 @@ The below yaml defines the OC paths intended to be covered by this test. OC pat paths: ## Config Parameter Coverage ## Configuration to enable advertise communities to bgp peer - /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/send-community: + /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/send-community-type: ## Policy for community-set configuration /routing-policy/defined-sets/bgp-defined-sets/ext-community-sets/ext-community-set/config/ext-community-set-name: /routing-policy/defined-sets/bgp-defined-sets/ext-community-sets/ext-community-set/config/ext-community-member: diff --git a/feature/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go b/feature/bgp/policybase/otg_tests/link_bandwidth_test/link_bandwidth_test.go similarity index 100% rename from feature/bgp/otg_tests/link_bandwidth_test/link_bandwidth_test.go rename to feature/bgp/policybase/otg_tests/link_bandwidth_test/link_bandwidth_test.go diff --git a/feature/bgp/policybase/otg_tests/link_bandwidth_test/metadata.textproto b/feature/bgp/policybase/otg_tests/link_bandwidth_test/metadata.textproto index 13552ef78af..5d2b671575b 100644 --- a/feature/bgp/policybase/otg_tests/link_bandwidth_test/metadata.textproto +++ b/feature/bgp/policybase/otg_tests/link_bandwidth_test/metadata.textproto @@ -1,7 +1,41 @@ # proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto # proto-message: Metadata -plan_id: "RT-7.5" -description: "BGP Policy - Set Link Bandwidth Community" -testbed: TESTBED_DUT_ATE_2LINKS -tags: TAGS_DATACENTER_EDGE +uuid: "a8344612-0db0-42a1-96cf-38846a7f1603" +plan_id: "RT-7.5" +description: "BGP Policy - Match and Set Link Bandwidth Community" +testbed: TESTBED_DUT_ATE_2LINKS +platform_exceptions: { + platform: { + vendor: ARISTA + } + deviations: { + route_policy_under_afi_unsupported: true + omit_l2_mtu: true + missing_value_for_defaults: true + interface_enabled: true + default_network_instance: "default" + skip_set_rp_match_set_options: true + skip_setting_disable_metric_propagation: true + bgp_conditions_match_community_set_unsupported: true + bgp_extended_community_index_unsupported: true + } +} +platform_exceptions: { + platform: { + vendor: CISCO + } + deviations: { + bgp_extended_community_set_unsupported: true + community_member_regex_unsupported: true + skip_setting_statement_for_policy: true + bgp_set_ext_community_set_refs_unsupported: true + bgp_delete_link_bandwidth_unsupported: true + skip_bgp_send_community_type: true + bgp_extended_community_index_unsupported: true + bgp_conditions_match_community_set_unsupported: true + bgp_explicit_extended_community_enable: true + } +} +tags: TAGS_AGGREGATION +tags: TAGS_DATACENTER_EDGE From e31c3a8c484b56a809847b743056ab5bedccfeae Mon Sep 17 00:00:00 2001 From: Suprith Hattikal <154515923+hattikals@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:33:19 +0530 Subject: [PATCH 26/27] Updated code and repo (#3058) --- .../zr_low_power_mode_test.go | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/feature/platform/transceiver/tests/zr_low_power_mode_test/zr_low_power_mode_test.go b/feature/platform/transceiver/tests/zr_low_power_mode_test/zr_low_power_mode_test.go index b8bdc687167..c43e72e44a2 100644 --- a/feature/platform/transceiver/tests/zr_low_power_mode_test/zr_low_power_mode_test.go +++ b/feature/platform/transceiver/tests/zr_low_power_mode_test/zr_low_power_mode_test.go @@ -21,6 +21,7 @@ import ( "time" "github.com/openconfig/featureprofiles/internal/cfgplugins" + "github.com/openconfig/featureprofiles/internal/components" "github.com/openconfig/featureprofiles/internal/fptest" "github.com/openconfig/featureprofiles/internal/samplestream" "github.com/openconfig/ondatra" @@ -30,8 +31,7 @@ import ( ) const ( - samplingInterval = 10 * time.Second - intUpdateTime = 2 * time.Minute + intUpdateTime = 2 * time.Minute ) func TestMain(m *testing.M) { @@ -82,7 +82,7 @@ func TestLowPowerMode(t *testing.T) { dut := ondatra.DUT(t, "dut") cfgplugins.InterfaceConfig(t, dut, dut.Port(t, "port1")) cfgplugins.InterfaceConfig(t, dut, dut.Port(t, "port2")) - + samplingInterval := 10 * time.Second for _, port := range []string{"port1", "port2"} { t.Run(fmt.Sprintf("Port:%s", port), func(t *testing.T) { dp := dut.Port(t, port) @@ -129,35 +129,36 @@ func TestLowPowerMode(t *testing.T) { gnmi.Await(t, dut, gnmi.OC().Interface(dp.Name()).OperStatus().State(), intUpdateTime, oc.Interface_OperStatus_DOWN) validateStreamOutput(t, allStream) - - opInst := samplestream.New(t, dut, gnmi.OC().Component(tr).OpticalChannel().OutputPower().Instant().State(), samplingInterval) + opticalChannelName := components.OpticalChannelComponentFromPort(t, dut, dp) + samplingInterval = time.Duration(gnmi.Get(t, dut, gnmi.OC().Component(opticalChannelName).OpticalChannel().OutputPower().Interval().State())) + opInst := samplestream.New(t, dut, gnmi.OC().Component(opticalChannelName).OpticalChannel().OutputPower().Instant().State(), samplingInterval) defer opInst.Close() if opInstN := opInst.Next(); opInstN != nil { - if _, ok := opInstN.Val(); ok { + if val, ok := opInstN.Val(); ok && val != -40 { t.Fatalf("streaming /components/component/optical-channel/state/output-power/instant is not expected to be reported") } } - opAvg := samplestream.New(t, dut, gnmi.OC().Component(tr).OpticalChannel().OutputPower().Avg().State(), samplingInterval) + opAvg := samplestream.New(t, dut, gnmi.OC().Component(opticalChannelName).OpticalChannel().OutputPower().Avg().State(), samplingInterval) defer opAvg.Close() if opAvgN := opAvg.Next(); opAvgN != nil { - if _, ok := opAvgN.Val(); ok { + if val, ok := opAvgN.Val(); ok && val != -40 { t.Fatalf("streaming /components/component/optical-channel/state/output-power/avg is not expected to be reported") } } - opMin := samplestream.New(t, dut, gnmi.OC().Component(tr).OpticalChannel().OutputPower().Min().State(), samplingInterval) + opMin := samplestream.New(t, dut, gnmi.OC().Component(opticalChannelName).OpticalChannel().OutputPower().Min().State(), samplingInterval) defer opMin.Close() if opMinN := opMin.Next(); opMinN != nil { - if _, ok := opMinN.Val(); ok { + if val, ok := opMinN.Val(); ok && val != -40 { t.Fatalf("streaming /components/component/optical-channel/state/output-power/min is not expected to be reported") } } - opMax := samplestream.New(t, dut, gnmi.OC().Component(tr).OpticalChannel().OutputPower().Max().State(), samplingInterval) + opMax := samplestream.New(t, dut, gnmi.OC().Component(opticalChannelName).OpticalChannel().OutputPower().Max().State(), samplingInterval) defer opMax.Close() if opMaxN := opMax.Next(); opMaxN != nil { - if _, ok := opMaxN.Val(); ok { + if val, ok := opMaxN.Val(); ok && val != -40 { t.Fatalf("streaming /components/component/optical-channel/state/output-power/max is not expected to be reported") } } @@ -173,7 +174,6 @@ func TestLowPowerMode(t *testing.T) { "min": opMin, "max": opMax, } - validateOutputPower(t, powerStreamMap) cfgplugins.ValidateInterfaceConfig(t, dut, dp) }) From 18512bb510a8b4a5758013eefa3184a9c583f3ad Mon Sep 17 00:00:00 2001 From: charantejag504 <123508277+charantejag504@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:21:58 -0700 Subject: [PATCH 27/27] Removing deviations (#2975) * removing deviations * fix static errors * update * update * update * fix static error * fix deviations * update * update * update * fix deviation * try fix --- .../telemetry_basic_check_test.go | 23 ++- .../gribi_scaling/metadata.textproto | 1 - .../README.md | 19 +++ .../metadata.textproto | 3 +- .../README.md | 18 +++ .../metadata.textproto | 1 - .../README.md | 21 +++ .../bursty_traffic_test.go | 48 +++--- .../bursty_traffic_test/metadata.textproto | 4 - .../mixed_sp_wrr_traffic_test/README.md | 56 +++++++ .../metadata.textproto | 2 - .../mixed_sp_wrr_traffic_test.go | 46 ++---- .../one_sp_queue_traffic_test/README.md | 56 +++++++ .../metadata.textproto | 3 - .../qos/otg_tests/qos_basic_test/README.md | 56 +++++++ .../qos_basic_test/metadata.textproto | 2 - .../qos_basic_test/qos_basic_test.go | 57 +++---- .../qos_output_queue_counters_test/README.md | 58 +++++++- .../metadata.textproto | 2 - .../qos_output_queue_counters_test.go | 46 ++---- .../two_sp_queue_traffic_test/README.md | 56 +++++++ .../metadata.textproto | 1 - .../qos/otg_tests/wrr_traffic_test/README.md | 56 +++++++ .../wrr_traffic_test/metadata.textproto | 1 - .../tests/qos_policy_config_test/README.md | 56 +++++++ .../qos_policy_config_test/metadata.textproto | 5 - .../qos_policy_config_test.go | 140 ++++++++---------- 27 files changed, 597 insertions(+), 240 deletions(-) diff --git a/feature/gnmi/otg_tests/telemetry_basic_check_test/telemetry_basic_check_test.go b/feature/gnmi/otg_tests/telemetry_basic_check_test/telemetry_basic_check_test.go index e66ca0d9af4..8747345ceac 100644 --- a/feature/gnmi/otg_tests/telemetry_basic_check_test/telemetry_basic_check_test.go +++ b/feature/gnmi/otg_tests/telemetry_basic_check_test/telemetry_basic_check_test.go @@ -328,18 +328,17 @@ func TestQoSCounters(t *testing.T) { path: qosQueuePath + "dropped-pkts", counters: gnmi.LookupAll(t, dut, queues.DroppedPkts().State()), }} - if !deviations.QOSDroppedOctets(dut) { - cases = append(cases, - struct { - desc string - path string - counters []*ygnmi.Value[uint64] - }{ - desc: "DroppedOctets", - path: qosQueuePath + "dropped-octets", - counters: gnmi.LookupAll(t, dut, queues.DroppedOctets().State()), - }) - } + cases = append(cases, + struct { + desc string + path string + counters []*ygnmi.Value[uint64] + }{ + desc: "DroppedOctets", + path: qosQueuePath + "dropped-octets", + counters: gnmi.LookupAll(t, dut, queues.DroppedOctets().State()), + }) + for _, tc := range cases { t.Run(tc.desc, func(t *testing.T) { diff --git a/feature/gribi/otg_tests/gribi_scaling/metadata.textproto b/feature/gribi/otg_tests/gribi_scaling/metadata.textproto index 981e65d1ab9..393d30f1bd5 100644 --- a/feature/gribi/otg_tests/gribi_scaling/metadata.textproto +++ b/feature/gribi/otg_tests/gribi_scaling/metadata.textproto @@ -32,7 +32,6 @@ platform_exceptions: { } deviations: { no_mix_of_tagged_and_untagged_subinterfaces: true - explicit_interface_ref_definition: true } } platform_exceptions: { diff --git a/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/README.md b/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/README.md index d2d65948ea1..026f4dd889f 100644 --- a/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/README.md +++ b/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/README.md @@ -141,3 +141,22 @@ rpcs: ## Minimum DUT platform requirement vRX + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: N/A + + ## State paths: + /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/weight: + +rpcs: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` \ No newline at end of file diff --git a/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/metadata.textproto b/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/metadata.textproto index 18b3f8b387b..cb1bef25af4 100644 --- a/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/metadata.textproto +++ b/feature/gribi/otg_tests/hierarchical_weight_resolution_pbf_test/metadata.textproto @@ -14,7 +14,7 @@ platform_exceptions: { ipv4_missing_enabled: true interface_ref_interface_id_format: true pf_require_match_default_rule: true - pf_require_sequential_order_pbr_rules: true + pf_require_sequential_order_pbr_rules: true } } platform_exceptions: { @@ -23,7 +23,6 @@ platform_exceptions: { } deviations: { hierarchical_weight_resolution_tolerance: 0.4 - explicit_interface_ref_definition: true } } platform_exceptions: { diff --git a/feature/gribi/otg_tests/hierarchical_weight_resolution_test/README.md b/feature/gribi/otg_tests/hierarchical_weight_resolution_test/README.md index 63bfca04b3c..d206b7660d1 100644 --- a/feature/gribi/otg_tests/hierarchical_weight_resolution_test/README.md +++ b/feature/gribi/otg_tests/hierarchical_weight_resolution_test/README.md @@ -142,3 +142,21 @@ rpcs: * vRX - virtual router device +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: N/A + + ## State paths: + /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/weight: + +rpcs: + gribi: + gRIBI.Get: + gRIBI.Modify: + gRIBI.Flush: +``` \ No newline at end of file diff --git a/feature/gribi/otg_tests/hierarchical_weight_resolution_test/metadata.textproto b/feature/gribi/otg_tests/hierarchical_weight_resolution_test/metadata.textproto index a7f0ebfbfb0..fb0c549af67 100644 --- a/feature/gribi/otg_tests/hierarchical_weight_resolution_test/metadata.textproto +++ b/feature/gribi/otg_tests/hierarchical_weight_resolution_test/metadata.textproto @@ -21,7 +21,6 @@ platform_exceptions: { } deviations: { hierarchical_weight_resolution_tolerance: 0.4 - explicit_interface_ref_definition: true } } platform_exceptions: { diff --git a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/README.md b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/README.md index 0f026d1ced4..9b02357681f 100644 --- a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/README.md +++ b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/README.md @@ -102,3 +102,24 @@ rpcs: ## Required DUT platform * MFF + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /interfaces/interface/config/enabled: + /interfaces/interface/subinterfaces/subinterface/ipv4/config/enabled: + /interfaces/interface/subinterfaces/subinterface/ipv6/config/enabled: + /components/component/fabric/config/power-admin-state: + + ## State paths: N/A + +rpcs: + gnmi: + gNMI.Set: + Replace: +``` \ No newline at end of file diff --git a/feature/qos/otg_tests/bursty_traffic_test/bursty_traffic_test.go b/feature/qos/otg_tests/bursty_traffic_test/bursty_traffic_test.go index 2e8e158c370..f0504b744a8 100644 --- a/feature/qos/otg_tests/bursty_traffic_test/bursty_traffic_test.go +++ b/feature/qos/otg_tests/bursty_traffic_test/bursty_traffic_test.go @@ -371,22 +371,12 @@ func TestBurstyTraffic(t *testing.T) { var counterNames []string counters := make(map[string]map[string]uint64) - if !deviations.QOSDroppedOctets(dut) { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", - "dutQosDroppedOctetsAfterTraffic", - } - } else { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedPktsAfterTraffic", - } + counterNames = []string{ + "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", + "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", + "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", + "dutQosDroppedOctetsAfterTraffic", } for _, name := range counterNames { @@ -420,13 +410,12 @@ func TestBurstyTraffic(t *testing.T) { } counters["dutQosDroppedPktsBeforeTraffic"][data.queue], _ = count.Val() - if !deviations.QOSDroppedOctets(dut) { - count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) - if !ok { - t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) - } - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) + if !ok { + t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) } + counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + } t.Logf("Running traffic 1 on DUT interfaces: %s => %s ", dp1.Name(), dp3.Name()) @@ -448,9 +437,8 @@ func TestBurstyTraffic(t *testing.T) { counters["dutQosPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitPkts().State()) counters["dutQosOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitOctets().State()) counters["dutQosDroppedPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedPkts().State()) - if !deviations.QOSDroppedOctets(dut) { - counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) - } + counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) + t.Logf("ateInPkts: %v, txPkts %v, Queue: %v", counters["ateInPkts"][data.queue], counters["dutQosPktsAfterTraffic"][data.queue], data.queue) if ateTxPkts == 0 { t.Fatalf("TxPkts == 0, want >0.") @@ -490,13 +478,11 @@ func TestBurstyTraffic(t *testing.T) { } } - if !deviations.QOSDroppedOctets(dut) { - ateDropOctetCounterDiff := (counters["ateOutPkts"][data.queue] - counters["ateInPkts"][data.queue]) * uint64(data.frameSize) - dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] - t.Logf("Queue %q: ateDropOctetCounterDiff: %v dutDropOctetCounterDiff: %v", data.queue, ateDropOctetCounterDiff, dutDropOctetCounterDiff) - if dutDropOctetCounterDiff < ateDropOctetCounterDiff { - t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want >= %v", data.queue, dutDropOctetCounterDiff, ateDropOctetCounterDiff) - } + ateDropOctetCounterDiff := (counters["ateOutPkts"][data.queue] - counters["ateInPkts"][data.queue]) * uint64(data.frameSize) + dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] + t.Logf("Queue %q: ateDropOctetCounterDiff: %v dutDropOctetCounterDiff: %v", data.queue, ateDropOctetCounterDiff, dutDropOctetCounterDiff) + if dutDropOctetCounterDiff < ateDropOctetCounterDiff { + t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want >= %v", data.queue, dutDropOctetCounterDiff, ateDropOctetCounterDiff) } } diff --git a/feature/qos/otg_tests/bursty_traffic_test/metadata.textproto b/feature/qos/otg_tests/bursty_traffic_test/metadata.textproto index 0f9af70b1d7..7ee4ccb49c0 100644 --- a/feature/qos/otg_tests/bursty_traffic_test/metadata.textproto +++ b/feature/qos/otg_tests/bursty_traffic_test/metadata.textproto @@ -17,10 +17,6 @@ platform_exceptions: { platform: { vendor: JUNIPER } - deviations: { - explicit_interface_ref_definition: true - qos_dropped_octets: true - } } platform_exceptions: { platform: { diff --git a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/README.md b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/README.md index 09c58f2d08b..adbb4e22acf 100644 --- a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/README.md +++ b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/README.md @@ -150,3 +150,59 @@ forwards AF3, AF2, AF1, BE1 and BE0 based on weight. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/metadata.textproto b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/metadata.textproto index cf011351b89..34786e74bae 100644 --- a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/metadata.textproto +++ b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/metadata.textproto @@ -18,8 +18,6 @@ platform_exceptions: { vendor: JUNIPER } deviations: { - explicit_interface_ref_definition: true - qos_dropped_octets: true scheduler_input_weight_limit: true } } diff --git a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/mixed_sp_wrr_traffic_test.go b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/mixed_sp_wrr_traffic_test.go index 4016f751681..1ef4e4f42d5 100644 --- a/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/mixed_sp_wrr_traffic_test.go +++ b/feature/qos/otg_tests/mixed_sp_wrr_traffic_test/mixed_sp_wrr_traffic_test.go @@ -530,19 +530,11 @@ func TestMixedSPWrrTraffic(t *testing.T) { var counterNames []string counters := make(map[string]map[string]uint64) - if !deviations.QOSDroppedOctets(dut) { - counterNames = []string{ - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", - "dutQosDroppedOctetsAfterTraffic", - } - } else { - counterNames = []string{ - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedPktsAfterTraffic", - } + counterNames = []string{ + "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", + "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", + "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", + "dutQosDroppedOctetsAfterTraffic", } for _, name := range counterNames { @@ -576,13 +568,11 @@ func TestMixedSPWrrTraffic(t *testing.T) { } counters["dutQosDroppedPktsBeforeTraffic"][data.queue], _ = count.Val() - if !deviations.QOSDroppedOctets(dut) { - count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) - if !ok { - t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) - } - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) + if !ok { + t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) } + counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() } t.Logf("Running traffic 1 on DUT interfaces: %s => %s ", dp1.Name(), dp3.Name()) @@ -601,9 +591,7 @@ func TestMixedSPWrrTraffic(t *testing.T) { counters["dutQosPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitPkts().State()) counters["dutQosOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitOctets().State()) counters["dutQosDroppedPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedPkts().State()) - if !deviations.QOSDroppedOctets(dut) { - counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) - } + counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) t.Logf("ateInPkts: %v, txPkts %v, Queue: %v", counters["ateInPkts"][data.queue], counters["dutQosPktsAfterTraffic"][data.queue], data.queue) // Calculate aggregated throughput: @@ -666,14 +654,12 @@ func TestMixedSPWrrTraffic(t *testing.T) { } } - if !deviations.QOSDroppedOctets(dut) { - ateDropOctetCounterDiff := (counters["ateOutPkts"][data.queue] - counters["ateInPkts"][data.queue]) * uint64(data.frameSize) - dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] - t.Logf("Queue %q: ateDropOctetCounterDiff: %v dutDropOctetCounterDiff: %v", data.queue, ateDropOctetCounterDiff, dutDropOctetCounterDiff) - if dutDropOctetCounterDiff < ateDropOctetCounterDiff { - if !deviations.DequeueDeleteNotCountedAsDrops(dut) { - t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want >= %v", data.queue, dutDropOctetCounterDiff, ateDropOctetCounterDiff) - } + ateDropOctetCounterDiff := (counters["ateOutPkts"][data.queue] - counters["ateInPkts"][data.queue]) * uint64(data.frameSize) + dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] + t.Logf("Queue %q: ateDropOctetCounterDiff: %v dutDropOctetCounterDiff: %v", data.queue, ateDropOctetCounterDiff, dutDropOctetCounterDiff) + if dutDropOctetCounterDiff < ateDropOctetCounterDiff { + if !deviations.DequeueDeleteNotCountedAsDrops(dut) { + t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want >= %v", data.queue, dutDropOctetCounterDiff, ateDropOctetCounterDiff) } } diff --git a/feature/qos/otg_tests/one_sp_queue_traffic_test/README.md b/feature/qos/otg_tests/one_sp_queue_traffic_test/README.md index d2cd200b781..2c357ec3166 100644 --- a/feature/qos/otg_tests/one_sp_queue_traffic_test/README.md +++ b/feature/qos/otg_tests/one_sp_queue_traffic_test/README.md @@ -136,3 +136,59 @@ Verify that DUT drops AF4, AF3, AF2, AF1, BE1 and BE0 before NC1. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/one_sp_queue_traffic_test/metadata.textproto b/feature/qos/otg_tests/one_sp_queue_traffic_test/metadata.textproto index 5ad022dedf8..24e2c3193d3 100644 --- a/feature/qos/otg_tests/one_sp_queue_traffic_test/metadata.textproto +++ b/feature/qos/otg_tests/one_sp_queue_traffic_test/metadata.textproto @@ -17,9 +17,6 @@ platform_exceptions: { platform: { vendor: JUNIPER } - deviations: { - explicit_interface_ref_definition: true - } } platform_exceptions: { platform: { diff --git a/feature/qos/otg_tests/qos_basic_test/README.md b/feature/qos/otg_tests/qos_basic_test/README.md index 27c82a5bd18..e836aa0fc66 100644 --- a/feature/qos/otg_tests/qos_basic_test/README.md +++ b/feature/qos/otg_tests/qos_basic_test/README.md @@ -164,3 +164,59 @@ Verify that DUT supports QoS config and forward QoS traffic correctly. ## Required DUT platform * FFF + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/qos_basic_test/metadata.textproto b/feature/qos/otg_tests/qos_basic_test/metadata.textproto index e85163ec382..c980b0c2817 100644 --- a/feature/qos/otg_tests/qos_basic_test/metadata.textproto +++ b/feature/qos/otg_tests/qos_basic_test/metadata.textproto @@ -19,8 +19,6 @@ platform_exceptions: { } deviations: { ecn_profile_required_definition: true - explicit_interface_ref_definition: true - qos_dropped_octets: true } } platform_exceptions: { diff --git a/feature/qos/otg_tests/qos_basic_test/qos_basic_test.go b/feature/qos/otg_tests/qos_basic_test/qos_basic_test.go index b4ae086cc22..dbf632ad50d 100644 --- a/feature/qos/otg_tests/qos_basic_test/qos_basic_test.go +++ b/feature/qos/otg_tests/qos_basic_test/qos_basic_test.go @@ -399,24 +399,13 @@ func TestBasicConfigWithTraffic(t *testing.T) { ate.OTG().StartProtocols(t) counters := make(map[string]map[string]uint64) - var counterNames []string - if !deviations.QOSDroppedOctets(dut) { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", - "dutQosDroppedOctetsAfterTraffic", - } - } else { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedPktsAfterTraffic", - } + var counterNames = []string{ + "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", + "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", + "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", + "dutQosDroppedOctetsAfterTraffic", } for _, name := range counterNames { @@ -450,13 +439,12 @@ func TestBasicConfigWithTraffic(t *testing.T) { } counters["dutQosDroppedPktsBeforeTraffic"][data.queue], _ = count.Val() - if !deviations.QOSDroppedOctets(dut) { - count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) - if !ok { - t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) - } - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) + if !ok { + t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp3.Name(), data.queue, timeout) } + counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + } t.Logf("Running traffic 1 on DUT interfaces: %s => %s ", dp1.Name(), dp3.Name()) @@ -476,9 +464,8 @@ func TestBasicConfigWithTraffic(t *testing.T) { counters["dutQosPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitPkts().State()) counters["dutQosOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).TransmitOctets().State()) counters["dutQosDroppedPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedPkts().State()) - if !deviations.QOSDroppedOctets(dut) { - counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) - } + counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State()) + t.Logf("ateInPkts: %v, txPkts %v, Queue: %v", counters["ateInPkts"][data.queue], counters["dutQosPktsAfterTraffic"][data.queue], data.queue) if ateTxPkts == 0 { @@ -519,13 +506,12 @@ func TestBasicConfigWithTraffic(t *testing.T) { } } - if !deviations.QOSDroppedOctets(dut) { - dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] - t.Logf("Queue %q: dutDropOctetCounterDiff: %v", data.queue, dutDropOctetCounterDiff) - if dutDropOctetCounterDiff != 0 { - t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want 0", data.queue, dutDropOctetCounterDiff) - } + dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] + t.Logf("Queue %q: dutDropOctetCounterDiff: %v", data.queue, dutDropOctetCounterDiff) + if dutDropOctetCounterDiff != 0 { + t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want 0", data.queue, dutDropOctetCounterDiff) } + } // gnmi subscribe sample mode(10 and 15 seconds sample interval) for queue counters @@ -545,12 +531,11 @@ func TestBasicConfigWithTraffic(t *testing.T) { if len(droppedPkts) < minWant { t.Errorf("DroppedPkts: got %d, want >= %d", len(droppedPkts), minWant) } - if !deviations.QOSDroppedOctets(dut) { - droppedOctets := gnmi.Collect(t, gnmiOpts(t, dut, sampleInterval), gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), subscribeTimeout).Await(t) - if len(droppedOctets) < minWant { - t.Errorf("DroppedOctets: got %d, want >= %d", len(droppedOctets), minWant) - } + droppedOctets := gnmi.Collect(t, gnmiOpts(t, dut, sampleInterval), gnmi.OC().Qos().Interface(dp3.Name()).Output().Queue(data.queue).DroppedOctets().State(), subscribeTimeout).Await(t) + if len(droppedOctets) < minWant { + t.Errorf("DroppedOctets: got %d, want >= %d", len(droppedOctets), minWant) } + } } }) diff --git a/feature/qos/otg_tests/qos_output_queue_counters_test/README.md b/feature/qos/otg_tests/qos_output_queue_counters_test/README.md index eb8bb04af09..9fab7d0d7e8 100644 --- a/feature/qos/otg_tests/qos_output_queue_counters_test/README.md +++ b/feature/qos/otg_tests/qos_output_queue_counters_test/README.md @@ -13,7 +13,7 @@ Validate QoS interface output queue counters. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets - + ## Config Parameter coverage * /interfaces/interface/config/enabled @@ -26,3 +26,59 @@ Validate QoS interface output queue counters. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/qos_output_queue_counters_test/metadata.textproto b/feature/qos/otg_tests/qos_output_queue_counters_test/metadata.textproto index f6a3bbf0e12..75b7900893e 100644 --- a/feature/qos/otg_tests/qos_output_queue_counters_test/metadata.textproto +++ b/feature/qos/otg_tests/qos_output_queue_counters_test/metadata.textproto @@ -19,8 +19,6 @@ platform_exceptions: { } deviations: { scheduler_input_weight_limit: true - explicit_interface_ref_definition: true - qos_dropped_octets: true } } platform_exceptions: { diff --git a/feature/qos/otg_tests/qos_output_queue_counters_test/qos_output_queue_counters_test.go b/feature/qos/otg_tests/qos_output_queue_counters_test/qos_output_queue_counters_test.go index 3ba558b3091..82353b5eef1 100644 --- a/feature/qos/otg_tests/qos_output_queue_counters_test/qos_output_queue_counters_test.go +++ b/feature/qos/otg_tests/qos_output_queue_counters_test/qos_output_queue_counters_test.go @@ -178,22 +178,12 @@ func TestQoSCounters(t *testing.T) { var counterNames []string counters := make(map[string]map[string]uint64) - if !deviations.QOSDroppedOctets(dut) { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", - "dutQosDroppedOctetsAfterTraffic", - } - } else { - counterNames = []string{ - - "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", - "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", - "dutQosDroppedPktsAfterTraffic", - } + counterNames = []string{ + "ateOutPkts", "ateInPkts", "dutQosPktsBeforeTraffic", "dutQosOctetsBeforeTraffic", + "dutQosPktsAfterTraffic", "dutQosOctetsAfterTraffic", "dutQosDroppedPktsBeforeTraffic", + "dutQosDroppedOctetsBeforeTraffic", "dutQosDroppedPktsAfterTraffic", + "dutQosDroppedOctetsAfterTraffic", } for _, name := range counterNames { @@ -226,13 +216,12 @@ func TestQoSCounters(t *testing.T) { } counters["dutQosDroppedPktsBeforeTraffic"][data.queue], _ = count.Val() - if !deviations.QOSDroppedOctets(dut) { - count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) - if !ok { - t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp2.Name(), data.queue, timeout) - } - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + count, ok = gnmi.Watch(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).DroppedOctets().State(), timeout, isPresent).Await(t) + if !ok { + t.Errorf("DroppedOctets count for queue %q on interface %q not available within %v", dp2.Name(), data.queue, timeout) } + counters["dutQosDroppedOctetsBeforeTraffic"][data.queue], _ = count.Val() + } ate.OTG().PushConfig(t, top) @@ -254,9 +243,8 @@ func TestQoSCounters(t *testing.T) { counters["dutQosPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).TransmitPkts().State()) counters["dutQosOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).TransmitOctets().State()) counters["dutQosDroppedPktsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).DroppedPkts().State()) - if !deviations.QOSDroppedOctets(dut) { - counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).DroppedOctets().State()) - } + counters["dutQosDroppedOctetsAfterTraffic"][data.queue] = gnmi.Get(t, dut, gnmi.OC().Qos().Interface(dp2.Name()).Output().Queue(data.queue).DroppedOctets().State()) + t.Logf("ateInPkts: %v, txPkts %v, Queue: %v", counters["ateInPkts"][data.queue], counters["dutQosPktsAfterTraffic"][data.queue], data.queue) ateTxPkts := gnmi.Get(t, ate.OTG(), gnmi.OTG().Flow(trafficID).Counters().OutPkts().State()) @@ -296,12 +284,10 @@ func TestQoSCounters(t *testing.T) { } } - if !deviations.QOSDroppedOctets(dut) { - dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] - t.Logf("Queue %q: dutDropOctetCounterDiff: %v", data.queue, dutDropOctetCounterDiff) - if dutDropOctetCounterDiff != 0 { - t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want 0", data.queue, dutDropOctetCounterDiff) - } + dutDropOctetCounterDiff := counters["dutQosDroppedOctetsAfterTraffic"][data.queue] - counters["dutQosDroppedOctetsBeforeTraffic"][data.queue] + t.Logf("Queue %q: dutDropOctetCounterDiff: %v", data.queue, dutDropOctetCounterDiff) + if dutDropOctetCounterDiff != 0 { + t.Errorf("Get dutDropOctetCounterDiff for queue %q: got %v, want 0", data.queue, dutDropOctetCounterDiff) } } diff --git a/feature/qos/otg_tests/two_sp_queue_traffic_test/README.md b/feature/qos/otg_tests/two_sp_queue_traffic_test/README.md index 69c06f27d9b..4fdc68784a5 100644 --- a/feature/qos/otg_tests/two_sp_queue_traffic_test/README.md +++ b/feature/qos/otg_tests/two_sp_queue_traffic_test/README.md @@ -160,3 +160,59 @@ Verify that DUT drops AF3, AF2, AF1, BE1 and BE0 before AF4 before NC1. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/two_sp_queue_traffic_test/metadata.textproto b/feature/qos/otg_tests/two_sp_queue_traffic_test/metadata.textproto index bc1316ff266..a439925272e 100644 --- a/feature/qos/otg_tests/two_sp_queue_traffic_test/metadata.textproto +++ b/feature/qos/otg_tests/two_sp_queue_traffic_test/metadata.textproto @@ -18,7 +18,6 @@ platform_exceptions: { vendor: JUNIPER } deviations: { - explicit_interface_ref_definition: true scheduler_input_weight_limit: true } } diff --git a/feature/qos/otg_tests/wrr_traffic_test/README.md b/feature/qos/otg_tests/wrr_traffic_test/README.md index 1a981ac4d5e..c9361579b70 100644 --- a/feature/qos/otg_tests/wrr_traffic_test/README.md +++ b/feature/qos/otg_tests/wrr_traffic_test/README.md @@ -145,3 +145,59 @@ Verify that DUT forwards AF3, AF2, AF1, BE0 and BE1 traffic based on WRR weight. * /qos/interfaces/interface/output/queues/queue/state/transmit-octets * /qos/interfaces/interface/output/queues/queue/state/dropped-pkts * /qos/interfaces/interface/output/queues/queue/state/dropped-octets + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/otg_tests/wrr_traffic_test/metadata.textproto b/feature/qos/otg_tests/wrr_traffic_test/metadata.textproto index d50a81212bb..f81dfe8c4b3 100644 --- a/feature/qos/otg_tests/wrr_traffic_test/metadata.textproto +++ b/feature/qos/otg_tests/wrr_traffic_test/metadata.textproto @@ -18,7 +18,6 @@ platform_exceptions: { vendor: JUNIPER } deviations: { - explicit_interface_ref_definition: true scheduler_input_weight_limit: true } } diff --git a/feature/qos/tests/qos_policy_config_test/README.md b/feature/qos/tests/qos_policy_config_test/README.md index 2a556389500..949e9c4d835 100644 --- a/feature/qos/tests/qos_policy_config_test/README.md +++ b/feature/qos/tests/qos_policy_config_test/README.md @@ -172,3 +172,59 @@ Verify QoS policy feature configuration. * /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type * /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue * /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## Config paths: + /qos/forwarding-groups/forwarding-group/config/name: + /qos/forwarding-groups/forwarding-group/config/output-queue: + /qos/queues/queue/config/name: + /qos/classifiers/classifier/config/name: + /qos/classifiers/classifier/config/type: + /qos/classifiers/classifier/terms/term/actions/config/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp-set: + /qos/classifiers/classifier/terms/term/config/id: + /qos/interfaces/interface/output/queues/queue/config/name: + /qos/interfaces/interface/input/classifiers/classifier/config/name: + /qos/interfaces/interface/output/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/config/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config/weight: + + ## State paths: + /qos/forwarding-groups/forwarding-group/state/name: + /qos/forwarding-groups/forwarding-group/state/output-queue: + /qos/queues/queue/state/name: + /qos/classifiers/classifier/state/name: + /qos/classifiers/classifier/state/type: + /qos/classifiers/classifier/terms/term/actions/state/target-group: + /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp-set: + /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp-set: + /qos/classifiers/classifier/terms/term/state/id: + /qos/interfaces/interface/output/queues/queue/state/name: + /qos/interfaces/interface/input/classifiers/classifier/state/name: + /qos/interfaces/interface/output/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/state/name: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/priority: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/sequence: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state/type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/id: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/input-type: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/queue: + /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state/weight: + +rpcs: + gnmi: + gNMI.Set: + Replace: \ No newline at end of file diff --git a/feature/qos/tests/qos_policy_config_test/metadata.textproto b/feature/qos/tests/qos_policy_config_test/metadata.textproto index 2933884e6da..bb92f5f7756 100644 --- a/feature/qos/tests/qos_policy_config_test/metadata.textproto +++ b/feature/qos/tests/qos_policy_config_test/metadata.textproto @@ -9,9 +9,4 @@ platform_exceptions: { platform: { vendor: JUNIPER } - deviations: { - state_path_unsupported: true - drop_weight_leaves_unsupported: true - explicit_interface_ref_definition: true - } } diff --git a/feature/qos/tests/qos_policy_config_test/qos_policy_config_test.go b/feature/qos/tests/qos_policy_config_test/qos_policy_config_test.go index e035af3e562..22cb3fe95a8 100644 --- a/feature/qos/tests/qos_policy_config_test/qos_policy_config_test.go +++ b/feature/qos/tests/qos_policy_config_test/qos_policy_config_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/openconfig/featureprofiles/internal/deviations" "github.com/openconfig/featureprofiles/internal/fptest" "github.com/openconfig/featureprofiles/internal/qoscfg" "github.com/openconfig/ondatra" @@ -1437,13 +1436,11 @@ func testJuniperClassifierConfig(t *testing.T) { if got, want := gnmi.Get(t, dut, classifier.Type().State()), tc.classType; got != want { t.Errorf("classifier.Type().State(): got %v, want %v", got, want) } - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, term.Id().State()), tc.termID; got != want { - t.Errorf("term.Id().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, action.TargetGroup().State()), tc.targetGroup; got != want { - t.Errorf("action.TargetGroup().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, term.Id().State()), tc.termID; got != want { + t.Errorf("term.Id().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, action.TargetGroup().State()), tc.targetGroup; got != want { + t.Errorf("action.TargetGroup().State(): got %v, want %v", got, want) // This Transformer sorts a []uint8. trans := cmp.Transformer("Sort", func(in []uint8) []uint8 { @@ -1483,28 +1480,27 @@ func testJuniperClassifierConfig(t *testing.T) { targetGroup: "target-group-BE1", queueName: "0", }} - if !deviations.StatePathsUnsupported(dut) { - cases = append(cases, - struct { - desc string - inputClassifierType oc.E_Input_Classifier_Type - classifier string - classType oc.E_Qos_Classifier_Type - termID string - dscpSet []uint8 - targetGroup string - queueName string - }{ - desc: "Input Classifier Type IPV6", - inputClassifierType: oc.Input_Classifier_Type_IPV6, - classifier: "dscp_based_classifier_ipv6", - classType: oc.Qos_Classifier_Type_IPV6, - termID: "0", - targetGroup: "target-group-BE1", - dscpSet: []uint8{0, 1, 2, 3}, - queueName: "0", - }) - } + cases = append(cases, + struct { + desc string + inputClassifierType oc.E_Input_Classifier_Type + classifier string + classType oc.E_Qos_Classifier_Type + termID string + dscpSet []uint8 + targetGroup string + queueName string + }{ + desc: "Input Classifier Type IPV6", + inputClassifierType: oc.Input_Classifier_Type_IPV6, + classifier: "dscp_based_classifier_ipv6", + classType: oc.Qos_Classifier_Type_IPV6, + termID: "0", + targetGroup: "target-group-BE1", + dscpSet: []uint8{0, 1, 2, 3}, + queueName: "0", + }) + dp := dut.Port(t, "port1") ip := &oc.Interface{Name: ygot.String(dp.Name())} ip.Type = oc.IETFInterfaces_InterfaceType_ethernetCsmacd @@ -1634,25 +1630,23 @@ func testJuniperSchedulerPoliciesConfig(t *testing.T) { scheduler := gnmi.OC().Qos().SchedulerPolicy("scheduler").Scheduler(tc.sequence) input := scheduler.Input(tc.inputID) - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, input.Id().State()), tc.inputID; got != want { - t.Errorf("input.Id().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, input.InputType().State()), oc.Input_InputType_QUEUE; got != want { - t.Errorf("input.InputType().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, input.Weight().State()), tc.weight; got != want { - t.Errorf("input.Weight().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, input.Queue().State()), tc.queueName; got != want { - t.Errorf("input.Queue().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, scheduler.Sequence().State()), tc.sequence; got != want { - t.Errorf("scheduler.Sequence().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, scheduler.Priority().State()), tc.priority; got != want { - t.Errorf("scheduler.Priority().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, input.Id().State()), tc.inputID; got != want { + t.Errorf("input.Id().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, input.InputType().State()), oc.Input_InputType_QUEUE; got != want { + t.Errorf("input.InputType().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, input.Weight().State()), tc.weight; got != want { + t.Errorf("input.Weight().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, input.Queue().State()), tc.queueName; got != want { + t.Errorf("input.Queue().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, scheduler.Sequence().State()), tc.sequence; got != want { + t.Errorf("scheduler.Sequence().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, scheduler.Priority().State()), tc.priority; got != want { + t.Errorf("scheduler.Priority().State(): got %v, want %v", got, want) } } @@ -1690,25 +1684,21 @@ func testJuniperSchedulerPoliciesConfig(t *testing.T) { if got, want := gnmi.Get(t, dut, wredUniform.MaxDropProbabilityPercent().State()), ecnConfig.maxDropProbabilityPercent; got != want { t.Errorf("wredUniform.MaxDropProbabilityPercent().State(): got %v, want %v", got, want) } - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { - t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { - t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want { + t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want) } - if !deviations.DropWeightLeavesUnsupported(dut) { - uniform.SetDrop(ecnConfig.dropEnabled) - uniform.SetWeight(ecnConfig.weight) - gnmi.Replace(t, dut, gnmi.OC().Qos().Config(), q) + if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want { + t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want) + } + uniform.SetDrop(ecnConfig.dropEnabled) + uniform.SetWeight(ecnConfig.weight) + gnmi.Replace(t, dut, gnmi.OC().Qos().Config(), q) - if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { - t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { - t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want { + t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want { + t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want) } cases := []struct { @@ -1752,16 +1742,14 @@ func testJuniperSchedulerPoliciesConfig(t *testing.T) { // Verify the policy is applied by checking the telemetry path state values. policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy() outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.targetGroup) - if !deviations.StatePathsUnsupported(dut) { - if got, want := gnmi.Get(t, dut, policy.Name().State()), "scheduler"; got != want { - t.Errorf("policy.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.targetGroup; got != want { - t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) - } - if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), "DropProfile"; got != want { - t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) - } + if got, want := gnmi.Get(t, dut, policy.Name().State()), "scheduler"; got != want { + t.Errorf("policy.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.targetGroup; got != want { + t.Errorf("outQueue.Name().State(): got %v, want %v", got, want) + } + if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), "DropProfile"; got != want { + t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want) } if got, want := gnmi.Get(t, dut, wredUniform.EnableEcn().State()), ecnConfig.ecnEnabled; got != want { t.Errorf("wredUniform.EnableEcn().State(): got %v, want %v", got, want)