diff --git a/feature/platform/tests/power_admin_down_up_test/metadata.textproto b/feature/platform/tests/power_admin_down_up_test/metadata.textproto index 1f3d179befd..7f89a50f234 100644 --- a/feature/platform/tests/power_admin_down_up_test/metadata.textproto +++ b/feature/platform/tests/power_admin_down_up_test/metadata.textproto @@ -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 } diff --git a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go index 986e4c6cbbb..733aef03bf3 100644 --- a/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go +++ b/feature/platform/tests/power_admin_down_up_test/power_admin_down_up_test.go @@ -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) @@ -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) } diff --git a/internal/deviations/deviations.go b/internal/deviations/deviations.go index 40e47c5f16f..ed7f7267f8c 100644 --- a/internal/deviations/deviations.go +++ b/internal/deviations/deviations.go @@ -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 { diff --git a/proto/metadata.proto b/proto/metadata.proto index 66920f7d097..a614b68f6a9 100644 --- a/proto/metadata.proto +++ b/proto/metadata.proto @@ -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; @@ -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 { diff --git a/proto/metadata_go_proto/metadata.pb.go b/proto/metadata_go_proto/metadata.pb.go index e0f9386124e..5415cb33625 100644 --- a/proto/metadata_go_proto/metadata.pb.go +++ b/proto/metadata_go_proto/metadata.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 -// protoc v3.21.12 +// protoc-gen-go v1.30.0 +// protoc v3.19.3 // source: metadata.proto package metadata_go_proto @@ -545,8 +545,6 @@ type Metadata_Deviations struct { OsComponentParentIsChassis bool `protobuf:"varint,88,opt,name=os_component_parent_is_chassis,json=osComponentParentIsChassis,proto3" json:"os_component_parent_is_chassis,omitempty"` // Device does not support fabric power-admin-state leaf. SkipFabricCardPowerAdmin bool `protobuf:"varint,89,opt,name=skip_fabric_card_power_admin,json=skipFabricCardPowerAdmin,proto3" json:"skip_fabric_card_power_admin,omitempty"` - // Device returns component state inactive during power down. - ComponentPowerDownReturnsInactiveState bool `protobuf:"varint,90,opt,name=component_power_down_returns_inactive_state,json=componentPowerDownReturnsInactiveState,proto3" json:"component_power_down_returns_inactive_state,omitempty"` // Devices require configuring the same ISIS Metrics for Level 1 when // configuring Level 2 Metrics. IsisRequireSameL1MetricWithL2Metric bool `protobuf:"varint,91,opt,name=isis_require_same_l1_metric_with_l2_metric,json=isisRequireSameL1MetricWithL2Metric,proto3" json:"isis_require_same_l1_metric_with_l2_metric,omitempty"` @@ -1183,13 +1181,6 @@ func (x *Metadata_Deviations) GetSkipFabricCardPowerAdmin() bool { return false } -func (x *Metadata_Deviations) GetComponentPowerDownReturnsInactiveState() bool { - if x != nil { - return x.ComponentPowerDownReturnsInactiveState - } - return false -} - func (x *Metadata_Deviations) GetIsisRequireSameL1MetricWithL2Metric() bool { if x != nil { return x.IsisRequireSameL1MetricWithL2Metric