接口描述

查询节点网卡信息

请求路径

GET /v1/nodes/<nodeID>/interfaces

请求参数

名称 类型 位置 必须 描述
Authorization string header 鉴权 token
nodeID string path 节点 ID

返回值

名称 类型 描述
interfaces []Interface 网卡信息

Interface

名称 类型 描述
netDevName string 网卡名
ip string ip 地址
mac string mac 地址
speed string 速率
subNetPortInfo []SubNetPort 网卡详细信息

SubNetPort

名称 类型 描述
name string 网卡名
ip string ip 地址
type string IP地址类型(v4/v6)
broadcast string 广播地址
scope string scope路由
isDynamic bool 是否动态获取IP地址

请求示例

```

## 返回值示例
``` json
正常请求:
  http code 200
{
  "interfaces": [
    {
      "netDevName": "eth0",
      "ip": "172.0.0.1",
      "mac": "ff:ee:cc:dd:aa:bb",
      "speed": "1Gbit/s",
      "subNetPortInfo": [
      {
        "name": "eth3",
        "ip": "fe80::d6ae:52ff:fe6c:b36e",
        "type": "v6",
        "broadcast": "",
        "scope": "link",
        "isDynamic": false
      },
      {
        "name": "eth1",
        "ip": "172.17.32.4",
        "type": "v4",
        "broadcast": "",
        "scope": "global",
        "isDynamic": false
        }
      ]
    }
  ]
}
异常请求:
  http code 4xx/5xx
{
  "code": 4000001,
  "desc": ""
}

错误码列表

错误码 描述
401 鉴权失败
4000002 节点未查找到
4000100 未查到网卡信息

如接口返回错误码未列举,可在错误码总览中查找

results matching ""

    No results matching ""