AuditJob - createSnapshotToSnapshotAuditJob
AuditJob - createSnapshotToSnapshotAuditJob
Description :
This command creates an Audit Job that compares two entire snapshots. A similar command, createSnapshotToSnapshotAuditJob , compares selected assets within snapshots.
You must provide an ID for the job group that will contain this Audit Job.
The masterSnapshotKey argument provides a handle to the snapshot result that should be the master. The targetSnapshotKey argument provides a handle to the snapshot result that should be the target of the audit. This command returns a handle to the newly created Audit Job. This handle can be used in other commands that need to reference the Audit Job you have created.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
jobName | String | Name of the Audit Job to be created. |
groupId | Integer | ID of the job group to which the Audit Job will be added. |
masterSnapshotKey | DBKey | Handle to the snapshot result that should be used as the master for the audit. |
targetSnapshotKey | DBKey | Handle to the snapshot result that should be used as the target of the audit. |
Example
The following example creates an Audit Job that compares two entire snapshots. The example also shows how to obtain the various keys required in the final command.
Script
JOB_GROUP_ID=`blcli JobGroup groupNameToId "/BLCLI_Job_Group"`
MASTER_SNAPSHOT_KEY=`blcli SnapshotJob getDBKeyByGroupAndName "/BLCLI_Job_Group" "BLCLI_Snapshot_Job"`
MASTER_SNAPSHOT_JOB_ID=`blcli Snapshot getSnapshotKeyByJobRunId $MASTER_SNAPSHOT_KEY "Template_Name" "Target_Name"`
TARGET_SNAPSHOT_KEY=`blcli SnapshotJob getDBKeyByGroupAndName "/BLCLI_Job_Group" "BLCLI_Snapshot_Job"`
TARGET_SNAPSHOT_JOB_ID=`blcli Snapshot getSnapshotKeyByJobRunId $TARGET_SNAPSHOT_KEY "Template_Name" "Target_Name"`
SNAP_TO_SNAP_AUDIT_JOB=`blcli AuditJob createSnapshotToSnapshotAuditJob $JOB_NAME $JOB_GROUP_ID /
$MASTER_SNAPSHOT_JOB_ID $TARGET_SNAPSHOT_JOB_ID`