.. _assignlow: ================= Assign Resources ================= 1. TMC SDP Leaf node provides API for **Assign Resources** workflow. 2. The TMC SDP Leaf node **accepts** the command if: a. Operational **state** of the TMC SDP Leaf node is **ON, OFF, INIT, STANDBY,** or **ALARM**. 3. The TMC SDP Leaf node **rejects** the command if: a. Operational **state** of the TMC SDP Leaf node is **FAULT** or **UNKNOWN**. 4. The following **state requirements** are applied for **command execution**: a. SDP Subarray is in observation state **EMPTY or IDLE**. b. SDP Subarray node is :term:`available`. 5. The **command execution** involves the following **key operations**: a. The input JSON is **validated**. If **malformed**, the command is **failed** with an exception message. b. If the interface schema version is missing from the input JSON, it is added. c. The command is then invoked on the SDP Subarray. i. If the SDP Subarray raises an **exception**, command failure is reported as **RESULT_CODE - FAILED** on the **Long Running Command Result** attribute of the TMC SDP Leaf node. ii. If the SDP Subarray **accepts** the command, the TMC TMC SDP Leaf node will wait for command completion. 6. The TMC SDP Leaf node **monitors the progress** of the command via the SDP Subarray node **ObsState transitions** and the **Long Running Command Results**. a. Command is **successful** when the SDP Subarray Node transitions to **IDLE** ObsState. This is reported as **RESULT_CODE - OK** on the **Long Running Command Result** attribute of the TMC SDP Subarray Leaf Node. b. Command **failure** is reported in any of the following cases as **RESULT_CODE - FAILED** on the **Long Running Command Result** attribute of the TMC SDP Subarray Leaf Node: i. The SDP Subarray reports an **error event** when the command is invoked. ii. The command **times out** if the SDP Subarray Node **does not transition** to **IDLE** within the timeout period specified by the CommandTimeOutDefault property in the Helm chart of the TMC SDP Leaf node. 7. Input JSON to the SDP Subarray must conform to the schema detailed at: https://developer.skao.int/projects/ska-telmodel/en/latest/schemas/sdp/ska-sdp-assignres.html