mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38089 from thaJeztah/fix_api_version
Update API version to v1.40
This commit is contained in:
commit
b8e87cfdad
5 changed files with 26 additions and 21 deletions
|
@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api"
|
||||||
// Common constants for daemon and client.
|
// Common constants for daemon and client.
|
||||||
const (
|
const (
|
||||||
// DefaultVersion of Current REST API
|
// DefaultVersion of Current REST API
|
||||||
DefaultVersion = "1.39"
|
DefaultVersion = "1.40"
|
||||||
|
|
||||||
// NoBaseImageSpecifier is the symbol used by the FROM
|
// NoBaseImageSpecifier is the symbol used by the FROM
|
||||||
// command to specify that no base image is to be used.
|
// command to specify that no base image is to be used.
|
||||||
|
|
|
@ -186,10 +186,10 @@ func (sr *swarmRouter) createService(ctx context.Context, w http.ResponseWriter,
|
||||||
if versions.LessThan(cliVersion, "1.30") {
|
if versions.LessThan(cliVersion, "1.30") {
|
||||||
queryRegistry = true
|
queryRegistry = true
|
||||||
}
|
}
|
||||||
if versions.LessThan(cliVersion, "1.39") {
|
if versions.LessThan(cliVersion, "1.40") {
|
||||||
if service.TaskTemplate.ContainerSpec != nil {
|
if service.TaskTemplate.ContainerSpec != nil {
|
||||||
// Sysctls for docker swarm services weren't supported before
|
// Sysctls for docker swarm services weren't supported before
|
||||||
// API version 1.39
|
// API version 1.40
|
||||||
service.TaskTemplate.ContainerSpec.Sysctls = nil
|
service.TaskTemplate.ContainerSpec.Sysctls = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,10 +229,10 @@ func (sr *swarmRouter) updateService(ctx context.Context, w http.ResponseWriter,
|
||||||
if versions.LessThan(cliVersion, "1.30") {
|
if versions.LessThan(cliVersion, "1.30") {
|
||||||
queryRegistry = true
|
queryRegistry = true
|
||||||
}
|
}
|
||||||
if versions.LessThan(cliVersion, "1.39") {
|
if versions.LessThan(cliVersion, "1.40") {
|
||||||
if service.TaskTemplate.ContainerSpec != nil {
|
if service.TaskTemplate.ContainerSpec != nil {
|
||||||
// Sysctls for docker swarm services weren't supported before
|
// Sysctls for docker swarm services weren't supported before
|
||||||
// API version 1.39
|
// API version 1.40
|
||||||
service.TaskTemplate.ContainerSpec.Sysctls = nil
|
service.TaskTemplate.ContainerSpec.Sysctls = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ produces:
|
||||||
consumes:
|
consumes:
|
||||||
- "application/json"
|
- "application/json"
|
||||||
- "text/plain"
|
- "text/plain"
|
||||||
basePath: "/v1.39"
|
basePath: "/v1.40"
|
||||||
info:
|
info:
|
||||||
title: "Docker Engine API"
|
title: "Docker Engine API"
|
||||||
version: "1.39"
|
version: "1.40"
|
||||||
x-logo:
|
x-logo:
|
||||||
url: "https://docs.docker.com/images/logo-docker-main.png"
|
url: "https://docs.docker.com/images/logo-docker-main.png"
|
||||||
description: |
|
description: |
|
||||||
|
@ -49,8 +49,8 @@ info:
|
||||||
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
|
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
If you omit the version-prefix, the current version of the API (v1.39) is used.
|
If you omit the version-prefix, the current version of the API (v1.40) is used.
|
||||||
For example, calling `/info` is the same as calling `/v1.39/info`. Using the
|
For example, calling `/info` is the same as calling `/v1.40/info`. Using the
|
||||||
API without a version-prefix is deprecated and will be removed in a future release.
|
API without a version-prefix is deprecated and will be removed in a future release.
|
||||||
|
|
||||||
Engine releases in the near future should support this version of the API,
|
Engine releases in the near future should support this version of the API,
|
||||||
|
|
|
@ -13,6 +13,21 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||||
will be rejected.
|
will be rejected.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## v1.40 API changes
|
||||||
|
|
||||||
|
[Docker Engine API v1.40](https://docs.docker.com/engine/api/v1.40/) documentation
|
||||||
|
|
||||||
|
* `GET /services` now returns `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `GET /services/{id}` now returns `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `POST /services/create` now accepts `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `POST /services/{id}/update` now accepts `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `GET /tasks` now returns `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `GET /tasks/{id}` now returns `Sysctls` as part of the `ContainerSpec`.
|
||||||
|
* `GET /nodes` now supports a filter type `node.label` filter to filter nodes based
|
||||||
|
on the node.label. The format of the label filter is `node.label=<key>`/`node.label=<key>=<value>`
|
||||||
|
to return those with the specified labels, or `node.label!=<key>`/`node.label!=<key>=<value>`
|
||||||
|
to return those without the specified labels.
|
||||||
|
|
||||||
## V1.39 API changes
|
## V1.39 API changes
|
||||||
|
|
||||||
[Docker Engine API v1.39](https://docs.docker.com/engine/api/v1.39/) documentation
|
[Docker Engine API v1.39](https://docs.docker.com/engine/api/v1.39/) documentation
|
||||||
|
@ -26,16 +41,6 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||||
* `POST /swarm/init` now accepts a `DefaultAddrPool` property to set global scope default address pool
|
* `POST /swarm/init` now accepts a `DefaultAddrPool` property to set global scope default address pool
|
||||||
* `POST /swarm/init` now accepts a `SubnetSize` property to set global scope networks by giving the
|
* `POST /swarm/init` now accepts a `SubnetSize` property to set global scope networks by giving the
|
||||||
length of the subnet masks for every such network
|
length of the subnet masks for every such network
|
||||||
* `GET /nodes` now supports a filter type `node.label` filter to filter nodes based
|
|
||||||
on the node.label. The format of the label filter is `node.label=<key>`/`node.label=<key>=<value>`
|
|
||||||
to return those with the specified labels, or `node.label!=<key>`/`node.label!=<key>=<value>`
|
|
||||||
to return those without the specified labels.
|
|
||||||
* `GET /services` now returns `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
* `GET /services/{id}` now returns `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
* `POST /services/create` now accepts `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
* `POST /services/{id}/update` now accepts `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
* `GET /tasks` now returns `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
* `GET /tasks/{id}` now returns `Sysctls` as part of the `ContainerSpec`.
|
|
||||||
|
|
||||||
## V1.38 API changes
|
## V1.38 API changes
|
||||||
|
|
||||||
|
|
|
@ -339,8 +339,8 @@ func TestCreateServiceConfigFileMode(t *testing.T) {
|
||||||
// anything up in the test environment
|
// anything up in the test environment
|
||||||
func TestCreateServiceSysctls(t *testing.T) {
|
func TestCreateServiceSysctls(t *testing.T) {
|
||||||
skip.If(
|
skip.If(
|
||||||
t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.39"),
|
t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"),
|
||||||
"setting service sysctls is unsupported before api v1.39",
|
"setting service sysctls is unsupported before api v1.40",
|
||||||
)
|
)
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue