PATCH – 更新机箱资产标记和位置 LED 以及其他位置属性
使用 PATCH 方法更新 Redfish 服务的 Chassis 资源中的属性。
请求 URL
PATCH https://<BMC_IPADDR>/redfish/v1/Chassis/1
请求正文
要更新的属性如下所示,所有这些属性都可以单独更改。
字段 | 类型 | 错误消息 ID | |||
---|---|---|---|---|---|
AssetTag | 字符串 | 用户为此机箱分配的资产标记。 AssetTag 的最大字符串长度为 32。 | |||
IndicatorLED | 字符串 | 指示灯 LED 的状态,用于识别机箱。 可用值为“Lit”、“Blinking”或“Off”。 | |||
Location | 对象 | 机箱的位置。 | |||
Contacts | 数组 | 联系信息的数组。 | |||
Contacts[0] | 对象 | 已展开 | |||
ContactName | 字符串 | 此联系人的姓名。 | |||
Placement | 对象 | 寻址位置中的点位。 | |||
Rack | 字符串 | 一行中的机架位置的名称。 | |||
RackOffset | 整数 | 项的垂直位置(以 RackOffsetUnits 为单位)。 | |||
PostalAddress | 对象 | 寻址资源的邮政地址。 | |||
Building | 字符串 | 建筑物的名称。 | |||
Location | 字符串 | 机房名称或其他附加信息。 | |||
Name | 字符串 | 名称。 | |||
Room | 字符串 | 机房名称或编号。 |
响应
响应返回的内容与 GET 操作相同,但更新了属性。
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
示例
以下示例是 PATCH 正文。
{
"AssetTag" : "ABC-1-2"
}
成功运行 PATCH 操作后,机箱资源查询将返回以下示例 JSON 响应:
{
"SerialNumber": "NARVIR073",
"@odata.id": "/redfish/v1/Chassis/1",
"IndicatorLED": "Lit",
"PowerState": "On",
"NetworkAdapters": {
"@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters"
},
"EnvironmentalClass": "A4",
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoChassis.v1_0_0.LenovoChassisProperties",
"FruPartNumber": "01GT946",
"Sensors": {
"@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/Sensors"
},
"ProductName": "ThinkSystem SR860",
"LEDs": {
"@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/LEDs"
},
"Slots": {
"@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/Slots"
}
}
},
"ChassisType": "RackMount",
"Location": {
"PostalAddress": {
"Location": "",
"Room": "10F",
"Building": "ZJ",
"Name": "Narvi-SR860V2-1"
},
"Placement": {
"RackOffset": 48,
"Rack": "15C",
"RackOffsetUnits": "EIA_310"
},
"PartLocation": {},
"Contacts": [
{
"ContactName": ""
}
]
},
"Model": "7Z59CTO1WW",
"PCIeSlots": {
"@odata.id": "/redfish/v1/Chassis/1/PCIeSlots"
},
"Description": "This resource is used to represent a chassis or other physical enclosure for a Redfish implementation.",
"Thermal": {
"@odata.id": "/redfish/v1/Chassis/1/Thermal"
},
"Links": {
"Drives": [],
"CooledBy": [
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/0"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/1"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/2"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/3"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/4"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/5"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/6"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/7"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/8"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Thermal#/Fans/9"
}
],
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/1"
}
],
"PCIeDevices": [
{
"@odata.id": "/redfish/v1/Chassis/1/PCIeDevices/ob_1"
},
{
"@odata.id": "/redfish/v1/Chassis/1/PCIeDevices/slot_13"
}
],
"PoweredBy": [
{
"@odata.id": "/redfish/v1/Chassis/1/Power#/PowerSupplies/0"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Power#/PowerSupplies/1"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Power#/PowerSupplies/2"
},
{
"@odata.id": "/redfish/v1/Chassis/1/Power#/PowerSupplies/3"
}
],
"Storage": [],
"ManagersInChassis": [
{
"@odata.id": "/redfish/v1/Managers/1"
}
],
"Processors": [
{
"@odata.id": "/redfish/v1/Systems/1/Processors/1"
},
{
"@odata.id": "/redfish/v1/Systems/1/Processors/2"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/1"
}
]
},
"AssetTag": "ABC-1-2",
"PCIeDevices": {
"@odata.id": "/redfish/v1/Chassis/1/PCIeDevices"
},
"Status": {
"State": "Enabled",
"Health": "Critical"
},
"Id": "1",
"Name": "Chassis",
"HeightMm": 177.8,
"Power": {
"@odata.id": "/redfish/v1/Chassis/1/Power"
},
"SKU": "7Z59CTO1WW",
"@odata.type": "#Chassis.v1_10_0.Chassis",
"PartNumber": "SB27A22721",
"Manufacturer": "Lenovo",
"@odata.etag": "\"fe6783781ffb0b49d7667e84ce6a624a\"",
"LogServices": {
"@odata.id": "/redfish/v1/Systems/1/LogServices"
},
"UUID": "55833BF4-5BBB-11E7-997F-0A94EF402C57"
}
提供反馈