BlPackage - createPackageFromComplianceTarget

BlPackage - createPackageFromComplianceTarget

Description :

This command creates a BLPackage based on all the information collected from a Compliance Job result.

This command chooses its compliance target from a Compliance Job run based on the server, component name, template group, template, rule group, and rule name that you specify as input to this command. The target server name, component name, template group name, and template are required. The template rule group/rule name is optional; if you put "" as rule group/rule name, this command creates the package at the template level. This command returns a handle to the newly created package. This handle can be used as input to commands that need a handle to the package.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

packageName

String

Name of the package.

depotGroupName

String

Name of the group that should contain the package.

auditJobKey

DBKey

Handle to the Compliance Job whose job run result you want to package.

auditJobRunId

Integer

ID of the Compliance Job run whose result you want to package.

templateGroupName

String

Group name of the template used in the Compliance Job run.

templateName

String

Name of the template used in the Compliance Job run.

ruleGrpName

String

Name of the template rule group used in the Compliance Job run.

ruleName

String

Name of the template rule used in the Compliance Job run.

targetServer

String

Name of the target server.

targetComponent

String

Name of the target component.

Example

This example shows how to create a BLPackage from a Compliance Job run result. It assumes that a Compliance Job (compliance1) has been run:

Script


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

COMP_JOB_DBKEY=`blcli ComplianceJob getDBKeyByGroupAndName /jobgroup1 compliance1` 

# Job run index of the compliance job run. 

COMP_JOB_RUN_ID=`"1" 

# Name of the package. 

PACKAGE_NAME="package1" 

# Name of the depot group. 

DEPOT_GROUP_NAME =`"/depotGroup" 

# Name of the template group. 

TEMPLATE_GROUP_NAME="/templateGroup1" 

# Name of the template. 

TEMPALTE_NAME="template1" 

# Name of the template rule group. 

RULE_GROUP_NAME="ruleGroupNo1" 

# Name of the template rule. 

RULE_NAME="ruleNo1" 

# Name of the target server. 

TARGET_SERVER="engwin2kagt1" 

# Name of the target component. 

TARGET_COMPONENT="template1 [inst1] (engwin2kagt1)" 

# Now create new package. 

PACKAGE1_DBKEY=`blcli BlPackage createPackageFromComplianceTarget $PACKAGE_NAME $DEPOT_GROUP_NAME $COMP_JOB_DBKEY $COMP_JOB_RUN_ID $TEMPLATE_GROUP_NAME $TEMPLATE_NAME $RULE_GROUP_NAME $RULE_NAME $TARGET_SERVER $TARGET_COMPONENT` 



Was this page helpful? Yes No Submitting... Thank you

Comments