Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

PatchRemediationJob - createRemediationJobWithDeployOptsForATarget


PatchRemediationJob - createRemediationJobWithDeployOptsForATarget

Description :

This command creates a Remediation Job based for a specific target. It lets the user apply all the options from an existing deploy job to the ones generated during the Remediation Job run. This command returns a handle to the newly created job. This handle can be used as input to commands that need a handle to the job.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

remediationName

String

Name of the job.

jobGroupName

String

Name of a group that should contain the new remediation job(s).

paJobRunKey

DBKey

Handle to the Patching Job run whose result you want to use for remediation.

serverName

String

Server where you want to run this job. This server should one of the servers on which you ran a Patch Analysis Job.

pckPrefix

String

Prefix for naming the new Batch Job/Deploy Job/Package(s).

depotGroupName

String

Name of a group that should contain the new package(s).

depJobGroupName

String

Name of a group that should contain the generated Deploy job(s).

deployJobKey

DBKey

Handle to the Deploy Job run whose options you want to use generated Deploy Job(s).

Example

This example shows how to create a Remediation Job against a specific target. It assumes that a Patching Job(pajob1) has been run:

Script


# Get Patching Job DBKey by job group name and job name.

PA_JOB_RUNKEY=`blcli PatchingJob executeJobAndWait $JOB_KEY

# Name of the new job.

REMEDIATION_JOB_NAME="remediationJob1"

# Name of the job group where the new job is going to be saved.

JOB_GROUP_NAME =`"/JobGroup"

# Name of the job group where the generated deploy job(s) and batch job is going to be saved.

DEPLOY_JOB_GROUP_NAME =`"/GeneratedGroup"

# Name of the depot group where the new package is going to be saved.

DEPOT_GROUP_NAME =`"/depotGroup"

# Specify prefix to be used in package name.

PKG_PREFIX =`"some-prefix"

# Specify handle to an existing deploy job, whose options will be copied to the deploy jobs generated during the remediation job run.

DEP_JOB_KEY=`blcli DeployJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"`

DBKEY=`blcli PatchRemediationJob createRemediationJobWithDeployOptsForATarget $REMEDIATION_JOB_NAME $JOB_GROUP_NAME $PA_JOB_RUNKEY localhost $PKG_PREFIX $DEPOT_GROUP_NAME $DEPLOY_JOB_GROUP_NAME $DEP_JOB_KEY`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.5