Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label Templates: document all the new available variables #378

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/hardwarelabels.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ title: ''

import Registration from "!!raw-loader!@site/examples/quickstart/registration-hardware-dhcphostname.yaml"

:::warning
Hardware Template Variables have been deprecated: please use the new
[Label Templates' Variables](label-templates#label-templates-variables) when possible.

Check the [deprecated variables page](label-templates-deprecated) and the
[conversion table](label-templates-deprecated#hardware-labels-to-new-label-templates-variables-table)
for a smooth transition.
:::

## Hardware Template Variables

When a node is registered, hardware data is collected and made available to the MachineRegistration in a way similar to [SMBIOS variables](smbios.md).
Expand Down Expand Up @@ -64,6 +73,3 @@ On both `Block Devices` and `Network` the device name is used as a sub-block, as
| loop | loop device |
| Unknown | unknown controller type |

### Example MachineRegistration

<CodeBlock language="yaml" title="registration example with Hardware template variables" showLineNumbers>{Registration}</CodeBlock>
22 changes: 22 additions & 0 deletions docs/label-templates-baseboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_label: BaseBoard
title: ''
---

## BaseBoard Template Variables

The information collected in the BaseBoard variables defines attributes of a system baseboard (for
example, a motherboard, planar, server blade, or other standard system module).

Subset of SMBIOS Baseboard (or Module) information data (type 2).

For more information on SMBIOS see the
[SMSBIOS specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.1.pdf).

| Variable | Description |
| --------------------------- | ------------------------- |
| `${BaseBoard/AssetTag}` | Motherboard asset tag |
| `${BaseBoard/Product}` | Motherboard product name |
| `${BaseBoard/SerialNumber}` | Motherboard serial number |
| `${BaseBoard/Vendor}` | Motherboard vendor |
| `${BaseBoard/Version}` | Motherboard revision |
19 changes: 19 additions & 0 deletions docs/label-templates-bios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_label: BIOS
title: ''
---

## BIOS Template Variables

BIOS information.

Subset of SMBIOS BIOS Information data (type 0).

For more information on SMBIOS see the
[SMSBIOS specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.1.pdf).

| Variable | Description |
| -------------------- | --------------------- |
| `${BIOS/Date}` | BIOS release date |
| `${BIOS/Vendor}` | BIOS vendor |
| `${BIOS/Version}` | BIOS version number |
22 changes: 22 additions & 0 deletions docs/label-templates-chassis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_label: Chassis
title: ''
---

## Chassis Template Variables

The information in the Chassis variables defines attributes of the system’s mechanical enclosure(s).

Subset of SMBIOS System Enclosure or Chassis (type 3).

For more information on SMBIOS see the
[SMSBIOS specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.1.pdf).

| Variable | Description |
| ---------------------------- | -------------------------- |
| `${Chassis/AssetTag}` | Chassis asset tag |
| `${Chassis/SerialNumber}` | Chassis serial number |
| `${Chassis/TypeDescription}` | Chassis type (description) |
| `${Chassis/Type}` | Chassis type (number/code) |
| `${Chassis/Vendor}` | Chassis vendor |
| `${Chassis/Version}` | Chassis version |
34 changes: 34 additions & 0 deletions docs/label-templates-cpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_label: CPU
title: ''
---

## CPU Template Variables

The information collected in the CPU template variables defines attributes of the processors
installed on the system.

The data is exposed by processor number (0, 1, 2, ...).

To reference the first processor the processor number (_`<Number>`_) can be omitted
(e.g., the variable `${CPU/Processor/Model}` is the same of
`${CPU/Processor/0/Model}`).


| Variable | Description |
| -------------------- | --------------------- |
| `${CPU/Processor/Capabilities}`| Comma separated list of processor capabilities |
| `${CPU/Processor/ID}` | Processor ID |
| `${CPU/Processor/Model}`| Processor model |
| `${CPU/Processor/NumCores}`| Number of cores |
| `${CPU/Processor/NumThreads}`| Number of threads |
| `${CPU/Processor/Vendor}`| Processor vendor |
| `${CPU/Processor/_<Number>_/Capabilities}` | Comma separated list of processor _number_ |
| `${CPU/Processor/_<Number>_/ID}`| Processor _number_ ID |
| `${CPU/Processor/_<Number>_/Model}`| Processor _number_ model |
| `${CPU/Processor/_<Number>_/NumCores}`| Number of cores of processor _number_ |
| `${CPU/Processor/_<Number>_/NumThreads}`| Number of threads of processor _number_ |
| `${CPU/Processor/_<Number>_/Vendor}`| Processor _number_ vendor |
| `${CPU/TotalCores}`| Total number of cores in the system |
| `${CPU/TotalProcessors}`| Number of processors in the system |
| `${CPU/TotalThreads}`| Total number of threads in the system |
86 changes: 86 additions & 0 deletions docs/label-templates-deprecated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
sidebar_label: Deprecated Variables
title: ''
---

## Label Templates' deprecated variables

[**SMBIOS**](smbios) and [**Hardware**](hardwarelabels) variable families have been deprecated in the Elemental Operator v1.7.0.

While these variable families are still correctly rendered in current Elemental Operator versions,
their support will be removed in future Elemental Operator releases.

If you are still using these old Label Templates' variable families, please switch to
[the newer available ones](label-templates#label-templates-variables) if possible.

To simplify the adoption of the new variables, check the tables mapping the deprecated variables to the new
supported ones:
* [Hardware Labels to new Label Templates' variables](#hardware-labels-to-new-label-templates-variables-table)
* [SMBIOS labels to new Label Templates' variables](#smbios-labels-to-new-label-templates-variable-table)

#### Hardware Labels to new Label Templates' variables table

| Deprecated Variable | Equivalent new Variable |
| ----------------------------------------------------------------- | ----------------------- |
| `${System Data/Block Devices/Number Devices}` | `${Storage/TotalDisks}` |
| `${System Data/Block Devices/_<DeviceName>_/Drive Type} ` | `${Storage/Disks/_<DeviceName>_/DriveType}` |
| `${System Data/Block Devices/_<DeviceName>_/Name} ` | `${Storage/Disks/_<DeviceName>_/Name}` |
| `${System Data/Block Devices/_<DeviceName>_/Removable} ` | `${Storage/Disks/_<DeviceName>_/Removable}` |
| `${System Data/Block Devices/_<DeviceName>_/Size} ` | `${Storage/Disks/_<DeviceName>_/Size}` |
| `${System Data/Block Devices/_<DeviceName>_/Storage Controller} ` | `${Storage/Disks/_<DeviceName>_/StorageController}` |
| `${System Data/CPU/Model}` | `${CPU/Model}` |
| `${System Data/CPU/Total Cores}` | `${CPU/TotalCores}` |
| `${System Data/CPU/Total Threads}` | `${CPU/TotalThreads}` |
| `${System Data/CPU/Vendor}` | `${CPU/Processor/Vendor}` |
| `${System Data/GPU/Model}` | `${GPU/GraphicsCard/ProductName}` |
| `${System Data/GPU/Vendor}` | `${GPU/GraphicsCard/VendorName}` |
| `${System Data/Memory/Total Physical Bytes}` | `${Memory/TotalPhysicalBytes}` |
| `${System Data/Memory/Total Usable Bytes}` | `${Memory/TotalUsableBytes}` |
| `${System Data/Network/Number Interfaces}` | `${Network/TotalNICs}` |
| `${System Data/Network/_<IfaceName>_/IsVirtual}` | `${Network/NICs/_<IfaceName>_/IsVirtual}` |
| `${System Data/Network/_<IfaceName>_/MacAddress}` | `${Network/NICs/_<IfaceName>_/MacAddress}` |
| `${System Data/Network/_<IfaceName>_/Name}` | `${Network/NICs/_<IfaceName>_/Name}` |
| `${System Data/Runtime/Hostname}` | `${Runtime/Hostname}` |

#### SMBIOS Labels to new Label Templates' variable table
| Deprecated Variable | Equivalent new Variable |
| ----------------------------------------------------------------- | ----------------------- |
| `${BIOS Information/Address}` | _not available_ |
| `${BIOS Information/BIOS Revision}` | _not available_ |
| `${BIOS Information/ROM Size}` | _not available_ |
| `${BIOS Information/Release Date}` | `${BIOS/Date}` |
| `${BIOS Information/Runtime Size}` | _not available_ |
| `${BIOS Information/Vendor}` | `${BIOS/Vendor}` |
| `${BIOS Information/Version}` | `${BIOS/Version}` |
| `${Base Board Information/Asset Tag}` | `${BaseBoard/AssetTag}` |
| `${Base Board Information/Chassis Handle}` | _not available_ |
| `${Base Board Information/Contained Object Handles}` | _not available_ |
| `${Base Board Information/Location In Chassis}` | _not available_ |
| `${Base Board Information/Manufacturer}` | `${BaseBoard/Vendor}` |
| `${Base Board Information/Product Name}` | `${BaseBoard/Product}` |
| `${Base Board Information/Serial Number}` | `${BaseBoard/SerialNumber}` |
| `${Base Board Information/Type}` | _not available_ |
| `${Base Board Information/Version}` | `${BaseBoard/Version}` |
| `${Chassis Information/Asset Tag}` | `${Chassis/AssetTag}` |
| `${Chassis Information/Boot-up State}` | _not available_ |
| `${Chassis Information/Contained Elements}` | _not available_ |
| `${Chassis Information/Height}` | _not available_ |
| `${Chassis Information/Lock}` | _not available_ |
| `${Chassis Information/Manufacturer}` | `${Chassis/Vendor}` |
| `${Chassis Information/Number Of Power Cords}` | _not available_ |
| `${Chassis Information/OEM Information}` | _not available_ |
| `${Chassis Information/Power Supply State}` | _not available_ |
| `${Chassis Information/SKU Number}` | _not available_ |
| `${Chassis Information/Security Status}` | _not available_ |
| `${Chassis Information/Serial Number}` | `${Chassis/SerialNumber}` |
| `${Chassis Information/Thermal State}` | _not available_ |
| `${Chassis Information/Type}` | `${Chassis/TypeDescription}` |
| `${Chassis Information/Version}` | `${Chassis/Version}` |
| `${System Information/Family}` | `${Product/Family}` |
| `${System Information/Manufacturer}` | `${Product/Vendor}` |
| `${System Information/Product Name}` | `${Product/Name}` |
| `${System Information/SKU Number}` | `${Product/SKU}` |
| `${System Information/Serial Number}` | `${Product/SerialNumber}` |
| `${System Information/UUID}` | `${Product/UUID}` |
| `${System Information/Version}` | `${Product/Version}` |
| `${System Information/Wake-up Type}` | _not available_ |
24 changes: 24 additions & 0 deletions docs/label-templates-gpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_label: GPU
title: ''
---

## GPU Template Variables

The information collected in the GPU template variables defines the attributes of the graphics
cards installed in the system.

The data is exposed by graphic card number (0, 1, 2, ...)

To reference the first graphic card, the graphic card number (_`<Number>`_) can be omitted
(e.g., the variable `${GPU/GraphicsCards/Driver}` is the same of `${GPU/GraphicsCards/0/Driver}`).

| Variable | Description |
| -------------------- | --------------------- |
| `${GPU/GraphicsCards/Driver}`| GPU card driver |
| `${GPU/GraphicsCards/ProductName}` | GPU card model |
| `${GPU/GraphicsCards/VendorName}` | GPU card vendor |
| `${GPU/GraphicsCards/_<Number>_/Driver}`| GPU card _number_ driver |
| `${GPU/GraphicsCards/_<Number>_/ProductName}` | GPU card _number_ model |
| `${GPU/GraphicsCards/_<Number>_/VendorName}` | GPU card _number_ vendor |
| `${GPU/TotalCards}`| Number of GPU cards in the system |
Empty file.
16 changes: 16 additions & 0 deletions docs/label-templates-memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_label: Memory
title: ''
---

## Memory Template Variables

The information collected in the Memory template variables, defines attributes of the
(volatile) memory available on the system.

| Variable | Description |
| -------------------- | --------------------- |
| `${Memory/Modules}` | Memory modules |
| `${Memory/SupportedPageSizes}` | Allowed memory page sizes |
| `${Memory/TotalPhysicalBytes}` | Total memory |
| `${Memory/TotalUsableBytes}` | Total memory available |
35 changes: 35 additions & 0 deletions docs/label-templates-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_label: Network
title: ''
---

## Network Template Variables

The information collected in the Network template variables defines attributes of the network
interfaces available in the system.

The NICs are tracked both by number (0, 1, 2, ...) and by interface name (_eth0_, _virbr0_, ...).

For example, if `${Network/NICs/2/Name}` is equal to `eth0`, then the network interface
Mac Address can be retrieved via both the `${Network/NICs/2/MacAddress}` and the
`${Network/NICs/eth0/MacAddress}` variables.

| Variable | Description |
| --------------------------------------------------- | ------------------------------------------------ |
| `${Network/NICs/_<Number>_/AdvertisedLinkModes}` | Ethernet Link Modes advertised as available |
| `${Network/NICs/_<Number>_/Duplex}` | Ethernet Duplex mode |
| `${Network/NICs/_<Number>_/IsVirtual}` | Wheter the NIC is real ("false") or not ("true") |
| `${Network/NICs/_<Number>_/MacAddress}` | MAC of the interface |
| `${Network/NICs/_<Number>_/Name}` | Interface name |
| `${Network/NICs/_<Number>_/Speed}` | Speed of the link |
| `${Network/NICs/_<Number>_/SupportedLinkModes}` | Ethernet Link Modes supported by the NIC |
| `${Network/NICs/_<Number>_/SupportedPorts}` | NIC's available ports |
| `${Network/NICs/_<IfaceName>_/AdvertisedLinkModes}` | Ethernet Link Modes advertised as available |
| `${Network/NICs/_<IfaceName>_/Duplex}` | Ethernet Duplex mode |
| `${Network/NICs/_<IfaceName>_/IsVirtual}` | Wheter the NIC is real ("false") or not ("true") |
| `${Network/NICs/_<IfaceName>_/MacAddress}` | MAC of the interface |
| `${Network/NICs/_<IfaceName>_/Name}` | Interface name |
| `${Network/NICs/_<IfaceName>_/Speed}` | Speed of the link |
| `${Network/NICs/_<IfaceName>_/SupportedLinkModes}` | Ethernet Link Modes supported by the NIC |
| `${Network/NICs/_<IfaceName>_/SupportedPorts}` | NIC's available ports |
| `${Network/TotalNICs/}` | Number of NICs present in the system |
23 changes: 23 additions & 0 deletions docs/label-templates-product.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_label: Product
title: ''
---

## Product Template Variables

The information in this variables refers to attributes of the overall system.

Subset of SMBIOS System Information data (type 1).

For more information on SMBIOS see the
[SMSBIOS specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.1.pdf).

| Variable | Description |
| ------------------------- | ------------------------- |
| `${Product/Family}` | System Family |
| `${Product/Name}` | Product Name |
| `${Product/SKU}` | System SKU Number |
| `${Product/SerialNumber}` | System serial number |
| `${Product/UUID}` | System UUID |
| `${Product/Vendor}` | System vendor |
| `${Product/Version}` | System version |
12 changes: 12 additions & 0 deletions docs/label-templates-runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
sidebar_label: Runtime
title: ''
---

## Runtime Template Variables

Runtime template variables collect information about the system configuration.

| Variable | Description |
| --------------------- | ---------------- |
| `${Runtime/Hostname}` | System hostname |
Loading
Loading