DPOD allows execution of user defined, custom scripts before and after both Plan and Task execution.
The scripts are executed from /app/custom/scripts (See Configurable Parameters and Settings for information on how to change this path)
Info |
---|
Any script that returns a return code larger than 0 is considered to have failed. if a pre-plan or a pre-task script failed - the plan or task will be flagged as failed and will not execute. |
DPOD will send certain parameters to the script, to indicate the execution details and completion status.
Parameters Sent to the Firmware Upgrade Pre-Plan Script
Sample script: /app/custom/scripts/firmware_upgrade_pre_plan_sample.sh
1=PLAN_TYPE - The constant "FIRMWARE-UPGRADE-PLAN"
2=PLAN_STAGE - The constant "PRE"
3=PLAN_ID - The ID of the firmware upgrade plan
3=PLAN_NAME - The name of the firmware upgrade plan
Example:
1=FIRMWARE-UPGRADE-PLAN
2=PRE
3=16
4=firmware1
Parameters Sent to the Firmware Upgrade Post-Plan Script
Sample script: /app/custom/scripts/firmware_upgrade_post_plan_sample.sh
1=PLAN_TYPE - The constant "FIRMWARE-UPGRADE-PLAN"
2=PLAN_STAGE - The constant "POST"
3=PLAN_ID - The ID of the firmware upgrade plan
4=PLAN_NAME - The name of the firmware upgrade plan
5=FINAL_STATUS_CODE - Final status code of the firmware upgrade plan
6=FINAL_ERROR_MSG - Final error message of the firmware upgrade plan, or "NONE" if there were no errors
7=FFU1 - The constant "FFU" (For future use)
8=FFU2 - The constant "FFU" (For future use)
9=TASKS_VALUES - list of comma separated values for each task - task ID, device name, version before execution, version after execution, task status - different tasks are separated with ~ (Tilde sign)
Example:
1=FIRMWARE-UPGRADE-PLAN
2=POST
3=16
4=firmware1
5=SUCCESS
6=NONE
7=FFU
8=FFU
9=13,IDG-QA-2,IDG.7.1.0.17,IDG.7.5.2.10,SUCCESS~14,IDG-QA-3,IDG.7.1.0.17,IDG.7.5.2.10,SUCCESS
Parameters Sent to the Firmware Upgrade Pre-Task Script
Sample script: /app/custom/scripts/firmware_upgrade_pre_task_sample.sh
1=TASK_TYPE - The constant "FIRMWARE-UPGRADE-TASK"
2=TASK_STAGE - The constant "PRE"
3=TASK_ID - The ID of the firmware upgrade task
4=PLAN_NAME - The name of the firmware upgrade plan that generated this task
5=DEVICE_NAME - The name of the device
6=DEVICE_HOST - The host of the device
7=SOMA_PORT - The soma port of the device
8=VERSION_BEFORE - The firmware version of the device before the task started
Example:
1=FIRMWARE-UPGRADE-TASK
2=PRE
3=12
4=firmware1
5=IDG-QA-2
6=192.168.72.100
7=5550
8=IDG.7.1.0.17
Parameters Sent to the Firmware Upgrade Post-Task Script
Sample script: /app/custom/scripts/firmware_upgrade_post_task_sample.sh
1=TASK_TYPE - The constant "FIRMWARE-UPGRADE-TASK"
2=TASK_STAGE - The constant "POST"
3=TASK_ID - The ID of the firmware upgrade task
4=PLAN_NAME - The name of the firmware upgrade plan that generated this task
5=FINAL_STATUS - Final status code of the firmware upgrade task
6=FINAL_ERROR_MSG - Final error message of the firmware upgrade task, or "NONE" if there were no errors
7=FFU1 - The constant "FFU" (For future use)
8=FFU2 - The constant "FFU" (For future use)
9=DEVICE_NAME - The name of the device
10=DEVICE_HOST - The host of the device
11=SOMA_PORT - The soma port of the device
12=VERSION_BEFORE - The firmware version string before the task was started
13=VERSION_AFTER- The firmware version string after the task finished
Example:
1=FIRMWARE-UPGRADE-TASK
2=POST
3=13
4=firmware1
5=SUCCESS
6=NONE
7=FFU
8=FFU
9=IDG-QA-2
10=192.168.72.100
11=5550
12=IDG.7.1.0.17
13=IDG.7.5.2.10