======================== Assign Resources ======================== 1. TMC MCCS Leaf Node provides API for Assign Resources workflow. 2. The TMC MCCS Leaf Node accepts the command if : a. Operational state of the TMC MCCS Leaf Node is ON/OFF/INIT/STANDBY/ALARM. b. MCCS master is responsive.(:ref:`availablity`) 3. The TMC MCCS Leaf Node rejects the command if: a. Operational state of TMC MCCS Leaf Node is FAULT/UNKNOWN. b. MCCS master is not responsive. 4. The Input JSON is validated as below, and the command is 'Rejected' with an exception message if they are not met: a. JSON should not be malformed. b. JSON should have required critical keys like 'Subarray Id'. 5. The command execution involves the following key operations: a. Interface schema version is added to input JSON. b. The command is then invoked on the MCCS Master controller. i. If MCCS master rejects the assign resources command, failure is reported as '**RESULT_CODE - FAILED**' on the **Long Running Command Result** attribute of the MCCS master leaf node. ii. If MCCS Master accepts the command, the TMC MCCS Leaf Node will wait for command completion. 6. The TMC MCCS Leaf Node monitors the progress of the command via **Long Running Command Result**: a. Command is **successful** when the MCCS Master sends '**RESULT_CODE - OK**' on the **Long Running Command Result** attribute. This is reported as '**RESULT_CODE - OK**' on the **Long Running Command Result** attribute of the MCCS master leaf node. b. Command failure is reported in any of the following cases as '**RESULT_CODE - FAILED**': i. The MCCS Master sends '**RESULT_CODE - FAILED**'. ii. The command times out if MCCS Master does not send '**RESULT_CODE - OK**' within the timeout period specified by the `**CommandTimeOutDefault**` property in the helm chart of the MCCS master Leaf Node. 7. Input JSON to MCCS Master is as per schema detailed at: https://developer.skao.int/projects/ska-telmodel/en/latest/schemas/mccs/ska-low-mccs-assignres.html