From 083abcf1a178c3e2eea99e42e2bce4f53de36fac Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Tue, 19 Dec 2023 23:40:24 +0100 Subject: [PATCH] Backport some api v1.44 changes --- api-model-v1-41/.openapi-generator/FILES | 6 +- api-model-v1-41/README.md | 3 +- api-model-v1-41/docker-engine-api-v1.41.yaml | 170 ++++++++++++------ api-model-v1-41/docs/ContainerConfig.md | 2 +- .../docs/ContainerCreateRequest.md | 2 +- api-model-v1-41/docs/EndpointSettings.md | 2 +- api-model-v1-41/docs/ImageInspect.md | 2 +- api-model-v1-41/docs/ServiceCreateRequest.md | 2 +- api-model-v1-41/docs/ServiceCreateResponse.md | 3 +- api-model-v1-41/docs/ServiceSpec.md | 2 +- api-model-v1-41/docs/ServiceUpdateRequest.md | 2 +- api-model-v1-41/docs/TaskStatus.md | 3 +- .../docker/remote/api/ContainerConfig.kt | 4 +- .../remote/api/ContainerCreateRequest.kt | 4 +- ...sContainerStatus.kt => ContainerStatus.kt} | 4 +- .../docker/remote/api/EndpointSettings.kt | 8 +- .../docker/remote/api/ImageInspect.kt | 4 +- .../gesellix/docker/remote/api/PortStatus.kt | 30 ++++ .../docker/remote/api/ServiceCreateRequest.kt | 4 +- .../remote/api/ServiceCreateResponse.kt | 10 +- .../gesellix/docker/remote/api/ServiceSpec.kt | 4 +- .../docker/remote/api/ServiceUpdateRequest.kt | 4 +- .../gesellix/docker/remote/api/TaskStatus.kt | 7 +- 23 files changed, 190 insertions(+), 92 deletions(-) rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{TaskStatusContainerStatus.kt => ContainerStatus.kt} (90%) create mode 100644 api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/PortStatus.kt diff --git a/api-model-v1-41/.openapi-generator/FILES b/api-model-v1-41/.openapi-generator/FILES index 08a6b639..ae313079 100644 --- a/api-model-v1-41/.openapi-generator/FILES +++ b/api-model-v1-41/.openapi-generator/FILES @@ -27,6 +27,7 @@ docs/ContainerCreateResponse.md docs/ContainerInspectResponse.md docs/ContainerPruneResponse.md docs/ContainerState.md +docs/ContainerStatus.md docs/ContainerSummary.md docs/ContainerSummaryHostConfig.md docs/ContainerSummaryNetworkSettings.md @@ -129,6 +130,7 @@ docs/PluginSettings.md docs/PluginsInfo.md docs/Port.md docs/PortBinding.md +docs/PortStatus.md docs/ProcessConfig.md docs/ProgressDetail.md docs/PushImageInfo.md @@ -208,7 +210,6 @@ docs/TaskSpecResources.md docs/TaskSpecRestartPolicy.md docs/TaskState.md docs/TaskStatus.md -docs/TaskStatusContainerStatus.md docs/ThrottleDevice.md docs/UnlockKeyResponse.md docs/Volume.md @@ -248,6 +249,7 @@ src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerInspectResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerPruneResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerState.kt +src/main/kotlin/de/gesellix/docker/remote/api/ContainerStatus.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummary.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummaryHostConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummaryNetworkSettings.kt @@ -344,6 +346,7 @@ src/main/kotlin/de/gesellix/docker/remote/api/PluginSettings.kt src/main/kotlin/de/gesellix/docker/remote/api/PluginsInfo.kt src/main/kotlin/de/gesellix/docker/remote/api/Port.kt src/main/kotlin/de/gesellix/docker/remote/api/PortBinding.kt +src/main/kotlin/de/gesellix/docker/remote/api/PortStatus.kt src/main/kotlin/de/gesellix/docker/remote/api/ProcessConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/ProgressDetail.kt src/main/kotlin/de/gesellix/docker/remote/api/PushImageInfo.kt @@ -417,7 +420,6 @@ src/main/kotlin/de/gesellix/docker/remote/api/TaskSpecResources.kt src/main/kotlin/de/gesellix/docker/remote/api/TaskSpecRestartPolicy.kt src/main/kotlin/de/gesellix/docker/remote/api/TaskState.kt src/main/kotlin/de/gesellix/docker/remote/api/TaskStatus.kt -src/main/kotlin/de/gesellix/docker/remote/api/TaskStatusContainerStatus.kt src/main/kotlin/de/gesellix/docker/remote/api/ThrottleDevice.kt src/main/kotlin/de/gesellix/docker/remote/api/UnlockKeyResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt diff --git a/api-model-v1-41/README.md b/api-model-v1-41/README.md index 22d69722..60b1fad3 100644 --- a/api-model-v1-41/README.md +++ b/api-model-v1-41/README.md @@ -252,6 +252,7 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.ContainerInspectResponse](docs/ContainerInspectResponse.md) - [de.gesellix.docker.remote.api.ContainerPruneResponse](docs/ContainerPruneResponse.md) - [de.gesellix.docker.remote.api.ContainerState](docs/ContainerState.md) + - [de.gesellix.docker.remote.api.ContainerStatus](docs/ContainerStatus.md) - [de.gesellix.docker.remote.api.ContainerSummary](docs/ContainerSummary.md) - [de.gesellix.docker.remote.api.ContainerSummaryHostConfig](docs/ContainerSummaryHostConfig.md) - [de.gesellix.docker.remote.api.ContainerSummaryNetworkSettings](docs/ContainerSummaryNetworkSettings.md) @@ -348,6 +349,7 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.PluginsInfo](docs/PluginsInfo.md) - [de.gesellix.docker.remote.api.Port](docs/Port.md) - [de.gesellix.docker.remote.api.PortBinding](docs/PortBinding.md) + - [de.gesellix.docker.remote.api.PortStatus](docs/PortStatus.md) - [de.gesellix.docker.remote.api.ProcessConfig](docs/ProcessConfig.md) - [de.gesellix.docker.remote.api.ProgressDetail](docs/ProgressDetail.md) - [de.gesellix.docker.remote.api.PushImageInfo](docs/PushImageInfo.md) @@ -421,7 +423,6 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.TaskSpecRestartPolicy](docs/TaskSpecRestartPolicy.md) - [de.gesellix.docker.remote.api.TaskState](docs/TaskState.md) - [de.gesellix.docker.remote.api.TaskStatus](docs/TaskStatus.md) - - [de.gesellix.docker.remote.api.TaskStatusContainerStatus](docs/TaskStatusContainerStatus.md) - [de.gesellix.docker.remote.api.ThrottleDevice](docs/ThrottleDevice.md) - [de.gesellix.docker.remote.api.UnlockKeyResponse](docs/UnlockKeyResponse.md) - [de.gesellix.docker.remote.api.Volume](docs/Volume.md) diff --git a/api-model-v1-41/docker-engine-api-v1.41.yaml b/api-model-v1-41/docker-engine-api-v1.41.yaml index 91869eaa..e0f8ef83 100644 --- a/api-model-v1-41/docker-engine-api-v1.41.yaml +++ b/api-model-v1-41/docker-engine-api-v1.41.yaml @@ -1300,7 +1300,10 @@ definitions: type: "boolean" # x-nullable: true MacAddress: - description: "MAC address of the container." + description: | + MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. type: "string" # x-nullable: true OnBuild: @@ -1369,6 +1372,7 @@ definitions: LinkLocalIPs: - "169.254.34.68" - "fe80::3468" + MacAddress: "02:42:ac:12:05:02" Links: - "container_1" - "container_2" @@ -1730,10 +1734,16 @@ definitions: The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. + + **Deprecated**: this field is kept for backward compatibility, but + will be removed in API v1.45. type: "string" x-nullable: false example: "65974bc86f1770ae4bff79f651ebdbce166ae9aada632ee3fa9af3a264911735" ContainerConfig: + description: | + **Deprecated**: this field is kept for backward compatibility, but + will be removed in API v1.45. $ref: "#/definitions/ContainerConfig" DockerVersion: description: | @@ -2448,6 +2458,11 @@ definitions: example: - "container_1" - "container_2" + MacAddress: + description: | + MAC address for the endpoint on this network. The network driver might ignore this parameter. + type: "string" + example: "02:42:ac:11:00:04" Aliases: type: "array" items: @@ -2498,11 +2513,6 @@ definitions: type: "integer" format: "int64" example: 64 - MacAddress: - description: | - MAC address for the endpoint on this network. - type: "string" - example: "02:42:ac:11:00:04" DriverOpts: description: | DriverOpts is a mapping of driver options and values. These options @@ -3942,6 +3952,44 @@ definitions: - "remove" - "orphaned" + ContainerStatus: + type: "object" + description: "represents the status of a container." + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + + PortStatus: + type: "object" + description: "represents the port status of a task's host ports whose service has published host ports" + properties: + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + TaskStatus: + type: "object" + description: "represents the status of a task." + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + $ref: "#/definitions/ContainerStatus" + PortStatus: + $ref: "#/definitions/PortStatus" + Task: type: "object" properties: @@ -3977,26 +4025,7 @@ definitions: AssignedGenericResources: $ref: "#/definitions/GenericResources" Status: - type: "object" - properties: - Timestamp: - type: "string" - format: "dateTime" - State: - $ref: "#/definitions/TaskState" - Message: - type: "string" - Err: - type: "string" - ContainerStatus: - type: "object" - properties: - ContainerID: - type: "string" - PID: - type: "integer" - ExitCode: - type: "integer" + $ref: "#/definitions/TaskStatus" DesiredState: $ref: "#/definitions/TaskState" JobIteration: @@ -4212,7 +4241,10 @@ definitions: - "stop-first" - "start-first" Networks: - description: "Specifies which networks the service should attach to." + description: | + Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. type: "array" items: $ref: "#/definitions/NetworkAttachmentConfig" @@ -4454,6 +4486,37 @@ definitions: description: "The image ID of an image that was deleted" type: "string" + ServiceCreateResponse: + type: "object" + description: | + contains the information returned to a client on the + creation of a new service. + properties: + ID: + description: "The ID of the created service." + type: "string" + x-nullable: false + example: "ak7w3gjqoa3kuz8xcpnyy0pvl" + Warning: + description: | + Optional warning message. + + deprecated: this is only kept for backwards compatibility and will be removed. + type: "string" + x-nullable: true + example: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + Warnings: + description: | + Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + type: "array" + x-nullable: true + items: + type: "string" + example: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + ServiceUpdateResponse: type: "object" properties: @@ -4463,7 +4526,8 @@ definitions: items: type: "string" example: - Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + Warnings: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" ContainerSummary: type: "object" @@ -5734,22 +5798,22 @@ definitions: type: "integer" format: "int64" example: 3987495 - # TODO Not yet including these fields for now, as they are nil / omitted in our response. - # urls: - # description: | - # List of URLs from which this object MAY be downloaded. - # type: "array" - # items: - # type: "string" - # format: "uri" - # annotations: - # description: | - # Arbitrary metadata relating to the targeted content. - # type: "object" - # additionalProperties: - # type: "string" - # platform: - # $ref: "#/definitions/OCIPlatform" + # TODO Not yet including these fields for now, as they are nil / omitted in our response. + # urls: + # description: | + # List of URLs from which this object MAY be downloaded. + # type: "array" + # items: + # type: "string" + # format: "uri" + # annotations: + # description: | + # Arbitrary metadata relating to the targeted content. + # type: "object" + # additionalProperties: + # type: "string" + # platform: + # $ref: "#/definitions/OCIPlatform" OCIPlatform: type: "object" @@ -8001,6 +8065,7 @@ paths: - `label=key` or `label="key=value"` of an image label - `reference`=(`[:]`) - `since`=(`[:]`, `` or ``) + - `until=` type: "string" - name: "shared-size" in: "query" @@ -10017,6 +10082,7 @@ paths: /networks/{id}/connect: post: summary: "Connect a container to a network" + description: "The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container" operationId: "NetworkConnect" consumes: - "application/json" @@ -10028,7 +10094,7 @@ paths: schema: $ref: "#/definitions/ErrorResponse" 403: - description: "Operation not supported for swarm scoped networks" + description: "Operation forbidden or not supported for swarm scoped networks" schema: $ref: "#/definitions/ErrorResponse" 404: @@ -10063,6 +10129,7 @@ paths: IPAMConfig: IPv4Address: "172.24.56.89" IPv6Address: "2001:db8::5689" + MacAddress: "02:42:ac:12:05:02" tags: ["Network"] /networks/{id}/disconnect: @@ -11056,18 +11123,7 @@ paths: 201: description: "no error" schema: - type: "object" - title: "ServiceCreateResponse" - properties: - ID: - description: "The ID of the created service." - type: "string" - Warning: - description: "Optional warning message" - type: "string" - example: - ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" - Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + $ref: "#/definitions/ServiceCreateResponse" 400: description: "bad parameter" schema: diff --git a/api-model-v1-41/docs/ContainerConfig.md b/api-model-v1-41/docs/ContainerConfig.md index 6b7817b5..91eba8cf 100644 --- a/api-model-v1-41/docs/ContainerConfig.md +++ b/api-model-v1-41/docs/ContainerConfig.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **workingDir** | **kotlin.String** | The working directory for commands to run in. | [optional] **entrypoint** | **kotlin.collections.MutableList<kotlin.String>** | The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). | [optional] **networkDisabled** | **kotlin.Boolean** | Disable networking for the container. | [optional] -**macAddress** | **kotlin.String** | MAC address of the container. | [optional] +**macAddress** | **kotlin.String** | MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. | [optional] **onBuild** | **kotlin.collections.MutableList<kotlin.String>** | `ONBUILD` metadata that were defined in the image's `Dockerfile`. | [optional] **labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | [optional] **stopSignal** | **kotlin.String** | Signal to stop a container as a string or unsigned integer. | [optional] diff --git a/api-model-v1-41/docs/ContainerCreateRequest.md b/api-model-v1-41/docs/ContainerCreateRequest.md index 9bf7ec9b..1231ac50 100644 --- a/api-model-v1-41/docs/ContainerCreateRequest.md +++ b/api-model-v1-41/docs/ContainerCreateRequest.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **workingDir** | **kotlin.String** | The working directory for commands to run in. | [optional] **entrypoint** | **kotlin.collections.MutableList<kotlin.String>** | The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). | [optional] **networkDisabled** | **kotlin.Boolean** | Disable networking for the container. | [optional] -**macAddress** | **kotlin.String** | MAC address of the container. | [optional] +**macAddress** | **kotlin.String** | MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. | [optional] **onBuild** | **kotlin.collections.MutableList<kotlin.String>** | `ONBUILD` metadata that were defined in the image's `Dockerfile`. | [optional] **labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | [optional] **stopSignal** | **kotlin.String** | Signal to stop a container as a string or unsigned integer. | [optional] diff --git a/api-model-v1-41/docs/EndpointSettings.md b/api-model-v1-41/docs/EndpointSettings.md index 2dd094f5..d3f595e9 100644 --- a/api-model-v1-41/docs/EndpointSettings.md +++ b/api-model-v1-41/docs/EndpointSettings.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ipAMConfig** | [**EndpointIPAMConfig**](EndpointIPAMConfig.md) | | [optional] **links** | **kotlin.collections.MutableList<kotlin.String>** | | [optional] +**macAddress** | **kotlin.String** | MAC address for the endpoint on this network. The network driver might ignore this parameter. | [optional] **aliases** | **kotlin.collections.MutableList<kotlin.String>** | | [optional] **networkID** | **kotlin.String** | Unique ID of the network. | [optional] **endpointID** | **kotlin.String** | Unique ID for the service endpoint in a Sandbox. | [optional] @@ -15,7 +16,6 @@ Name | Type | Description | Notes **ipv6Gateway** | **kotlin.String** | IPv6 gateway address. | [optional] **globalIPv6Address** | **kotlin.String** | Global IPv6 address. | [optional] **globalIPv6PrefixLen** | **kotlin.Long** | Mask length of the global IPv6 address. | [optional] -**macAddress** | **kotlin.String** | MAC address for the endpoint on this network. | [optional] **driverOpts** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. | [optional] diff --git a/api-model-v1-41/docs/ImageInspect.md b/api-model-v1-41/docs/ImageInspect.md index 110ea2ef..bcaf6838 100644 --- a/api-model-v1-41/docs/ImageInspect.md +++ b/api-model-v1-41/docs/ImageInspect.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **parent** | **kotlin.String** | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. | [optional] **comment** | **kotlin.String** | Optional message that was set when committing or importing the image. | [optional] **created** | **kotlin.String** | Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. | [optional] -**container** | **kotlin.String** | The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. | [optional] +**container** | **kotlin.String** | The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. **Deprecated**: this field is kept for backward compatibility, but will be removed in API v1.45. | [optional] **containerConfig** | [**ContainerConfig**](ContainerConfig.md) | | [optional] **dockerVersion** | **kotlin.String** | The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. | [optional] **author** | **kotlin.String** | Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. | [optional] diff --git a/api-model-v1-41/docs/ServiceCreateRequest.md b/api-model-v1-41/docs/ServiceCreateRequest.md index a2f93741..77f993f8 100644 --- a/api-model-v1-41/docs/ServiceCreateRequest.md +++ b/api-model-v1-41/docs/ServiceCreateRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **mode** | [**ServiceSpecMode**](ServiceSpecMode.md) | | [optional] **updateConfig** | [**ServiceSpecUpdateConfig**](ServiceSpecUpdateConfig.md) | | [optional] **rollbackConfig** | [**ServiceSpecRollbackConfig**](ServiceSpecRollbackConfig.md) | | [optional] -**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. | [optional] +**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. | [optional] **endpointSpec** | [**EndpointSpec**](EndpointSpec.md) | | [optional] diff --git a/api-model-v1-41/docs/ServiceCreateResponse.md b/api-model-v1-41/docs/ServiceCreateResponse.md index ffd30eee..1b18c827 100644 --- a/api-model-v1-41/docs/ServiceCreateResponse.md +++ b/api-model-v1-41/docs/ServiceCreateResponse.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ID** | **kotlin.String** | The ID of the created service. | [optional] -**warning** | **kotlin.String** | Optional warning message | [optional] +**warning** | **kotlin.String** | Optional warning message. deprecated: this is only kept for backwards compatibility and will be removed. | [optional] +**warnings** | **kotlin.collections.MutableList<kotlin.String>** | Optional warning message. FIXME(thaJeztah): this should have \"omitempty\" in the generated type. | [optional] diff --git a/api-model-v1-41/docs/ServiceSpec.md b/api-model-v1-41/docs/ServiceSpec.md index 9b593122..3fdae731 100644 --- a/api-model-v1-41/docs/ServiceSpec.md +++ b/api-model-v1-41/docs/ServiceSpec.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **mode** | [**ServiceSpecMode**](ServiceSpecMode.md) | | [optional] **updateConfig** | [**ServiceSpecUpdateConfig**](ServiceSpecUpdateConfig.md) | | [optional] **rollbackConfig** | [**ServiceSpecRollbackConfig**](ServiceSpecRollbackConfig.md) | | [optional] -**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. | [optional] +**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. | [optional] **endpointSpec** | [**EndpointSpec**](EndpointSpec.md) | | [optional] diff --git a/api-model-v1-41/docs/ServiceUpdateRequest.md b/api-model-v1-41/docs/ServiceUpdateRequest.md index 16c99840..c6e90d14 100644 --- a/api-model-v1-41/docs/ServiceUpdateRequest.md +++ b/api-model-v1-41/docs/ServiceUpdateRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **mode** | [**ServiceSpecMode**](ServiceSpecMode.md) | | [optional] **updateConfig** | [**ServiceSpecUpdateConfig**](ServiceSpecUpdateConfig.md) | | [optional] **rollbackConfig** | [**ServiceSpecRollbackConfig**](ServiceSpecRollbackConfig.md) | | [optional] -**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. | [optional] +**networks** | [**kotlin.collections.MutableList<NetworkAttachmentConfig>**](NetworkAttachmentConfig.md) | Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. | [optional] **endpointSpec** | [**EndpointSpec**](EndpointSpec.md) | | [optional] diff --git a/api-model-v1-41/docs/TaskStatus.md b/api-model-v1-41/docs/TaskStatus.md index 7d4bdbcb..9129650b 100644 --- a/api-model-v1-41/docs/TaskStatus.md +++ b/api-model-v1-41/docs/TaskStatus.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes **state** | [**TaskState**](TaskState.md) | | [optional] **message** | **kotlin.String** | | [optional] **err** | **kotlin.String** | | [optional] -**containerStatus** | [**TaskStatusContainerStatus**](TaskStatusContainerStatus.md) | | [optional] +**containerStatus** | [**ContainerStatus**](ContainerStatus.md) | | [optional] +**portStatus** | [**PortStatus**](PortStatus.md) | | [optional] diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt index 6c29c719..a1ac7b41 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt @@ -40,7 +40,7 @@ import com.squareup.moshi.JsonClass * @param workingDir The working directory for commands to run in. * @param entrypoint The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * @param networkDisabled Disable networking for the container. - * @param macAddress MAC address of the container. + * @param macAddress MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. * @param onBuild `ONBUILD` metadata that were defined in the image's `Dockerfile`. * @param labels User-defined key/value metadata. * @param stopSignal Signal to stop a container as a string or unsigned integer. @@ -105,7 +105,7 @@ data class ContainerConfig( // Disable networking for the container. @Json(name = "NetworkDisabled") var networkDisabled: kotlin.Boolean? = null, - // MAC address of the container. + // MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. @Json(name = "MacAddress") var macAddress: kotlin.String? = null, // `ONBUILD` metadata that were defined in the image's `Dockerfile`. diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateRequest.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateRequest.kt index fc425f6d..425d73ce 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateRequest.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateRequest.kt @@ -40,7 +40,7 @@ import com.squareup.moshi.JsonClass * @param workingDir The working directory for commands to run in. * @param entrypoint The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * @param networkDisabled Disable networking for the container. - * @param macAddress MAC address of the container. + * @param macAddress MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. * @param onBuild `ONBUILD` metadata that were defined in the image's `Dockerfile`. * @param labels User-defined key/value metadata. * @param stopSignal Signal to stop a container as a string or unsigned integer. @@ -107,7 +107,7 @@ data class ContainerCreateRequest( // Disable networking for the container. @Json(name = "NetworkDisabled") var networkDisabled: kotlin.Boolean? = null, - // MAC address of the container. + // MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. @Json(name = "MacAddress") var macAddress: kotlin.String? = null, // `ONBUILD` metadata that were defined in the image's `Dockerfile`. diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatusContainerStatus.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerStatus.kt similarity index 90% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatusContainerStatus.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerStatus.kt index 3d6306f6..da1bef16 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatusContainerStatus.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerStatus.kt @@ -19,14 +19,14 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * + * represents the status of a container. * * @param containerID * @param PID * @param exitCode */ @JsonClass(generateAdapter = true) -data class TaskStatusContainerStatus( +data class ContainerStatus( @Json(name = "ContainerID") var containerID: kotlin.String? = null, @Json(name = "PID") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/EndpointSettings.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/EndpointSettings.kt index d25348fa..061c9151 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/EndpointSettings.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/EndpointSettings.kt @@ -23,6 +23,7 @@ import com.squareup.moshi.JsonClass * * @param ipAMConfig * @param links + * @param macAddress MAC address for the endpoint on this network. The network driver might ignore this parameter. * @param aliases * @param networkID Unique ID of the network. * @param endpointID Unique ID for the service endpoint in a Sandbox. @@ -32,7 +33,6 @@ import com.squareup.moshi.JsonClass * @param ipv6Gateway IPv6 gateway address. * @param globalIPv6Address Global IPv6 address. * @param globalIPv6PrefixLen Mask length of the global IPv6 address. - * @param macAddress MAC address for the endpoint on this network. * @param driverOpts DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. */ @JsonClass(generateAdapter = true) @@ -41,6 +41,9 @@ data class EndpointSettings( var ipAMConfig: EndpointIPAMConfig? = null, @Json(name = "Links") var links: kotlin.collections.MutableList? = null, + // MAC address for the endpoint on this network. The network driver might ignore this parameter. + @Json(name = "MacAddress") + var macAddress: kotlin.String? = null, @Json(name = "Aliases") var aliases: kotlin.collections.MutableList? = null, // Unique ID of the network. @@ -67,9 +70,6 @@ data class EndpointSettings( // Mask length of the global IPv6 address. @Json(name = "GlobalIPv6PrefixLen") var globalIPv6PrefixLen: kotlin.Long? = null, - // MAC address for the endpoint on this network. - @Json(name = "MacAddress") - var macAddress: kotlin.String? = null, // DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. @Json(name = "DriverOpts") var driverOpts: kotlin.collections.MutableMap? = null, diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt index b0ce2c11..21b8353d 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt @@ -27,7 +27,7 @@ import com.squareup.moshi.JsonClass * @param parent ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. * @param comment Optional message that was set when committing or importing the image. * @param created Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * @param container The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. + * @param container The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. **Deprecated**: this field is kept for backward compatibility, but will be removed in API v1.45. * @param containerConfig * @param dockerVersion The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. * @param author Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. @@ -62,7 +62,7 @@ data class ImageInspect( // Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. @Json(name = "Created") var created: kotlin.String? = null, - // The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. + // The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. **Deprecated**: this field is kept for backward compatibility, but will be removed in API v1.45. @Json(name = "Container") var container: kotlin.String? = null, @Json(name = "ContainerConfig") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/PortStatus.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/PortStatus.kt new file mode 100644 index 00000000..10c1cb5d --- /dev/null +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/PortStatus.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package de.gesellix.docker.remote.api + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * represents the port status of a task's host ports whose service has published host ports + * + * @param ports + */ +@JsonClass(generateAdapter = true) +data class PortStatus( + @Json(name = "Ports") + var ports: kotlin.collections.MutableList? = null, +) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateRequest.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateRequest.kt index 370fa5ca..ce0b2158 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateRequest.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateRequest.kt @@ -27,7 +27,7 @@ import com.squareup.moshi.JsonClass * @param mode * @param updateConfig * @param rollbackConfig - * @param networks Specifies which networks the service should attach to. + * @param networks Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * @param endpointSpec */ @JsonClass(generateAdapter = true) @@ -46,7 +46,7 @@ data class ServiceCreateRequest( var updateConfig: ServiceSpecUpdateConfig? = null, @Json(name = "RollbackConfig") var rollbackConfig: ServiceSpecRollbackConfig? = null, - // Specifies which networks the service should attach to. + // Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. @Json(name = "Networks") var networks: kotlin.collections.MutableList? = null, @Json(name = "EndpointSpec") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateResponse.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateResponse.kt index 768969e4..d6fdf703 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateResponse.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceCreateResponse.kt @@ -19,17 +19,21 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * + * contains the information returned to a client on the creation of a new service. * * @param ID The ID of the created service. - * @param warning Optional warning message + * @param warning Optional warning message. deprecated: this is only kept for backwards compatibility and will be removed. + * @param warnings Optional warning message. FIXME(thaJeztah): this should have \"omitempty\" in the generated type. */ @JsonClass(generateAdapter = true) data class ServiceCreateResponse( // The ID of the created service. @Json(name = "ID") var ID: kotlin.String? = null, - // Optional warning message + // Optional warning message. deprecated: this is only kept for backwards compatibility and will be removed. @Json(name = "Warning") var warning: kotlin.String? = null, + // Optional warning message. FIXME(thaJeztah): this should have \"omitempty\" in the generated type. + @Json(name = "Warnings") + var warnings: kotlin.collections.MutableList? = null, ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceSpec.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceSpec.kt index 59ed25b2..7d4a5e3a 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceSpec.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceSpec.kt @@ -27,7 +27,7 @@ import com.squareup.moshi.JsonClass * @param mode * @param updateConfig * @param rollbackConfig - * @param networks Specifies which networks the service should attach to. + * @param networks Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * @param endpointSpec */ @JsonClass(generateAdapter = true) @@ -46,7 +46,7 @@ data class ServiceSpec( var updateConfig: ServiceSpecUpdateConfig? = null, @Json(name = "RollbackConfig") var rollbackConfig: ServiceSpecRollbackConfig? = null, - // Specifies which networks the service should attach to. + // Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. @Json(name = "Networks") var networks: kotlin.collections.MutableList? = null, @Json(name = "EndpointSpec") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceUpdateRequest.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceUpdateRequest.kt index a92d1778..e03dc048 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceUpdateRequest.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ServiceUpdateRequest.kt @@ -27,7 +27,7 @@ import com.squareup.moshi.JsonClass * @param mode * @param updateConfig * @param rollbackConfig - * @param networks Specifies which networks the service should attach to. + * @param networks Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * @param endpointSpec */ @JsonClass(generateAdapter = true) @@ -46,7 +46,7 @@ data class ServiceUpdateRequest( var updateConfig: ServiceSpecUpdateConfig? = null, @Json(name = "RollbackConfig") var rollbackConfig: ServiceSpecRollbackConfig? = null, - // Specifies which networks the service should attach to. + // Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. @Json(name = "Networks") var networks: kotlin.collections.MutableList? = null, @Json(name = "EndpointSpec") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatus.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatus.kt index db7a025b..58b067ab 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatus.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/TaskStatus.kt @@ -19,13 +19,14 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * + * represents the status of a task. * * @param timestamp * @param state * @param message * @param err * @param containerStatus + * @param portStatus */ @JsonClass(generateAdapter = true) data class TaskStatus( @@ -38,5 +39,7 @@ data class TaskStatus( @Json(name = "Err") var err: kotlin.String? = null, @Json(name = "ContainerStatus") - var containerStatus: TaskStatusContainerStatus? = null, + var containerStatus: ContainerStatus? = null, + @Json(name = "PortStatus") + var portStatus: PortStatus? = null, )