代码仓
中
USBMgmtService
更新时间: 2026/11/04
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/Managers/manager_id/USBMgmtService

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-USBMgmtService资源模型的OData描述信息
@odata.idstringtrue-USBMgmtService资源的访问路径
@odata.typestringtrue-USBMgmtService资源的类型
Descriptionstringtrue-USBMgmtService资源的描述
Namestringtrue-USBMgmtService资源的名称
Idstringtrue-USBMgmtService资源的ID
ServiceEnabledbooleanfalse-USB管理服务是否使能
● true: 使能,允许PC或手机接入BMC直连管理接口后访问BMC的网络
● false: 禁用,禁止PC或手机接入BMC直连管理接口后访问BMC的网络
USBDevicePresencebooleantrue-BMC直连管理接口上是否有USB设备在位
● true:在位
● false:不在位
USBUncompressPasswordstringfalse-U盘近端运维配置文件压缩密码

supported_methods ​

  • GET
  • PATCH

HTTP methods ​

GET ​

命令功能

查询 USB 管理服务资源信息

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/USBMgmtService

请求头:

text
X-Auth-Token: auth_value

请求消息体: 无

参数说明

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

使用指南

openUBMC 25.12 LTS及以上版本支持此功能。 支持的服务器类型详见表2-1。

使用实例

请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/USBMgmtService

X-Auth-Token: auth_value 请求消息体:无

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#USBMgmtService.USBMgmtService",
"@odata.id": "/redfish/v1/Managers/1/USBMgmtService",
"@odata.type": "#USBMgmtService.v1_0_0.USBMgmtService",
"Description": "USB Mgmt Service",
"Name": "USBMgmtService",
"Id": "USBMgmtService",
"ServiceEnabled": true,
"USBDevicePresence": false,
"USBUncompressPassword": null
}

响应码:200

PATCH ​

命令功能

修改 USB 管理服务资源信息

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/USBMgmtService

请求头:

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

请求消息体:

json
{
"ServiceEnabled": ServiceEnabled_value,
"USBUncompressPassword": Password
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ServiceEnabledUSB管理服务使能状态● true:使能,允许PC或手机接入BMC直连管理接口后访问BMC的网络
● false:禁用,禁止PC或手机接入BMC直连管理接口后访问BMC的网络
USBUncompressPasswordU盘近端运维配置文件压缩密码长度为1~32的字符串

使用指南

openUBMC 25.12 LTS及以上版本支持此功能。 支持的服务器类型详见表2-1。

使用实例

请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/USBMgmtService

X-Auth-Token: auth_value Content-Type: header_type If-Match: ifmatch_value 请求消息体:

json
{
"ServiceEnabled": ServiceEnabled_value,
"USBUncompressPassword": Password
}

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#USBMgmtService.USBMgmtService",
"@odata.id": "/redfish/v1/Managers/1/USBMgmtService",
"@odata.type": "#USBMgmtService.v1_0_0.USBMgmtService",
"Description": "USB Mgmt Service",
"Name": "USBMgmtService",
"Id": "USBMgmtService",
"ServiceEnabled": true,
"USBDevicePresence": false,
"USBUncompressPassword": null
}

响应码:200