Skip to content

Commit 90a8d4b

Browse files
committed
Docker Engine API updated to 1.41
1 parent 9c59268 commit 90a8d4b

File tree

199 files changed

+23311
-1674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+23311
-1674
lines changed

.jane-openapi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ return [
44
'date-prefer-interface' => true,
55
'directory' => __DIR__ . '/src',
66
'namespace' => 'Docker\\API',
7-
'openapi-file' => __DIR__ . '/spec/v1.36.json',
7+
'openapi-file' => __DIR__ . '/spec/v1.41.json',
88
'reference' => true,
99
'strict' => false,
1010
];

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
},
3434
"extra": {
3535
"branch-alias": {
36+
"6.1.41": "6.1.41.x-dev",
3637
"6.1.36": "6.1.36.x-dev"
3738
}
3839
},

spec/v1.41.json

Lines changed: 16074 additions & 0 deletions
Large diffs are not rendered by default.

src/Client.php

Lines changed: 231 additions & 125 deletions
Large diffs are not rendered by default.

src/Endpoint/BuildPrune.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@
66

77
class BuildPrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint
88
{
9+
/**
10+
* @param array $queryParameters {
11+
*
12+
* @var int $keep-storage Amount of disk space in bytes to keep for cache
13+
* @var bool $all Remove all types of build cache
14+
* @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to
15+
* process on the list of build cache objects.
16+
*
17+
* Available filters:
18+
*
19+
* - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
20+
* - `id=<id>`
21+
* - `parent=<id>`
22+
* - `type=<string>`
23+
* - `description=<string>`
24+
* - `inuse`
25+
* - `shared`
26+
* - `private`
27+
*
28+
* }
29+
*/
30+
public function __construct(array $queryParameters = [])
31+
{
32+
$this->queryParameters = $queryParameters;
33+
}
34+
935
use \Docker\API\Runtime\Client\EndpointTrait;
1036

1137
public function getMethod(): string
@@ -28,6 +54,19 @@ public function getExtraHeaders(): array
2854
return ['Accept' => ['application/json']];
2955
}
3056

57+
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
58+
{
59+
$optionsResolver = parent::getQueryOptionsResolver();
60+
$optionsResolver->setDefined(['keep-storage', 'all', 'filters']);
61+
$optionsResolver->setRequired([]);
62+
$optionsResolver->setDefaults([]);
63+
$optionsResolver->setAllowedTypes('keep-storage', ['int']);
64+
$optionsResolver->setAllowedTypes('all', ['bool']);
65+
$optionsResolver->setAllowedTypes('filters', ['string']);
66+
67+
return $optionsResolver;
68+
}
69+
3170
/**
3271
* {@inheritdoc}
3372
*

src/Endpoint/ConfigList.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ class ConfigList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc
99
/**
1010
* @param array $queryParameters {
1111
*
12-
* @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:
12+
* @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to
13+
* process on the configs list.
14+
*
15+
* Available filters:
1316
*
1417
* - `id=<config id>`
1518
* - `label=<key> or label=<key>=value`

src/Endpoint/ConfigUpdate.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ class ConfigUpdate extends \Docker\API\Runtime\Client\BaseEndpoint implements \D
1212
* @param string $id The ID or name of the config
1313
* @param array $queryParameters {
1414
*
15-
* @var int $version The version number of the config object being updated. This is required to avoid conflicting writes.
15+
* @var int $version The version number of the config object being updated. This is
16+
* required to avoid conflicting writes.
17+
*
1618
* }
1719
*/
1820
public function __construct(string $id, \Docker\API\Model\ConfigSpec $requestBody, array $queryParameters = [])

src/Endpoint/ContainerArchiveInfo.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ class ContainerArchiveInfo extends \Docker\API\Runtime\Client\BaseEndpoint imple
99
protected $id;
1010

1111
/**
12-
* A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path.
12+
* A response header `X-Docker-Container-Path-Stat` is returned, containing.
13+
* a base64 - encoded JSON object with some filesystem header information
14+
* about the path.
1315
*
1416
* @param string $id ID or name of the container
1517
* @param array $queryParameters {

src/Endpoint/ContainerAttach.php

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
99
protected $id;
1010

1111
/**
12-
* Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
12+
* Attach to a container to read its output or send it input. You can attach.
13+
* to the same container multiple times and you can reattach to containers
14+
* that have been detached.
1315
*
14-
* Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
16+
* Either the `stream` or `logs` parameter must be `true` for this endpoint
17+
* to do anything.
1518
*
16-
* See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.
19+
* See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
20+
* for more details.
1721
*
1822
* ### Hijacking
1923
*
20-
* This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
24+
* This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`,
25+
* and `stderr` on the same socket.
2126
*
2227
* This is the response from the daemon for an attach request:
2328
*
@@ -28,9 +33,11 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
2833
* [STREAM]
2934
* ```
3035
*
31-
* After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
36+
* After the headers and two new lines, the TCP connection can now be used
37+
* for raw, bidirectional communication between the client and server.
3238
*
33-
* To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
39+
* To hint potential proxies about connection hijacking, the Docker client
40+
* can also optionally send connection upgrade headers.
3441
*
3542
* For example, the client sends this request to upgrade the connection:
3643
*
@@ -40,7 +47,8 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
4047
* Connection: Upgrade
4148
* ```
4249
*
43-
* The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
50+
* The Docker daemon will respond with a `101 UPGRADED` response, and will
51+
* similarly follow with the raw stream:
4452
*
4553
* ```
4654
* HTTP/1.1 101 UPGRADED
@@ -53,9 +61,14 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
5361
*
5462
* ### Stream format
5563
*
56-
* When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
64+
* When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate),
65+
* the stream over the hijacked connected is multiplexed to separate out
66+
* `stdout` and `stderr`. The stream consists of a series of frames, each
67+
* containing a header and a payload.
5768
*
58-
* The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
69+
* The header contains the information which the stream writes (`stdout` or
70+
* `stderr`). It also contains the size of the associated frame encoded in
71+
* the last four bytes (`uint32`).
5972
*
6073
* It is encoded on the first eight bytes like this:
6174
*
@@ -69,9 +82,11 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
6982
* - 1: `stdout`
7083
* - 2: `stderr`
7184
*
72-
* `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
85+
* `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size
86+
* encoded as big endian.
7387
*
74-
* Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
88+
* Following the header is the payload, which is the specified number of
89+
* bytes of `STREAM_TYPE`.
7590
*
7691
* The simplest way to implement this protocol is the following:
7792
*
@@ -83,15 +98,19 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements
8398
*
8499
* ### Stream format when using a TTY
85100
*
86-
* When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
101+
* When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate),
102+
* the stream is not multiplexed. The data exchanged over the hijacked
103+
* connection is simply the raw data from the process PTY and client's
104+
* `stdin`.
87105
*
88106
* @param string $id ID or name of the container
89107
* @param array $queryParameters {
90108
*
91-
* @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
109+
* @var string $detachKeys Override the key sequence for detaching a container.Format is a single
92110
* @var bool $logs Replay previous logs from the container.
93111
*
94-
* @var bool $stream Stream attached streams from the time the request was made onwards
112+
* @var bool $stream Stream attached streams from the time the request was made onwards.
113+
*
95114
* @var bool $stdin Attach to `stdin`
96115
* @var bool $stdout Attach to `stdout`
97116
* @var bool $stderr Attach to `stderr`

src/Endpoint/ContainerAttachWebsocket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ContainerAttachWebsocket extends \Docker\API\Runtime\Client\BaseEndpoint i
1212
* @param string $id ID or name of the container
1313
* @param array $queryParameters {
1414
*
15-
* @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`.
15+
* @var string $detachKeys Override the key sequence for detaching a container.Format is a single
1616
* @var bool $logs Return logs
1717
* @var bool $stream Return stream
1818
* @var bool $stdin Attach to `stdin`

0 commit comments

Comments
 (0)