api: add Priority field to EndpointSettings

This new field is used by libnetwork to determine which endpoint
provides the default gateway for a container.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2023-07-13 10:40:03 +02:00
parent 229dc6676c
commit 5b752fab32
7 changed files with 208 additions and 1 deletions

View File

@@ -50,6 +50,14 @@ keywords: "API, Docker, rcli, REST, documentation"
daemon has experimental features enabled.
* `GET /networks/{id}` now returns an `EnableIPv4` field showing whether the
network has IPv4 IPAM enabled.
* `POST /networks/{id}/connect` and `POST /containers/create` now accept a
`GwPriority` field in `EndpointsConfig`. This value is used to determine which
network endpoint provides the default gateway for the container. The endpoint
with the highest priority is selected. If multiple endpoints have the same
priority, endpoints are sorted lexicographically by their network name, and
the one that sorts first is picked.
* `GET /containers/json` now returns a `GwPriority` field in `NetworkSettings`
for each network endpoint.
## v1.47 API changes