bmc¶
bmc resource type — per-host BMC management over Redfish or IPMI.
Each bmc resource maps to one physical machine, addressed by its BMC
host/credentials. The resource ID is the human-friendly name used in
Pillar and targeting.
Configuration (via Pillar):
resources:
bmc:
bmc-host-01:
host: 10.10.10.5
username: root
password: calvin
verify_ssl: false
# backend defaults to 'auto'; set explicitly to skip the probe:
# backend: redfish # or 'ipmi'
legacy-host:
host: 10.10.10.7
username: ADMIN
password: ADMIN
backend: ipmi
port: 623
Targeting:
salt bmc-host-01 bmc_host.power_status # by resource ID alone
salt -C 'T@bmc:bmc-host-01' bmc_host.power_status # by full SRN
salt -C 'T@bmc' bmc_host.power_status # all bmc resources
salt bmc-host-01 state.sls baremetal/boot_http
Per-host execution functions live in
saltext.bmc.resources.bmc.modules.bmc_host; the per-host states
in saltext.bmc.resources.bmc.states.bmc_host.
- saltext.bmc.resources.bmc.init(opts: dict) None[source]¶
Initialise the
bmcresource type.Reads BMC host configs from Pillar and caches them in
__context__["bmc_resource"].
- saltext.bmc.resources.bmc.initialized() bool[source]¶
Return
Trueifinit()has been called successfully.
- saltext.bmc.resources.bmc.discover(opts: dict) list[source]¶
Return the list of BMC resource IDs declared in Pillar.
- saltext.bmc.resources.bmc.power_status() str[source]¶
Return
'on'/'off'/'unknown'for this host.
- saltext.bmc.resources.bmc.power_off(force: bool = False) dict[source]¶
Power off this host (
GracefulShutdownby default,ForceOffif force=True).
- saltext.bmc.resources.bmc.power_reset(force: bool = False) dict[source]¶
Reset this host (
GracefulRestartby default,ForceRestartif force=True).
- saltext.bmc.resources.bmc.get_boot_device() dict[source]¶
Return the current boot override (device/enabled/native_target).
- saltext.bmc.resources.bmc.set_boot_device(device: str = 'none', persistent: bool = False) dict[source]¶
Set the boot override on this host.
- saltext.bmc.resources.bmc.get_system_info() dict[source]¶
Return a normalised inventory dict for this host.
- saltext.bmc.resources.bmc.get_sensor_data() dict[source]¶
Return temperatures/fans/voltages dict for this host.