USBMgmtService
更新时间: 2026/07/01
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/Managers/manager_id/USBMgmtService

properties

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

supported_methods

  • GET
  • PATCH

HTTP methods

GET

命令功能

查询 USB 管理服务资源信息

命令格式

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

请求头:

X-Auth-Token: auth_value

请求消息体: 无

参数说明

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

使用指南

BMC300 5.3.0.1及以上版本支持此功能。 支持的服务器类型详见表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

请求头:

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

请求消息体:

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

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ifmatch_value请求消息的匹配参数可通过对相应资源发起GET操作,从响应头中获取(对应于“ETag”参数)
ServiceEnabled_valueUSB管理服务使能状态● true:使能,允许PC或手机接入BMC直连管理接口后访问BMC的网络
● false:禁用,禁止PC或手机接入BMC直连管理接口后访问BMC的网络
PasswordU盘近端运维配置文件压缩密码长度为1~32的字符串

使用指南

BMC300 5.3.0.1及以上版本支持此功能。 支持的服务器类型详见表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