代码仓
中
DigitalWarranty
更新时间: 2026/10/28
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/Systems/system_id/DigitalWarranty

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-指定存储资源模型的OData描述信息
@odata.idstringtrue-指定存储资源的访问路径
@odata.typestringtrue-指定存储资源的类型
Idstringtrue-资源ID
Namestringtrue-资源名称
Descriptionstringtrue-资源描述
ProductNamestringtrue-产品名称,如2288H V5
SerialNumberstringtrue-序列号
ManufactureDatestringtrue-生产日期
UUIDstringtrue-设备对应的全局唯一标识符
UnitTypestringtrue-固定为“Device”
StartPointstringfalse-服务起始时间
Lifespannumberfalse-服务年限取值:1~255单位:月
FirstPowerOnTimestringtrue-首次上电时间格式为:YYYY-MM-DD

supported_methods ​

  • GET
  • PATCH

HTTP methods ​

GET ​

命令功能

查询电子保单信息

命令格式

URL: https://device_ip/redfish/v1/Systems/system_id/DigitalWarranty

请求头:

text
X-Auth-Token: 123456789***********************

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
system_id系统资源的ID参见源文件参数说明
auth_value请求消息的鉴权参数可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

无

使用实例

请求样例:

http
GET <https://device_ip/redfish/v1/Systems/system_id/DigitalWarranty>

X-Auth-Token: 123456789***********************

请求消息体:无

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#HwDigitalWarranty.HwDigitalWarranty",
"@odata.id": "/redfish/v1/Systems/1/DigitalWarranty",
"@odata.type": "#HwDigitalWarranty.v1_0_0.HwDigitalWarranty",
"Description": "Digital Warranty",
"Name": "DigitalWarranty",
"Id": "DigitalWarranty",
"ProductName": "2288hv5",
"SerialNumber": "123456",
"ManufactureDate": "2020-01-15T21:29:40",
"UUID": "AC640AE7-0018-8549-B211-D21D2489633C",
"UnitType": "Device",
"StartPoint": "2020-04-15",
"Lifespan": 10,
"FirstPowerOnTime": "2020-01-01"
}

响应码:200

PATCH ​

命令功能

修改电子保单信息

命令格式

URL: https://device_ip/redfish/v1/Systems/system_id/DigitalWarranty

请求头:

text
X-Auth-Token: 123456789***********************
Content-Type: header_type
If-Match: ifmatch_value

请求消息体:

json
{
"StartPoint": SP_value,
"Lifespan": Lifespan_value
}

URL参数说明

参数参数说明取值
system_id系统资源的ID● 针对机架服务器,取值为1
● 针对高密服务器,取值为BladeN(N表示节点槽位号),例如“Blade1”
● 针对刀片服务器,取值可以为BladeN(N表示计算节点槽位号)或 SwiN(N表示交换模块槽位号),例如“Swi1”

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
StartPoint服务起始时间字符串格式要求xxxx-xx-xx
Lifespan服务年限0:表示清除当前维保信息,该属性值响应为null 1~255:服务年限,单位月

使用指南

无

使用实例

请求样例:

http
PATCH <https://device_ip/redfish/v1/Systems/system_id/DigitalWarranty>

X-Auth-Token: 123456789*********************** Content-Type: header_type If-Match: ifmatch_value

请求消息体:

json
{
"StartPoint": SP_value,
"Lifespan": Lifespan_value
}

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#HwDigitalWarranty.HwDigitalWarranty",
"@odata.id": "/redfish/v1/Systems/1/DigitalWarranty",
"@odata.type": "#HwDigitalWarranty.v1_0_0.HwDigitalWarranty",
"Description": "Digital Warranty",
"Name": "DigitalWarranty",
"Id": "DigitalWarranty",
"ProductName": "2288hv5",
"SerialNumber": "123456",
"ManufactureDate": "2020-01-15T21:29:40",
"UUID": "AC640AE7-0018-8549-B211-D21D2489633C",
"StartPoint": "2020-04-15",
"Lifespan": 10,
"FirstPowerOnTime": "2020-04-15"
}

响应码:200