Openstack Neutron:通过 rest api 为路由器添加静态路由器
Openstack Neutron: Adding static Router for the router via rest api
我无法PUT
请求为路由器添加静态路由。
我收到以下错误:
{
"NeutronError": {
"message": "Invalid input for external_gateway_info. Reason: Unexpected keys supplied: routes.",
"type": "HTTPBadRequest",
"detail": ""
}
}
我的请求负载是:
{
"router": {
"distributed": false,
"external_gateway_info": {
"network_id": "04901d68-eb70-410c-a2ae-e4b77d4e4641",
"enable_snat": true,
"routes": [
{
"destination": "112.112.112.0/24",
"nexthop": "117.97.10.2"
}
]
}
}
}
而且,我的 url 是:/routers/{:routerId}
使用相同的路由,我可以在 open stack neutron 中添加静态路由,但不能通过 API 请求。
这个方法有什么改进吗?
请使用下面的负载。
{
"router":{
"distributed":错误,
"routes": [
{
"destination": "172.1.1.0/24",
"nexthop": "177.77.44.11"
}
]
}
}
我无法PUT
请求为路由器添加静态路由。
我收到以下错误:
{
"NeutronError": {
"message": "Invalid input for external_gateway_info. Reason: Unexpected keys supplied: routes.",
"type": "HTTPBadRequest",
"detail": ""
}
}
我的请求负载是:
{
"router": {
"distributed": false,
"external_gateway_info": {
"network_id": "04901d68-eb70-410c-a2ae-e4b77d4e4641",
"enable_snat": true,
"routes": [
{
"destination": "112.112.112.0/24",
"nexthop": "117.97.10.2"
}
]
}
}
}
而且,我的 url 是:/routers/{:routerId}
使用相同的路由,我可以在 open stack neutron 中添加静态路由,但不能通过 API 请求。
这个方法有什么改进吗?
请使用下面的负载。
{ "router":{ "distributed":错误, "routes": [ { "destination": "172.1.1.0/24", "nexthop": "177.77.44.11" } ] } }