Retroactively update improve-extraroute-api spec
As we discovered during implementation it wasn't a good idea of mine to make the request and response body a list on the top level. Neither the documentation tools nor python-neutronclient were prepared for non-dict request/response bodies. Another reason I suspect to always have dict-wrapped bodies is that it makes possible future changes to the request/response format a bit easier. Yet another reason is that the request/response body format in this change is now the exact same as it was used in the PUT /v2.0/routers/router-id request/response. Therefore clients wishing to use the new API only have to change the URL, but not the body of their requests. Since the api-def was already merged, this change just retroactively updates the spec to avoid possible future confusion between the spec and the api-ref. Change-Id: I3c7e9ab4ab6518eb1d30e3711a2d9571dfc2fa15 Partial-Bug: #1826396
This commit is contained in:
parent
c0587ea37b
commit
02b9204aa1
|
@ -58,19 +58,56 @@ Introduce a new API extension: extraroutes-atomic
|
|||
|
||||
PUT /v2.0/routers/{router_id}/add_extraroutes
|
||||
|
||||
[ { "destination": "179.24.1.0/24",
|
||||
"nexthop": "172.24.3.99" },
|
||||
...
|
||||
]
|
||||
{ "router":
|
||||
{ "routes":
|
||||
[ { "destination": "179.24.1.0/24",
|
||||
"nexthop": "172.24.3.99" },
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
::
|
||||
|
||||
200 OK
|
||||
|
||||
{ "router":
|
||||
{ "id": "1ecae6b8-be64-11e9-98ba-733d5460217b",
|
||||
"name": "router1",
|
||||
"routes":
|
||||
[ { "destination": "179.24.1.0/24",
|
||||
"nexthop": "172.24.3.99" },
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
::
|
||||
|
||||
PUT /v2.0/routers/{router_id}/remove_extraroutes
|
||||
|
||||
[ { "destination": "179.24.1.0/24",
|
||||
"nexthop": "172.24.3.99" },
|
||||
...
|
||||
]
|
||||
{ "router":
|
||||
{ "routes":
|
||||
[ { "destination": "179.24.1.0/24",
|
||||
"nexthop": "172.24.3.99" },
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
::
|
||||
|
||||
200 OK
|
||||
|
||||
{ "router":
|
||||
{ "id": "1ecae6b8-be64-11e9-98ba-733d5460217b",
|
||||
"name": "router1",
|
||||
"routes":
|
||||
[ remaining routes ],
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
Partial failures are not allowed. If the addition or removal of any routing
|
||||
table entry fails then the whole update is reverted.
|
||||
|
|
Loading…
Reference in New Issue