UCSTemplate - addTemplateLanNic
UCSTemplate - addTemplateLanNic
Description :
This command adds a LAN NIC to a UCS template.
When you add a LAN NIC, you can set the NIC's MAC address in one of the following ways:
- You can manually specify a MAC address in the mac argument.
- You can specify a MAC pool by setting isMacPool to true and then providing the DBKey to the pool in the macPoolKey argument.
- You can specify that the MAC address is obtained from the hardware on which you deploy the profile by setting isMacDerived to true.
Note that these arguments are mutually exclusive - you need to specify only ONE way to set the MAC address:
- If you manually specify a MAC address in the mac argument, then you need to set isMacPool to false and macPoolKey to null. You must also set isMacDerived to false.
- If you specify a MAC pool (isMacPool=true and macPoolKey=DBKey), then you need to set mac to null and isMacDerived to false.
- If you specify that the MAC address is derived from the hardware (isMacDerived=true), then you need to set mac to null, isMacPool to false and macPoolKey to null.
Obtaining DBKeys: You use the templateKey argument to specify the DBKey of the template you want to modify. You use the macPoolKey argument to specify a MAC pool. You can get these DBKeys by using the DepotObject : getDBKeyByTypeStringGroupAndName command.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
templateKey | com.bladelogic.om.infra.model.base.keys.SDepotObjectKey | The DBKey of the UCS template you want to modify. |
name | String | The name of the LAN NIC. |
isVlanTrunking | Boolean | True if VLAN trunking is enabled, false otherwise. |
LanName | String | The name of the LAN to which the NIC connects.Specify the LanName as a semicolon separated list only if isVlanTrunking is set to true |
switchName | String | The switch that the NIC uses to connect to the LAN fabric. |
mac | String | The MAC address used by the LAN NIC. Use this argument if you want to manually specify the MAC address. |
isMacPool | Boolean | True if you want to obtain the MAC address from a MAC pool, false otherwise. |
macPoolKey | com.bladelogic.om.infra.model.base.keys.SDepotObjectKey | DBKey for the MAC pool. Specify a DBKey here only if you set isMacPool to true. |
isMacDerived | Boolean | True if you want to obtain the MAC address from the hardware, false otherwise. |
Example
The following example adds a LAN NIC to a UCS template with the DBKey:SDepotObjectKey:1-1.
Script
blcli UCSTemplate addTemplateLanNic DBKey:SDepotObjectKey:1-1 "name" true "LanName1;LanName2;LanName3" "switchName" "00-00-00-00-00-03" false null false