简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。
ListNetworkInterfaces
贡献者
建议更改
您可以使用 ListNetworkInterfaces
方法列出有关节点上每个网络接口的信息。此 API 方法适用于单个节点;访问单个节点需要用户 ID 和密码身份验证。但是,如果在方法调用中为参数 force 指定了值 true ,则可以在集群上使用此方法。如果在集群上使用此参数,则会列出所有接口。
参数
此方法具有以下输入参数:
Name | Description | Type | 默认值 | Required |
---|---|---|---|---|
【强制】 |
可能值:
|
boolean |
无 |
否 |
返回值
此方法具有以下返回值:
Name |
Description |
Type |
接口 |
存储节点(或整个存储集群,如果 force = |
网络接口 数组 |
请求示例
此方法的请求类似于以下示例:
{ "method": "ListNetworkInterfaces", "params": {}, "id" : 1 }
响应示例
此方法返回类似于以下示例的响应:
{ "id": 1, "result": { "nodes": [ { "nodeID": 1, "result": { "interfaces": [ { "address": "10.117.80.32", "addressV6": "::", "broadcast": "10.117.95.255", "macAddress": "90:b1:1c:42:e0:1a", "mtu": 9000, "name": "Bond10G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 }, { "address": "10.117.64.32", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "90:b1:1c:42:e0:1e", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 }, { "address": "0.0.0.0", "addressV6": "::", "broadcast": "0.0.0.0", "macAddress": "90:b1:1c:42:e0:1a", "mtu": 9000, "name": "eth0", "namespace": false, "netmask": "0.0.0.0", "status": "UpAndRunning", "type": "BondSlave", "virtualNetworkTag": 0 }, { "address": "127.0.0.1", "addressV6": "::", "broadcast": "0.0.0.0", "macAddress": "00:00:00:00:00:00", "mtu": 0, "name": "lo", "namespace": false, "netmask": "0.0.0.0", "status": "UpAndRunning", "type": "Loopback", "virtualNetworkTag": 0 } ] } } ] } }
自版本以来的新增功能
9.6