BlPackage - importComponentToPackage_2


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 also lets you specify the single-user mode, reboot, and local property name conflict resolution settings.

You can set singleUserMode to one of the following strings:

  • NotRequired: Not Required
  • RevertTo: Use single-user mode without reboot
  • RebootAs: Reboot into single-user mode

You can set rebootMode to one of the following strings:

  • NotRequired: Not required
  • AfterDeploy: After item deployment
  • AfterDeployWithReconfiguration: After item deployment with reconfiguration (Solaris ONLY)
  • OutOfBand: Out-of-band
  • AtJobEnd: By end of job
  • AtJobEndWithReconfigration: By end of job with reconfiguration (Solaris ONLY)

You can set localPropertyNameConflictResolution to one of the following strings:

  • IssueNewPropertyName: Import the new property, but give it a new name (a modification of the conflicting name like 'OLDNAME (2)')
  • KeepPreExistingValue: Discard the the value of the new property even though the property name is the same. An exception is thrown if the types of the conflicting properties are different.
  • FailIfValuesDontMatch: If the value and type of the new property matches the existing value, do nothing and stay silent. Otherwise fail. This is the default.
     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

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.

singleUserMode

String

The single-user mode.

rebootMode

String

The reboot mode.

localPropertyNameConflictResolution

String

The conflict resolution method to use when one or more of the local properties of the imported component conflicts with the name of an existing property of the package.

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??" RevertTo AtJobEnd IssueNewPropertyName`



 

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