The following table lists the apply and preview attributes that you can add to a hardware profile. For more hardware profile attribute descriptions, see Server and hardware profile field definitions.
Attribute | Description | Values |
apply | Include the Only servers that are specifically targeted in the hardware profile are configured. For more information about targeting servers, see the Bare Metal Orchestrator Command Line Interface User's Guide. | true or false |
preview | Include the To populate the status section, save and quit the hardware profile. Then, run the The hardware profile configuration is only applied to the targeted servers when the apply attribute is set to true. Note: You cannot set both the apply and preview attributes to true at the same time in the hardware profile. | true or false |
Example apply and preview attributes in a hardware profile
The following is an example of the apply and preview attributes in the spec section of a hardware profile.
apiVersion: mw.dell.com/v3
kind: HardwareProfile
metadata:
name: hw-profile001
labels:
site: gc
spec:
preview: true
apply: false
## the hardware profile is applied only to servers listed below
serverList:
- name: server22
namespace: metalweaver
- name: server21
namespace: metalweaver
## Add more fields below
server:
powerState: "Off"
Example preview output
The following is an example of the status section that appears in a hardware profile targeting two servers where one of two servers is in the failedList.
"status": {
"serverStatus": {
"hash": "14567238376801881703",
"preview": {
"summary": "hardware profile can be applied on (1) servers at time [2022-03-11T07:56:10Z]",
"failedList": {
"metalweaver": [
"server126"
]
}
},
"apply": {}
"switchStatus": {
"preview": {}
},
"hash": "13067907972745477115"