summaryrefslogtreecommitdiff
path: root/api/types
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #45469 from thaJeztah/deprecate_virtualsize_STEP2Akihiro Suda2023-05-162-12/+2
|\ | | | | API: omit deprecated VirtualSize field for API v1.44 and up
| * API: omit deprecated VirtualSize field for API v1.44 and upSebastiaan van Stijn2023-05-062-12/+2
| | | | | | | | | | | | | | | | This field is deprecated since 1261fe69a3586bb102182aa885197822419c768c, and will now be omitted on API v1.44 and up for the `GET /images/json`, `GET /images/{id}/json`, and `GET /system/df` endpoints. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* | Merge pull request #45484 from thaJeztah/remove_deprecated_stubsSebastiaan van Stijn2023-05-122-13/+0
|\ \ | | | | | | remove deprecated types, fields, and functions
| * | api/types/container: remove deprecated ContainerChangeResponseItemSebastiaan van Stijn2023-05-061-6/+0
| | | | | | | | | | | | | | | | | | | | | This was deprecated in dbb48e4b29e124aef6716ee8ad6856bf696235ca, which is part of the v24.0.0 release, so we can remove it from master. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| * | api/types: remove deprecated AuthConfigSebastiaan van Stijn2023-05-061-7/+0
| |/ | | | | | | | | | | | | This was deprecated in 818ee962196d668b6d405835c88c1ac6cdab7423, which is part of the v24.0.0 release, so we can remove it from master. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* | fixing consistent aliases for OCI spec importsJeyanthinath Muthuram2023-05-084-9/+9
|/ | | | Signed-off-by: Jeyanthinath Muthuram <jeyanthinath10@gmail.com>
* Merge pull request #45353 from thaJeztah/api_container_change_typeSebastiaan van Stijn2023-05-045-20/+63
|\ | | | | api/types/container: create type for changes endpoint
| * api/types/container: create type for changes endpointSebastiaan van Stijn2023-05-035-20/+63
| | | | | | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* | API: deprecate VirtualSize field for /images/json and /images/{id}/jsonSebastiaan van Stijn2023-04-182-11/+7
|/ | | | | | | | | In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Images are now stored self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/container: IpcMode: use common function for container-modeSebastiaan van Stijn2023-03-151-6/+5
| | | | | | | | Use the utility introduced in 1bd486666b858c11451495c9eb803eda3184e58c to share the same implementation as similar options. The IPCModeContainer const is left for now, but we need to consider what to do with these. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/container: PidMode: fix validation for empty container name/IDSebastiaan van Stijn2023-03-152-2/+11
| | | | | | | | | | | | | | | | | | Commit e7d75c8db7da8be0ae45a1abba5652658c536a2a fixed validation of "host" mode values, but also introduced a regression for validating "container:" mode PID-modes. PID-mode implemented a stricter validation than the other options and, unlike the other options, did not accept an empty container name/ID. This feature was originally implemented in fb43ef649bc6aa11ca19c0e046518e85e1c7e2fa, added some some integration tests (but no coverage for this case), and the related changes in the API types did not have unit-tests. While a later change (d4aec5f0a680b6b01bb720830451a93c6ec398e6) added a test for the `--pid=container:` (empty name) case, that test was later migrated to the CLI repository, as it covered parsing the flag (and validating the result). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/container: fix .Container() returning a name, when it shouldn'tSebastiaan van Stijn2023-03-152-36/+99
| | | | | | | | | | | | | | | | | | commit 1bd486666b858c11451495c9eb803eda3184e58c refactored this code, but it looks like I removed some changes in this part of the code when extracting these changes from a branch I was working on, and the behavior did not match the function's description (name to be empty if there is no "container:" prefix Unfortunately, there was no test coverage for this in this repository, so we didn't catch this. This patch: - fixes containerID() to not return a name/ID if no container: prefix is present - adds test-coverage for TestCgroupSpec - adds test-coverage for NetworkMode.ConnectedContainer - updates some test-tables to remove duplicates, defaults, and use similar cases Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/container: put "valid" field as first check in testsSebastiaan van Stijn2023-03-151-43/+43
| | | | | | | | | Make if more explicit which test-cases should be valid, and make it the first field, because the "valid" field is shared among all test-cases in the test-table, and making it the first field makes it slightly easier to distinguish valid from invalid cases. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Merge pull request #45032 from corhere/shim-optsSebastiaan van Stijn2023-03-021-3/+9
|\ | | | | daemon: allow shimv2 runtimes to be configured
| * daemon: allow shimv2 runtimes to be configuredCory Snider2023-02-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kubernetes only permits RuntimeClass values which are valid lowercase RFC 1123 labels, which disallows the period character. This prevents cri-dockerd from being able to support configuring alternative shimv2 runtimes for a pod as shimv2 runtime names must contain at least one period character. Add support for configuring named shimv2 runtimes in daemon.json so that runtime names can be aliased to Kubernetes-compatible names. Allow options to be set on shimv2 runtimes in daemon.json. The names of the new daemon runtime config fields have been selected to correspond with the equivalent field names in cri-containerd's configuration so that users can more easily follow documentation from the runtime vendor written for cri-containerd and apply it to daemon.json. Signed-off-by: Cory Snider <csnider@mirantis.com>
* | Merge pull request #45025 from corhere/oci-annotation-passthruBrian Goff2023-02-241-10/+11
|\ \
| * | daemon: add annotations to container HostConfigCory Snider2023-02-231-10/+11
| |/ | | | | | | | | | | | | Allow clients to set annotations on a container which will applied to the container's OCI spec. Signed-off-by: Cory Snider <csnider@mirantis.com>
* | Merge pull request #44003 from vvoland/invalidfilterBrian Goff2023-02-223-11/+187
|\ \ | |/ |/|
| * api/types/filters: Add GetBoolOrDefaultPaweł Gronowski2023-01-263-11/+187
| | | | | | | | Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
* | api: Extract parsing reference from repo and tagPaweł Gronowski2023-02-071-2/+2
|/ | | | Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
* Merge pull request #44379 from thaJeztah/container_strings_cutCory Snider2022-12-302-53/+204
|\ | | | | api/types/container: refactor to use strings.Cut, DRY, move tests and fix validation
| * api/types/container: fix validation for UTSMode, UsernsMode, PidModeSebastiaan van Stijn2022-12-292-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPCMode type was added in 497fc8876ede9924f61c0eee4dfadd71e5d9f537, and from that patch, the intent was to allow `host` (without `:`), `""` (empty, default) or `container:<container ID>`, but the `Valid()` function seems to be too relaxed and accepting both `:`, as well as `host:<anything>`. No unit-tests were added in that patch, and integration-tests only tested for valid values. Later on, `PidMode`, and `UTSMode` were added in 23feaaa240853c0e7f9817f8c2d272dd1c93ac3f and f2e5207fc989288ad136d48222df8e7754eb0e9b, both of which were implemented as a straight copy of the `IPCMode` implementation, copying the same bug. Finally, commit d4aec5f0a680b6b01bb720830451a93c6ec398e6 implemented unit-tests for these types, but testing for the wrong behavior of the implementation. This patch updates the validation to correctly invalidate `host[:<anything>]` and empty (`:`) types. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| * api/types/container: use strings.Cut() and DRYSebastiaan van Stijn2022-12-271-36/+38
| | | | | | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| * api/types/container: rewrite tests to use subtests and assertsSebastiaan van Stijn2022-12-271-139/+96
| | | | | | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| * hostconfig: move unit tests to api/types/containerSebastiaan van Stijn2022-12-272-0/+199
| | | | | | | | | | | | | | | | These types were moved to api/types/container in 7ac4232e70fe7cf7318333cd0890db7f95663079, but the unit-tests for them were not moved. This patch moves the unit-tests back together with the types. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* | api: can marshal and unmarshal when args.fields is emptyYamazaki Masashi2022-12-292-4/+22
|/ | | | | Signed-off-by: Yamazaki Masashi <masi19bw@gmail.com> Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
* api/types: use strings.Cut()Sebastiaan van Stijn2022-12-211-8/+7
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/time: use strings.Cut()Sebastiaan van Stijn2022-12-211-11/+11
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/filters: use strings.Cut()Sebastiaan van Stijn2022-12-211-3/+3
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* manage image inspect data in backendNicolas De Loof2022-12-091-0/+1
| | | | | | | | This allows differentiating how the detailed data is collected between the containerd-integration code and the existing implementation. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/filters: add output to exampleSebastiaan van Stijn2022-11-011-4/+15
| | | | | | | Make the example actually do something, and include the output, so that it shows up in the documentation. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types: fix empty-lines (revive)Sebastiaan van Stijn2022-09-281-5/+4
| | | | | | | | Also renamed variables that collided with import api/types/strslice/strslice_test.go:36:41: empty-lines: extra empty line at the end of a block (revive) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types: remove aliases for deprecated Volume and VolumeUsageDataSebastiaan van Stijn2022-09-271-14/+0
| | | | | | | | These were moved, and deprecated in f19ef20a4414a6f63da8fb2493e6010359652ad1 and 4caf68f4f60cddbe95f71b5a395e022ccc8cbf16, which are part of the 22.x release, so we can safely remove these from master. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* introduce GetImageOpts to manage image inspect data in backendNicolas De Loof2022-08-161-0/+8
| | | | | | | | Currently only provides the existing "platform" option, but more options will be added in follow-ups. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0aSebastiaan van Stijn2022-08-092-3/+3
| | | | | | | | | | | | | | | full diff: https://github.com/moby/swarmkit/compare/6068d1894d46...48dd89375d0a3e8a333c52bce1e6297e0b192d06 Finishes off the work to change references to cluster volumes in the API from using "csi" as the magic word to "cluster". This reflects that the volumes are "cluster volumes", not "csi volumes". Notably, there is no change to the plugin definitions being "csinode" and "csicontroller". This terminology is appropriate with regards to plugins because it accurates reflects what the plugin is. Signed-off-by: Drew Erny <derny@mirantis.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: add BuildCache.Parents for API >= v1.42Sebastiaan van Stijn2022-08-041-1/+3
| | | | | | This field was added to replace the deprecated "Parent" field. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: deprecate BuildCache.Parent in API >= v1.42Sebastiaan van Stijn2022-08-041-1/+3
| | | | | | | This field has been deprecated in BuildKit, so this follows the deprecation in the Engine API. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types: add missing GoDoc for BuildCache fields.Sebastiaan van Stijn2022-08-041-10/+19
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: add registry.EncodeAuthConfigSebastiaan van Stijn2022-07-292-0/+19
| | | | | | | Based on EncodeAuthToBase64 in docker/cli; https://github.com/docker/cli/blob/1f4111d2bf3dbd9b6f5252c551621af84401b691/cli/command/registry.go#L30-L37 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: add registry.DecodeAuthConfig, registry.DecodeAuthConfigBodySebastiaan van Stijn2022-07-292-0/+113
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types: move AuthConfig to registry typesSebastiaan van Stijn2022-07-294-22/+30
| | | | | | | Making the api types more focused per API type, and the general api/types package somewhat smaller. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api: add const for 'X-Registry-Auth'Sebastiaan van Stijn2022-07-291-0/+5
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types: remove deprecated fields for cluster-advertiseSebastiaan van Stijn2022-07-121-2/+0
| | | | | | | | | This removes: - Info.ClusterStore - Info.ClusterAdvertise Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/volume: remove deprecated typesSebastiaan van Stijn2022-07-121-11/+0
| | | | | | | | | This removes; - VolumeCreateBody (alias for CreateOptions) - VolumeListOKBody (alias for ListResponse) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* api/types/container: remove deprecated typesSebastiaan van Stijn2022-07-121-16/+0
| | | | | | | | | | This removes; - ContainerCreateCreatedBody (alias for CreateResponse) - ContainerWaitOKBody (alias for WaitResponse) - ContainerWaitOKBodyError (alias for WaitExitError) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* timestamp: clarify doc for ParseTimestampSamuel Karp2022-07-082-10/+12
| | | | Signed-off-by: Samuel Karp <me@samuelkarp.com>
* gofmt GoDoc comments with go1.19Sebastiaan van Stijn2022-07-083-27/+31
| | | | | | | | Older versions of Go don't format comments, so committing this as a separate commit, so that we can already make these changes before we upgrade to Go 1.19. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* container/exec: Support ConsoleSizePaweł Gronowski2022-06-243-0/+12
| | | | | | | | | Now client have the possibility to set the console size of the executed process immediately at the creation. This makes a difference for example when executing commands that output some kind of text user interface which is bounded by the console dimensions. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
* api: swagger: adjust ContainerWaitResponse error as optionalNiel Drummond2022-05-301-2/+1
| | | | Signed-off-by: Niel Drummond <niel@drummond.lu>
* Annotate some swagger documented types as int64Tobias Gesellchen2022-05-232-2/+2
| | | | | | | | Using the swagger.yaml to generate api models will create incompatible field types. Some inconsistencies had already been mentioned at #39131. I've added more fixes from real life experience, some only occurring on Windows. Closes #39131 Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>