From dc08c6f7100ea4cc6a6fa14f8708d4d2f7d0de16 Mon Sep 17 00:00:00 2001 From: Tushar Rathod <111466464+trathod1@users.noreply.github.com> Date: Thu, 26 Dec 2024 07:22:01 -0500 Subject: [PATCH] GNMI-1.18: Skipping check for empty integrated-circuit and removing deviations (#3560) * GNMI-1.18: Skipping check for empty integrated-circuit and removing deviations 1. Removing all deviations for Nokia 2. Skipping checks for empty integrated-circuit/switch-chip "This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind." * updated the commit to use findActiveComponenet function * Restoring the check for removable component --------- Co-authored-by: krisb --- .../metadata.textproto | 12 ------------ .../sampled_backplane_capacity_counters_test.go | 12 +++--------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/metadata.textproto b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/metadata.textproto index 099686c7f73..6dad9d53b5d 100644 --- a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/metadata.textproto +++ b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/metadata.textproto @@ -13,18 +13,6 @@ platform_exceptions: { ipv4_missing_enabled: true } } -platform_exceptions: { - platform: { - vendor: NOKIA - } - deviations: { - interface_enabled: true - explicit_port_speed: true - explicit_interface_in_default_vrf: true - qos_queue_requires_id: true - missing_value_for_defaults: true - } -} platform_exceptions: { platform: { vendor: ARISTA diff --git a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/sampled_backplane_capacity_counters_test.go b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/sampled_backplane_capacity_counters_test.go index 651bb61d582..0fe6d2973ad 100644 --- a/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/sampled_backplane_capacity_counters_test.go +++ b/feature/platform/fabric/otg_tests/sampled_backplane_capacity_counters_test/sampled_backplane_capacity_counters_test.go @@ -53,7 +53,7 @@ func TestMain(m *testing.M) { func TestSampledBackplaneCapacityCounters(t *testing.T) { dut := ondatra.DUT(t, "dut") - ics := components.FindComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_INTEGRATED_CIRCUIT) + ics := components.FindActiveComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_INTEGRATED_CIRCUIT) if len(ics) == 0 { t.Fatalf("Get IntegratedCircuit card list for %q: got 0, want > 0", dut.Model()) } @@ -65,7 +65,6 @@ func TestSampledBackplaneCapacityCounters(t *testing.T) { if !isCompNameExpected(t, ic, dut.Vendor()) { continue } - t.Run(fmt.Sprintf("Backplane:%s", ic), func(t *testing.T) { if deviations.BackplaneFacingCapacityUnsupported(dut) { t.Skipf("Skipping check for BackplanceFacingCapacity due to deviation BackplaneFacingCapacityUnsupported") @@ -110,20 +109,16 @@ func gnmiOptsForOnChange(t *testing.T, dut *ondatra.DUTDevice) *gnmi.Opts { func TestOnChangeBackplaneCapacityCounters(t *testing.T) { dut := ondatra.DUT(t, "dut") - ics := components.FindComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_INTEGRATED_CIRCUIT) + ics := components.FindActiveComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_INTEGRATED_CIRCUIT) if len(ics) == 0 { t.Fatalf("Get IntegratedCircuit card list for %q: got 0, want > 0", dut.Model()) } t.Logf("IntegratedCircuit components count: %d", len(ics)) - fabrics := components.FindComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FABRIC) + fabrics := components.FindActiveComponentsByType(t, dut, oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FABRIC) t.Logf("fabrics are %v", fabrics) removable_fabrics := make([]string, 0) for _, f := range fabrics { - compMtyVal, compMtyPresent := gnmi.Lookup(t, dut, gnmi.OC().Component(f).Empty().State()).Val() - if compMtyPresent && compMtyVal { - continue - } if gnmi.Get(t, dut, gnmi.OC().Component(f).Removable().State()) { removable_fabrics = append(removable_fabrics, f) } @@ -226,7 +221,6 @@ func getBackplaneCapacityCounters(t *testing.T, dut *ondatra.DUTDevice, ics []st if !isCompNameExpected(t, ic, dut.Vendor()) { continue } - t.Run(fmt.Sprintf("Backplane:%s", ic), func(t *testing.T) { if deviations.BackplaneFacingCapacityUnsupported(dut) { t.Skipf("Skipping check for BackplanceFacingCapacity due to deviation BackplaneFacingCapacityUnsupported")