IBM DataPower Operations Dashboard v1.0.10.0

A newer version of this product documentation is available.

You are viewing an older version. View latest at IBM DPOD Documentation.

Sync - User Defined Scripts

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)

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.
If a pre-task script failed, the post-task script will still be executed (if requested)


DPOD will send certain parameters to the script, to indicate the execution details and completion status.

Parameters Sent to the Sync Pre-Plan Script

Sample script: /app/custom/scripts/sync_pre_plan_sample.sh

1=PLAN_TYPE - The constant "SYNC-PLAN"
2=PLAN_STAGE - The constant "PRE"
3=PLAN_ID - The ID of the sync plan
3=PLAN_NAME - The name of the sync plan

 Example:
1=SYNC-PLAN
2=PRE
3=16
4=sync1

Parameters Sent to the Sync Post-Plan Script

Sample script: /app/custom/scripts/sync_post_plan_sample.sh

1=PLAN_TYPE - The constant "SYNC-PLAN"
2=PLAN_STAGE - The constant "POST"
3=PLAN_ID - The ID of the sync  plan
4=PLAN_NAME - The name of the sync plan
5=FINAL_STATUS_CODE - Final status code of the sync plan
6=FINAL_ERROR_MSG - Final error message of the sync 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, sync action (EXPORT or IMPORT), source device, source domain, target device, target domain, task status  - different tasks are separated with ~ (Tilde sign) 


Example:
1=SYNC-PLAN
2=POST
3=16
4=sync test 1
5=SUCCESS
6=NONE
7=FFU
8=FFU
9=13,EXPORT,QA1,Domain1,NONE,NONE,SUCCESS~14,IMPORT,QA1,Domain1,QA2,Domain1,SUCCESS

Parameters Sent to the Sync Pre-Task Script

Sample script: /app/custom/scripts/sync_pre_task_sample.sh

1=TASK_TYPE - The constant "SYNC-TASK"
2=TASK_STAGE - The constant "PRE"
3=TASK_ID - The ID of the sync task
4=PLAN_NAME - The name of the sync plan that generated this task
5=SYNC_ACTION - EXPORT or IMPRT
6=SOURCE_DEVICE_NAME - The source device name
7=SOURCE_DEVICE_HOST - The source device host
8=SOURCE_SOMA_PORT - The soma port of the source device 
9=SOURCE_DOMAIN - The source domain name
10=TARGET_DEVICE_NAME - The target device name (or NONE if the task is an EXPORT task)
11=TARGET_DEVICE_HOST - The target device host (or NONE if the task is an EXPORT task)
12=TARGET_SOMA_PORT - The soma port of the target device (or NONE if the task is an EXPORT task)
13=TARGET_DOMAIN - The target domain name (or NONE if the task is an EXPORT task)

Example:
1=SYNC-TASK
2=PRE
3=12
4=sync test 1
5=IMPORT
6=QA1
7=192.168.72.100
8=5550
9=Domain1
10=QA2
11=192.168.72.105
12=5550
13=Domain1

Parameters Sent to the Sync Post-Task Script

Sample script: /app/custom/scripts/sync_post_task_sample.sh

1=TASK_TYPE - The constant "SYNC-TASK"
2=TASK_STAGE - The constant "POST"
3=TASK_ID - The ID of the sync task
4=PLAN_NAME - The name of the sync plan that generated this task
5=FINAL_STATUS - Final status code of the sync task
6=FINAL_ERROR_MSG - Final error message of the sync 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=SYNC_ACTION - EXPORT or IMPORT
10=SOURCE_DEVICE_NAME - The source device name
11=SOURCE_DEVICE_HOST - The source device host
12=SOURCE_SOMA_PORT - The soma port of the source device 
13=SOURCE_DOMAIN - The source domain name
14=TARGET_DEVICE_NAME - The target device name (or NONE if the task is an EXPORT task)
15=TARGET_DEVICE_HOST - The target device host (or NONE if the task is an EXPORT task)
16=TARGET_SOMA_PORT - The soma port of the target device (or NONE if the task is an EXPORT task)
17=TARGET_DOMAIN - The target domain name (or NONE if the task is an EXPORT task)

Example:
1=SYNC-TASK
2=POST
3=13
4=Sync test 1
5=SUCCESS
6=NONE
7=FFU
8=FFU
9=IMPORT 
10=QA1
11=192.168.72.100
12=5550
13=Domain1
14=QA2
15=192.168.72.105
16=5550
17=Domain1

IBM DataPower Operations Dashboard (DPOD) v1.0.10.0