创建新的网络路由。如果向系统添加其他路由,则路由 href 值会发生更改。创建路由时将不会返回路由信息,因为返回的属性将与输入属性相同。成功创建路由后会返回 HTTP 状态 204 (Created)。
创建静态路由的请求示例:
POST /api/network/v1/routes HTTP/1.1
Authorization: Basic abcd1234MWE=
Host: zfssa.example.com:215
Content-Type: application/json
Content-Length: 164
{
"family": "IPv4",
"destination": "0.0.0.0",
"mask": "0",
"gateway": "10.11.12.1",
"interface": "ixgbe0"
}
结果示例:
HTTP/1.1 201 Created