Dell Servers · Arazzo Workflow

Dell Servers Power Action with State Polling

Version 1.0.0

Issue a power action on a system and poll until the power state settles.

1 workflow 1 source API 1 provider
View Spec View on GitHub HardwareInfrastructureManagementMonitoringServersArazzoWorkflows

Provider

dell-servers

Workflows

power-action-poll
Issue a reset action and poll the system until power state settles.
Reads current power state, issues a reset action, then polls the system resource until the power state is no longer transitional.
3 steps inputs: resetType, systemId outputs: finalPowerState, startingPowerState
1
getInitialState
getSystem
Read the system to capture the power state before the action.
2
issueReset
resetSystem
Issue the requested reset action on the system.
3
pollPowerState
getSystem
Re-read the system and inspect its power state. Loop back while the state is still transitioning; end once it has settled to On or Off.

Source API Descriptions

Arazzo Workflow Specification

dell-servers-power-action-poll-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Dell Servers Power Action with State Polling
  summary: Issue a power action on a system and poll until the power state settles.
  description: >-
    Drives a power transition on a Dell PowerEdge server through the iDRAC
    Redfish API and waits for it to complete. The workflow reads the current
    power state, issues the requested reset action, and then re-reads the
    system on a poll loop until the reported power state is no longer a
    transitional value such as PoweringOn or PoweringOff. Branching directs the
    flow back into the poll loop while the system is still transitioning and
    ends the flow once a stable state is reached. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: idracRedfish
  url: ../openapi/dell-servers-idrac-redfish-openapi.yml
  type: openapi
workflows:
- workflowId: power-action-poll
  summary: Issue a reset action and poll the system until power state settles.
  description: >-
    Reads current power state, issues a reset action, then polls the system
    resource until the power state is no longer transitional.
  inputs:
    type: object
    required:
    - systemId
    - resetType
    properties:
      systemId:
        type: string
        description: Computer system identifier, typically System.Embedded.1.
      resetType:
        type: string
        description: >-
          Reset action to perform, for example On, ForceOff, GracefulShutdown,
          GracefulRestart, ForceRestart, or PowerCycle.
  steps:
  - stepId: getInitialState
    description: Read the system to capture the power state before the action.
    operationId: getSystem
    parameters:
    - name: SystemId
      in: path
      value: $inputs.systemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      startingPowerState: $response.body#/PowerState
  - stepId: issueReset
    description: Issue the requested reset action on the system.
    operationId: resetSystem
    parameters:
    - name: SystemId
      in: path
      value: $inputs.systemId
    requestBody:
      contentType: application/json
      payload:
        ResetType: $inputs.resetType
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      resetStatus: $statusCode
  - stepId: pollPowerState
    description: >-
      Re-read the system and inspect its power state. Loop back while the state
      is still transitioning; end once it has settled to On or Off.
    operationId: getSystem
    parameters:
    - name: SystemId
      in: path
      value: $inputs.systemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      powerState: $response.body#/PowerState
      health: $response.body#/Status/Health
    onSuccess:
    - name: stillTransitioning
      type: goto
      stepId: pollPowerState
      criteria:
      - context: $response.body
        condition: $.PowerState == 'PoweringOn' || $.PowerState == 'PoweringOff'
        type: jsonpath
    - name: settled
      type: end
      criteria:
      - context: $response.body
        condition: $.PowerState == 'On' || $.PowerState == 'Off'
        type: jsonpath
  outputs:
    startingPowerState: $steps.getInitialState.outputs.startingPowerState
    finalPowerState: $steps.pollPowerState.outputs.powerState