power_admin_down_up_test - openconfig/featureprofiles GitHub Wiki
Validate the ability to toggle the power-admin-state for Fabric, Linecard, and ControllerCard components. Including negative scenario for attempting to power down both controller cards.
-
Test Setup:
- Verify
/components/component/{linecard|fabric}/state/oper-statusisACTIVEfor all installed Linecards and Fabric Cards.
- Verify
-
Test Logic:
- Select one linecard and one fabric card.
- Update
/components/component/{linecard|fabric}/config/power-admin-statetoPOWER_DISABLEDfor the selected linecard and fabric card. - Verify
/components/component/{linecard|fabric}/state/power-admin-statechanges toPOWER_DISABLEDfor the selected linecard and fabric card. - Verify
/components/component/{linecard|fabric}/state/oper-statusisDISABLEDfor the selected linecard and fabric card. - Update
/components/component/{linecard|fabric}/config/power-admin-statetoPOWER_ENABLEDfor the selected linecard and fabric card. - Verify
/components/component/{linecard|fabric}/state/oper-statusreturns toACTIVEfor the selected linecard and fabric card.
-
Test Setup:
- Connect to the DUT via gNMI and retrieve the list of all available controller cards by checking components of type
CONTROLLER_CARD. - Ensure there are at least two controller cards available on the DUT to perform this test.
- Verify that the
/components/component/state/oper-statusisACTIVEfor both the controller cards. - Verify that the
/components/component/state/switchover-readyistruefor both the controller cards.
- Connect to the DUT via gNMI and retrieve the list of all available controller cards by checking components of type
-
Test Logic:
- Find out the
PRIMARYController Card using/components/component/state/redundant-role. - Using gNMI Set, attempt to update
/components/component/controller-card/config/power-admin-statetoPOWER_DISABLEDfor thePRIMARYcontroller card. - Wait until the switchover happens and the
SECONDARYbecomesPRIMARY. - Verify that the
/components/component/state/oper-statusof the disabled Controller Card is nowDISABLED. - Using gNMI Set, attempt to update
/components/component/controller-card/config/power-admin-statetoPOWER_DISABLEDfor the newly electedPRIMARYcontroller card. - The device should either:
- Reject the configuration to
POWER_DISABLEDthe controller card OR - Automatically enable the previously
POWER_DISABLEDController Card and thenPOWER_DISABLEDthe requested Controller Card.
- Reject the configuration to
- In any case the device should not become unresponsive, unreachable or lose connectivity.
- Restore the
/components/component/controller-card/config/power-admin-statefor the disabled controller card back toPOWER_ENABLEDvia gNMI Set.
- Find out the
-
Verification:
- Verify the operational status and redundant roles of the controller cards post-recovery.
{
"openconfig-platform:components": {
"component": [
{
"name": "RE0",
"openconfig-platform-controller-card:controller-card": {
"config": {
"power-admin-state": "POWER_DISABLED"
}
}
}
]
}
}The below yaml defines the OC paths and RPC intended to be covered by this test.
paths:
/components/component/controller-card/config/power-admin-state:
platform_type: [CONTROLLER_CARD]
/components/component/controller-card/state/power-admin-state:
platform_type: [CONTROLLER_CARD]
/components/component/fabric/config/power-admin-state:
platform_type: [FABRIC]
/components/component/fabric/state/power-admin-state:
platform_type: [FABRIC]
/components/component/linecard/config/power-admin-state:
platform_type: [LINECARD]
/components/component/linecard/state/power-admin-state:
platform_type: [LINECARD]
/components/component/state/oper-status:
platform_type: [CONTROLLER_CARD, FABRIC, LINECARD]
/components/component/state/redundant-role:
platform_type: [CONTROLLER_CARD]
/components/component/state/switchover-ready:
platform_type: [CONTROLLER_CARD]
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:- MFF