Skip to content

Commit

Permalink
Merge branch 'main' into ANCX_QOS13
Browse files Browse the repository at this point in the history
  • Loading branch information
charantejag504 authored Sep 11, 2023
2 parents 2604010 + 5902d56 commit 1ae8c6e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ platform_exceptions: {
vendor: CISCO
}
deviations: {
component_power_down_returns_inactive_state: true
skip_fabric_card_power_admin: true
skip_controller_card_power_admin: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,11 @@ func powerDownUp(t *testing.T, dut *ondatra.DUTDevice, name string, cType oc.E_P
}
t.Logf("Component %s, power-admin-state after %f minutes: %v", name, time.Since(start).Minutes(), power)

if deviations.ComponentPowerDownReturnsInactiveState(dut) {
oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_INACTIVE).Val()
if !ok {
t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_INACTIVE)
}
t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper)
} else {
oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED).Val()
if !ok {
t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED)
}
t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper)
oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED).Val()
if !ok {
t.Errorf("Component %s oper-status, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_DISABLED)
}
t.Logf("Component %s, oper-status after %f minutes: %v", name, time.Since(start).Minutes(), oper)
start = time.Now()
t.Logf("Starting %s POWER_ENABLE", name)
gnmi.Replace(t, dut, config, oc.Platform_ComponentPowerType_POWER_ENABLED)
Expand All @@ -171,7 +163,7 @@ func powerDownUp(t *testing.T, dut *ondatra.DUTDevice, name string, cType oc.E_P
t.Logf("Component %s, power-admin-state after %f minutes: %v", name, time.Since(start).Minutes(), power)
}

oper, ok := gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE).Val()
oper, ok = gnmi.Await(t, dut, c.OperStatus().State(), timeout, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE).Val()
if !ok {
t.Errorf("Component %s oper-status after POWER_ENABLED, got: %v, want: %v", name, oper, oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE)
}
Expand Down
6 changes: 0 additions & 6 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,6 @@ func SkipFabricCardPowerAdmin(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetSkipFabricCardPowerAdmin()
}

// ComponentPowerDownReturnsInactiveState returns whether the device should allow the component power Down state inactive.
// Default value is false and expected component power down state is shutdown.
func ComponentPowerDownReturnsInactiveState(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetComponentPowerDownReturnsInactiveState()
}

// ISISRequireSameL1MetricWithL2Metric returns true for devices that require configuring
// the same ISIS Metrics for Level 1 when configuring Level 2 Metrics.
func ISISRequireSameL1MetricWithL2Metric(dut *ondatra.DUTDevice) bool {
Expand Down
4 changes: 1 addition & 3 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ message Metadata {
bool os_component_parent_is_chassis = 88;
// Device does not support fabric power-admin-state leaf.
bool skip_fabric_card_power_admin = 89;
// Device returns component state inactive during power down.
bool component_power_down_returns_inactive_state = 90;
// Devices require configuring the same ISIS Metrics for Level 1 when
// configuring Level 2 Metrics.
bool isis_require_same_l1_metric_with_l2_metric = 91;
Expand Down Expand Up @@ -331,7 +329,7 @@ message Metadata {
bool isis_counter_part_changes_unsupported = 107;

// Reserved field numbers and identifiers.
reserved 84, 9, 28;
reserved 84, 9, 28, 90;
}

message PlatformExceptions {
Expand Down
13 changes: 2 additions & 11 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ae8c6e

Please sign in to comment.