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.

BlPackage - createPackageFromAuditTarget


BlPackage - createPackageFromAuditTarget

Description :

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

The audit target will be picked from an audit based on the template specified as input to this command. Currently this command cannot be used for audits that have multiple targets for the same template.

Audits can have several templates specified in them. For each template, the audit can have one master and several targets. Currently this command allows packaging audit results for only one target of one template. This command returns a handle to the newly created package and 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.

groupId

Integer

ID of a group that should contain the package.

bSoftLinked

Boolean

True to create a package soft linked to the depot object resources, false otherwise.

bCollectFileAcl

Boolean

True to package the file ACLs, false otherwise.

bCollectFileAttributes

Boolean

True to package the file attributes, false otherwise.

bCopyFileContents

Boolean

True to package the file contents, false otherwise.

bCollectRegistryAcl

Boolean

True to package the registry ACLs, false otherwise.

auditJobResultKey

DBKey

Handle to the Audit Job result you want to package.

templateKey

DBKey

Handle to the template that should be packaged in the audit.

Example

This example shows how to create a BLPackage from an audit. It assumes that an Audit Job (audit1) has been run and a handle for that run has been stored (AUDIT1_RUN_DBKEY):

Script


# Get audit result from audit run DBKey.

AUDIT1_DBKEY=`blcli AuditJob getDBKeyByGroupAndName /jobgroup1 audit1`

AUDIT1_RESULT_DBKEY=`blcli JobResult findJobResultKey $AUDIT1_RUN_DBKEY`

# Name of the package.

PACKAGE_NAME="package1"

# Get the ID of the depot group in which the package will be saved.

DEPOT_GROUP_ID=`blcli DepotGroup groupNameToId /parent/group1`

# This boolean value sets the Depot Asset Options - Soft linked check box. True for checked.

bSoftLinked="false"

# This boolean value sets the File Options - Collect asset control lists (ACL) attributes check box. True for checked.

bCollectFileAcl="false"

# This boolean value sets the File Options - Collect file/directory attributes check box. True for checked.

bCollectFileAttributes="false"

# This boolean value sets the File Options - Copy file contents check box. True for checked.

bCopyFileContents="true"

# This boolean value sets the Registry Options - Collect access control list (ACL) attributes check box. True for checked.

bCollectRegistryAcl="false"

# A collection of the above options.

PACKAGE_OPTIONS="$bSoftLinked $bCollectFileAcl $bCollectFileAttributes $bCopyFileContents $bCollectRegistryAcl"

# Get the template DBKey for the asset you wish to package.

TEMPLATE_NAME=template1

TEMPLATE_GROUP=/template_group

TEMPLATE_DBKEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE_NAME

# Now create new package.

PACKAGE1_DBKEY=`blcli BlPackage createPackageFromAuditTarget $PACKAGE_NAME $DEPOT_GROUP_ID $PACKAGE_OPTIONS $AUDIT1_RESULT_DBKEY $TEMPLATE_DBKEY`



 

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