About custom attributes

A custom attribute is a simple name/value pair you define, that is used as a form of variable substitution in scripts, configuration files, parameters, and other appliance functions. When referenced, the custom attribute name is replaced by the value of that custom attribute. Custom attributes do not stand alone; they are always associated with an object in the management database, such as servers, device groups, facility, or OS Build Plans. For more information on the custom attributes used in Hewlett Packard Enterprise provided Build Plans, see the Insight Control Server Provisioning Build Plans Reference Guide.

Custom attributes are used throughout IC server provisioning for inserting values into scripts, configuration files, parameters and path names. Custom attributes allow you to change aspects of your Build Plan without actually editing the Build Plan. You can use the custom attributes already defined in the Hewlett Packard Enterprise provided Build Plans, or create your own as part of your site customization.

Custom attributes are resolved during Build Plan execution one step at a time. Just before each step is executed, any custom attributes in that step are replaced by the actual values. Since the custom attributes are not replaced till the step is executed, custom attributes created in earlier steps of the Build Plan can be used in later steps.

The custom attributes use the following format:

For example, when using custom attributes, use the format:

@name@

or

@name:default_value@

where name is the custom attribute name and default_value is the value that is used if this custom attribute is not found in the appliance database. Defining a default value is optional.

Here are some examples of attribute substitution:

  • If a custom attribute is defined as name MediaServer and value 10.1.1.2, you can reference it in a script with @MediaServer@. When the OS Build Plan is run on a server, @MediaServer@ is replaced with 10.1.1.2.

  • If a script contains the code @Password:ChangeMe123!@ and the custom attribute Password is not defined, when the Build Plan is run the custom attribute Password is not found in the appliance database so Password is replaced with the specified default value of ChangeMe123!.

  • If a configuration file contains @SpecialValue@ strings and the custom attribute SpecialValue is not defined, then @SpecialValue@ is not replaced as no default value was specified. This has the effect of removing the string @SpecialValue@ from the configuration file.

Custom attributes can be defined in the UI as follows:

  • For a specific server use the Edit Servers screen.

  • For a device group use the Edit Device Groups screen.

  • For a specific Build Plan use the Edit OS Build Plans screen.

  • System wide (default value) facility custom attributes can be viewed and edited from the Settings screen by selecting Edit on the Facility Custom Attributes panel.

For a list of some commonly used custom attributes, see Commonly used custom attributes.

For a list of custom attributes used in the Hewlett Packard Enterprise provided Build Plans, see the Insight Control Server Provisioning Build Plans Reference Guide. You can define your own custom attributes (see Create your own custom attributes).