简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。
GetNetworkInterface
贡献者
建议更改
您可以使用 GetNetworkInterface
方法获取有关节点上网络接口的信息。
Parameters
此方法具有以下输入参数:
Name | Description | Type | 默认值 | Required |
---|---|---|---|---|
接口 |
用于获取每个节点的相关信息的接口的名称。可能值:
|
string |
无 |
否 |
【强制】 |
将此参数设置为 true 可在集群中的所有节点上运行。 |
boolean |
false |
否 |
返回值
此方法具有以下返回值:
Name | Description | Type |
---|---|---|
nodes |
一个对象数组,用于描述存储集群中每个存储节点的接口。阵列中的每个对象都包含以下项:
|
JSON 对象数组 |
请求示例
此方法的请求类似于以下示例:
{ "method": "GetNetworkInterface", "params": { "interface": "Bond1G", "force": true }, "id": 1 }
响应示例
此方法返回类似于以下示例的响应:
{ "id": 1, "result": { "nodes": [ { "nodeID": 1, "result": { "interface": { "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 } } }, { "nodeID": 2, "result": { "interface": { "address": "10.117.64.35", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "d4:ae:52:7a:ae:23", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } }, { "nodeID": 3, "result": { "interface": { "address": "10.117.64.39", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "c8:1f:66:f0:9d:17", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } }, { "nodeID": 4, "result": { "interface": { "address": "10.117.64.107", "addressV6": "::", "broadcast": "10.117.79.255", "macAddress": "b8:ca:3a:f5:24:f8", "mtu": 1500, "name": "Bond1G", "namespace": false, "netmask": "255.255.240.0", "status": "UpAndRunning", "type": "BondMaster", "virtualNetworkTag": 0 } } } ] } }
自版本以来的新增功能
9.6