BlPackage - importComponentToPackage
BlPackage - importComponentToPackage
Description :
This command adds a component to a BLPackage. When you add a component to a package, you add all the assets (server objects) specified in the component. 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 |
---|---|---|
groupName | String | Name of a group that contains the package. |
packageName | String | Name of 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. |
componentKey | DBKey | Handle to the component that you want to package. |
propNames | String | Names of the component item properties whose values you want to set. These are the property names that appear in the BLPackage editor in the BMC BladeLogic GUI. If you want to set more than one property, use a comma to separate multiple property names. |
propValues | String | The values you want to assign to the properties listed in propNames. Note that you can use parameters here, as well as explicit values. Separate multiple values/parameters with commas. The first value corresponds to the first property, the second value corresponds to the second property, and so on. |
Example
This example shows how to import a component containing file assets to a BLPackage. In this example, the importComponentToPackage command replaces the existing owner of every file with the value specified by the ??OWNER?? parameter. Similarly, it replaces each file's permissions with the value specified by the ??PERMISSIONS?? parameter.
Script
PACKAGE1_DBKEY=`blcli BlPackage importComponentToPackage "/pkgDepotGrp1" "pkgName1" true true true true true "DBKey:SComponentKey:18-1" "Owner,Permissions" "??OWNER??,??PERMISSIONS??"`