代码仓
Switches
更新时间: 2026/09/07
在AtomGit上查看源码

ResourceDefinition

uris

  • /redfish/v1/Fabrics/fabric_id/Switches/switch_id

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-Switch资源模型的OData描述信息
@odata.idstringtrue-Switch资源节点的访问路径
@odata.typestringtrue-Switch资源类型
Namestringtrue-Switch设备的名称
Idstringtrue-Switch设备ID
FirmwareVersionstringtrue-Switch设备固件版本号
PartNumberstringtrue-Switch设备的部件编码
SerialNumberstringtrue-Switch设备的序列号
Portsobjecttrue-Switch设备的端口集合
Ports.@odata.idstringtrue-Switch设备的端口集合的访问路径
Statusobjecttrue-Switch设备的状态,包括:
● Health:Switch设备健康状态
● State:Switch设备使能状态

supported_methods

  • GET

HTTP methods

GET

命令功能

查询指定Switch设备信息

命令格式

URL: https://device_ip/redfish/v1/Fabrics/fabric_id/Switches/switch_id

请求头:


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

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
auth_value执行该GET请求时,必须在"Headers"中携带"X-Auth-Token"值用于鉴权可通过/redfish/v1/SessionService/Sessions创建会话时获得
fabric_idfabric设备ID可通过/redfish/v1/Fabrics的Members属性获得
switch_idswitch设备ID可通过/redfish/v1/Fabrics/fabric_id/Switches的Members属性获得

使用指南

BMC300 5.13.3.27及以上版本,Atlas 350L SuperSuite,Atlas 560EL SuperSuite机型支持。

使用实例

请求样例:

http
GET https://device_ip/redfish/v1/Fabrics/fabric_id/Switches/switch_id

请求头:


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

请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#Switch.Switch",
  "@odata.id": "/redfish/v1/Fabrics/1/Switches/0",
  "@odata.type": "#Switch.v1_17_0.Switch",
  "Name": "Switches0",
  "Id": "0",
  "FirmwareVersion": "7.0.9.2.b002",
  "PartNumber": null,
  "SerialNumber": null,
  "Ports": {
    "@odata.id": "/redfish/v1/Fabrics/1/Switches/1/Ports"
  },
  "Status": {
    "Health": "OK",
    "State": "Enabled"
  }
}

响应码:200