xref: /openbmc/phosphor-power/phosphor-power-sequencer/docs/config_file/template_variable_values.md (revision d1312fca296a458b0bb7e7d44c650285ee01bec6)
1*d1312fcaSShawn McCarney# template_variable_values
2*d1312fcaSShawn McCarney
3*d1312fcaSShawn McCarney## Description
4*d1312fcaSShawn McCarney
5*d1312fcaSShawn McCarneyTemplate variable values for a specific chassis.
6*d1312fcaSShawn McCarney
7*d1312fcaSShawn McCarneyIn a multiple chassis system, two or more of the [chassis](chassis.md) may have
8*d1312fcaSShawn McCarneythe same hardware design.
9*d1312fcaSShawn McCarney
10*d1312fcaSShawn McCarneyA [chassis template](chassis_template.md) can be used to avoid duplicate data.
11*d1312fcaSShawn McCarneyThe chassis template defines the power sequencers, GPIOs, and voltage rails in a
12*d1312fcaSShawn McCarneychassis. One or more property values in the template contain variables, such as
13*d1312fcaSShawn McCarney`${chassis_number}`, to support chassis-specific values.
14*d1312fcaSShawn McCarney
15*d1312fcaSShawn McCarneyEach chassis using a template must specify values for each template variable.
16*d1312fcaSShawn McCarneyFor example, the value of `${chassis_number}` is "1" for the first chassis and
17*d1312fcaSShawn McCarney"2" for the second chassis.
18*d1312fcaSShawn McCarney
19*d1312fcaSShawn McCarneyAll chassis variable values are specified as a string (surrounded by double
20*d1312fcaSShawn McCarneyquotes). If the property value where the variable occurs has a different data
21*d1312fcaSShawn McCarneytype, such as number, the string will be converted to the required type.
22*d1312fcaSShawn McCarney
23*d1312fcaSShawn McCarney## Properties
24*d1312fcaSShawn McCarney
25*d1312fcaSShawn McCarney| Name                                  | Required | Type   | Description                                             |
26*d1312fcaSShawn McCarney| :------------------------------------ | :------: | :----- | :------------------------------------------------------ |
27*d1312fcaSShawn McCarney| Variable 1 name (see [notes](#notes)) |   yes    | string | Value of the template variable with the specified name. |
28*d1312fcaSShawn McCarney| Variable 2 name (see [notes](#notes)) |   yes    | string | Value of the template variable with the specified name. |
29*d1312fcaSShawn McCarney| ...                                   |          |        |                                                         |
30*d1312fcaSShawn McCarney| Variable N name (see [notes](#notes)) |   yes    | string | Value of the template variable with the specified name. |
31*d1312fcaSShawn McCarney
32*d1312fcaSShawn McCarney### Notes
33*d1312fcaSShawn McCarney
34*d1312fcaSShawn McCarney- The variable names are defined in the chassis template, such as
35*d1312fcaSShawn McCarney  "chassis_number" and "sequencer_bus_number".
36*d1312fcaSShawn McCarney- The variable name must be specified without the "$", "{", and "}" characters.
37*d1312fcaSShawn McCarney
38*d1312fcaSShawn McCarney## Example
39*d1312fcaSShawn McCarney
40*d1312fcaSShawn McCarney```json
41*d1312fcaSShawn McCarney{
42*d1312fcaSShawn McCarney  "chassis_number": "2",
43*d1312fcaSShawn McCarney  "sequencer_bus_number": "13"
44*d1312fcaSShawn McCarney}
45*d1312fcaSShawn McCarney```
46