Information

This site will undergo a brief period of maintenance on Thursday, 23 April at 2:30 AM Central/1:00 PM IST. During a 30 minute window, site availability may be intermittent.

Information
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.

Component - createComponent


Component - createComponent

Description :

This command creates a new component based on an existing component template and a specific server. This command returns a handle to the component. This handle can be used in any other command that needs a handle to a component.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

name

String

The name of the component.

templateKey

DBKey

A handle to the template on which the component should be based.

deviceId

Integer

A handle to the device/server where the template should be applied to create a new component.

Example

The following example gets the handle of a template and the ID of a server, and uses them to create a new component based on the template and server:

Script

SERVER="Server_Name"

COMP_NAME="Comnponent_Name"

TEMPLATE_GROUP="/Template_Group"

TEMPLATE="Template_Name"

TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE`

SERVER_ID=`blcli Server getServerIdByName $SERVER`

COMPONENT_KEY=`blcli Component createComponent $COMP_NAME $TEMPLATE_KEY $SERVER_ID`

 

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

BMC Server Automation Command Line Interface 8.5