Template - createConfigurationObjectTemplate
Template - createConfigurationObjectTemplate
Description :
This command creates a template with a particular configuration object as the asset. This command returns a handle to the newly created template. The handle can be used for other commands that need a reference to the new template.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
templateName | String | Template name. |
groupId | Integer | Handle to the group that should contain the template. |
bExplicit | Boolean | True to create an explicit template, false to create an implicit template. (An implicit template is one that does not appear in the GUI.) |
assetPath | String | Path to the configuration object. |
configurationObjectClass | String | The class of the configuration object. |
enableSnapshotOptions | String | Enable snapshot for named properties. |
disableSnapshotOptions | String | Disable snapshot for named properties. |
enableAuditOptions | String | Enable audit for named properties. |
disableAuditOptions | String | Disable audit for named properties. |
Example
The following example shows how to create a configuration object template with snapshot and audit enabled for some attributes and disabled for other attributes.
Script
blcli ConfigurationObjectClass listAllRootClasses
BMC_UnixDaemons
BMC_UnixGroups
BMC_UnixProcesses
BMC_UnixUsers
SystemInfo
# Assuming you are interested in the BMC_UnixUsers class, list its child classes.
blcli ConfigurationObjectClass listChildClasses BMC_UnixUsers
BMC_UnixUser:1
# List the attribute names of the BMC_UnixUser
blcli ConfigurationObjectClass describeAssetClass BMC_UnixUser
BMC_UnixUser (Unix)
----------
Attributes
----------
String: Path
String: Name
String: homeDirectory
Date: expirationDate
String: description
Integer: primaryGID
String: primaryGroupName
List [String]: groupNames
Integer: inactiveLimit
Date: lastChange
Integer: maxDaysBetweenChanges
Integer: minDaysBetweenChanges
Encrypted String: password
BMC_UnixUsers_v1_UnixUserPasswordState: passwordState
String: shell
Integer: uid
Integer: warn
----------
Actions
----------
updatePassword
Parameters
Encrypted String: newPassword
Return Value
Void
----------
setPasswordState
Parameters
BMC_UnixUsers_v1_UnixUserPasswordState: newState
Return Value
Void
# Create a configuration object template for the BMC_UnixUser.
# In this example, primaryGid and description are enabled for snapsot. inactiveLimit is disabled for snapshot.
# shell is enabled for audit. uid is disabled for audit.
Template createConfigurationObjectTemplate foo 2000029 true /root BMC_UnixUser "primaryGid,description" "inactiveLimit" "shell" "uid"