diff --git a/DOCKER_API_VERSION_MATRIX.md b/DOCKER_API_VERSION_MATRIX.md index 6e472d5e..3612fd97 100644 --- a/DOCKER_API_VERSION_MATRIX.md +++ b/DOCKER_API_VERSION_MATRIX.md @@ -2,13 +2,13 @@ This project is currently generated against: -- Docker release tag: `docker-v29.1.5` +- Docker release tag: `docker-v29.4.1` ## API version matrix | Docker version | Maximum API version | | --- | --- | -| 29.1 | 1.52 | +| 29.4 | 1.54 | ## References diff --git a/Directory.Build.props b/Directory.Build.props index e815fc1a..dfa08155 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ latest - v29.1.5 + v29.4.1 diff --git a/src/Docker.DotNet/Endpoints/ISystemOperations.cs b/src/Docker.DotNet/Endpoints/ISystemOperations.cs index 8ee5811e..73d7ba80 100644 --- a/src/Docker.DotNet/Endpoints/ISystemOperations.cs +++ b/src/Docker.DotNet/Endpoints/ISystemOperations.cs @@ -74,4 +74,9 @@ public interface ISystemOperations /// 500 - Server error. /// Task MonitorEventsAsync(ContainerEventsParameters parameters, IProgress progress, CancellationToken cancellationToken = default); + + /// + /// Get data usage information + /// + Task GetDataUsageInfoAsync(SytemDataUsageInfoParameters? parameters = null, CancellationToken cancellationToken = default); } \ No newline at end of file diff --git a/src/Docker.DotNet/Endpoints/SystemOperations.cs b/src/Docker.DotNet/Endpoints/SystemOperations.cs index e8492d44..e62def53 100644 --- a/src/Docker.DotNet/Endpoints/SystemOperations.cs +++ b/src/Docker.DotNet/Endpoints/SystemOperations.cs @@ -72,4 +72,12 @@ public Task MonitorEventsAsync(ContainerEventsParameters parameters, IProgress GetDataUsageInfoAsync(SytemDataUsageInfoParameters? parameters = null, CancellationToken cancellationToken = default) + { + var queryParameters = parameters == null ? null : new QueryString(parameters); + + return await _client.MakeRequestAsync(_client.NoErrorHandlers, HttpMethod.Get, "system/df", queryParameters, cancellationToken) + .ConfigureAwait(false); + } } \ No newline at end of file diff --git a/src/Docker.DotNet/Models/BuildDiskUsage.Generated.cs b/src/Docker.DotNet/Models/BuildDiskUsage.Generated.cs new file mode 100644 index 00000000..fe20e1c4 --- /dev/null +++ b/src/Docker.DotNet/Models/BuildDiskUsage.Generated.cs @@ -0,0 +1,49 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// DiskUsage represents system data usage for build cache resources. + /// + /// swagger:model DiskUsage + /// + public class BuildDiskUsage // (build.DiskUsage) + { + /// + /// Count of active build cache records. + /// + /// Example: 1 + /// + [JsonPropertyName("ActiveCount")] + public long? ActiveCount { get; set; } + + /// + /// List of build cache records. + /// + [JsonPropertyName("Items")] + public IList? Items { get; set; } + + /// + /// Disk space that can be reclaimed by removing inactive build cache records. + /// + /// Example: 12345678 + /// + [JsonPropertyName("Reclaimable")] + public long? Reclaimable { get; set; } + + /// + /// Count of all build cache records. + /// + /// Example: 4 + /// + [JsonPropertyName("TotalCount")] + public long? TotalCount { get; set; } + + /// + /// Disk space in use by build cache records. + /// + /// Example: 98765432 + /// + [JsonPropertyName("TotalSize")] + public long? TotalSize { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/BuildIdentity.Generated.cs b/src/Docker.DotNet/Models/BuildIdentity.Generated.cs new file mode 100644 index 00000000..6775a2ed --- /dev/null +++ b/src/Docker.DotNet/Models/BuildIdentity.Generated.cs @@ -0,0 +1,22 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// BuildIdentity contains build reference information if image was created via build. + /// + public class BuildIdentity // (image.BuildIdentity) + { + /// + /// Ref is the identifier for the build request. This reference can be used to + /// look up the build details in BuildKit history API. + /// + [JsonPropertyName("Ref")] + public string? Ref { get; set; } + + /// + /// CreatedAt is the time when the build ran. + /// + [JsonPropertyName("CreatedAt")] + public DateTime? CreatedAt { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/CacheRecord.Generated.cs b/src/Docker.DotNet/Models/CacheRecord.Generated.cs new file mode 100644 index 00000000..76bcffaa --- /dev/null +++ b/src/Docker.DotNet/Models/CacheRecord.Generated.cs @@ -0,0 +1,66 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// CacheRecord contains information about a build cache record. + /// + public class CacheRecord // (build.CacheRecord) + { + /// + /// ID is the unique ID of the build cache record. + /// + [JsonPropertyName("ID")] + public string ID { get; set; } = default!; + + /// + /// Parents is the list of parent build cache record IDs. + /// + [JsonPropertyName(" Parents")] + public IList? Parents { get; set; } + + /// + /// Type is the cache record type. + /// + [JsonPropertyName("Type")] + public string Type { get; set; } = default!; + + /// + /// Description is a description of the build-step that produced the build cache. + /// + [JsonPropertyName("Description")] + public string Description { get; set; } = default!; + + /// + /// InUse indicates if the build cache is in use. + /// + [JsonPropertyName("InUse")] + public bool InUse { get; set; } = default!; + + /// + /// Shared indicates if the build cache is shared. + /// + [JsonPropertyName("Shared")] + public bool Shared { get; set; } = default!; + + /// + /// Size is the amount of disk space used by the build cache (in bytes). + /// + [JsonPropertyName("Size")] + public long Size { get; set; } = default!; + + /// + /// CreatedAt is the date and time at which the build cache was created. + /// + [JsonPropertyName("CreatedAt")] + public DateTime CreatedAt { get; set; } = default!; + + /// + /// LastUsedAt is the date and time at which the build cache was last used. + /// + [JsonPropertyName("LastUsedAt")] + public DateTime? LastUsedAt { get; set; } + + [JsonPropertyName("UsageCount")] + public long UsageCount { get; set; } = default!; + } +} diff --git a/src/Docker.DotNet/Models/ContainerDiskUsage.Generated.cs b/src/Docker.DotNet/Models/ContainerDiskUsage.Generated.cs new file mode 100644 index 00000000..7130a1fe --- /dev/null +++ b/src/Docker.DotNet/Models/ContainerDiskUsage.Generated.cs @@ -0,0 +1,49 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// DiskUsage represents system data usage information for container resources. + /// + /// swagger:model DiskUsage + /// + public class ContainerDiskUsage // (container.DiskUsage) + { + /// + /// Count of active containers. + /// + /// Example: 1 + /// + [JsonPropertyName("ActiveCount")] + public long? ActiveCount { get; set; } + + /// + /// List of container summaries. + /// + [JsonPropertyName("Items")] + public IList? Items { get; set; } + + /// + /// Disk space that can be reclaimed by removing inactive containers. + /// + /// Example: 12345678 + /// + [JsonPropertyName("Reclaimable")] + public long? Reclaimable { get; set; } + + /// + /// Count of all containers. + /// + /// Example: 4 + /// + [JsonPropertyName("TotalCount")] + public long? TotalCount { get; set; } + + /// + /// Disk space in use by containers. + /// + /// Example: 98765432 + /// + [JsonPropertyName("TotalSize")] + public long? TotalSize { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/DiscreteGenericResource.Generated.cs b/src/Docker.DotNet/Models/DiscreteGenericResource.Generated.cs index 6988c297..4ce73673 100644 --- a/src/Docker.DotNet/Models/DiscreteGenericResource.Generated.cs +++ b/src/Docker.DotNet/Models/DiscreteGenericResource.Generated.cs @@ -2,7 +2,7 @@ namespace Docker.DotNet.Models { /// - /// DiscreteGenericResource represents a "user defined" resource which is defined + /// DiscreteGenericResource represents a "user-defined" resource which is defined /// as an integer /// "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) /// Value is used to count the resource (SSD=5, HDD=3, ...) diff --git a/src/Docker.DotNet/Models/DockerModelsJsonSerializerContext.Generated.cs b/src/Docker.DotNet/Models/DockerModelsJsonSerializerContext.Generated.cs index f00147c7..2f904917 100644 --- a/src/Docker.DotNet/Models/DockerModelsJsonSerializerContext.Generated.cs +++ b/src/Docker.DotNet/Models/DockerModelsJsonSerializerContext.Generated.cs @@ -9,9 +9,12 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(BindOptions))] [JsonSerializable(typeof(BlkioStatEntry))] [JsonSerializable(typeof(BlkioStats))] + [JsonSerializable(typeof(BuildDiskUsage))] + [JsonSerializable(typeof(BuildIdentity))] [JsonSerializable(typeof(CAConfig))] [JsonSerializable(typeof(CPUStats))] [JsonSerializable(typeof(CPUUsage))] + [JsonSerializable(typeof(CacheRecord))] [JsonSerializable(typeof(CapacityRange))] [JsonSerializable(typeof(ClusterInfo))] [JsonSerializable(typeof(ClusterOptions))] @@ -26,6 +29,7 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(ConfigReferenceRuntimeTarget))] [JsonSerializable(typeof(ConsoleSize))] [JsonSerializable(typeof(ContainerConfig))] + [JsonSerializable(typeof(ContainerDiskUsage))] [JsonSerializable(typeof(ContainerExecCreateParameters))] [JsonSerializable(typeof(ContainerExecCreateResponse))] [JsonSerializable(typeof(ContainerExecInspectResponse))] @@ -81,10 +85,12 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(IPAMConfig))] [JsonSerializable(typeof(IPAMOptions))] [JsonSerializable(typeof(IPAMStatus))] + [JsonSerializable(typeof(Identity))] [JsonSerializable(typeof(ImageBuildParameters))] [JsonSerializable(typeof(ImageBuildResult))] [JsonSerializable(typeof(ImageConfig))] [JsonSerializable(typeof(ImageDeleteResponse))] + [JsonSerializable(typeof(ImageDiskUsage))] [JsonSerializable(typeof(ImageHistoryResponse))] [JsonSerializable(typeof(ImageInspectResponse))] [JsonSerializable(typeof(ImageOptions))] @@ -113,6 +119,7 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(Metadata))] [JsonSerializable(typeof(Mount))] [JsonSerializable(typeof(MountPoint))] + [JsonSerializable(typeof(NRIInfo))] [JsonSerializable(typeof(NamedGenericResource))] [JsonSerializable(typeof(Network))] [JsonSerializable(typeof(NetworkAddressPool))] @@ -169,6 +176,7 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(PortSummary))] [JsonSerializable(typeof(Privileges))] [JsonSerializable(typeof(PublishStatus))] + [JsonSerializable(typeof(PullIdentity))] [JsonSerializable(typeof(RaftConfig))] [JsonSerializable(typeof(ReplicatedJob))] [JsonSerializable(typeof(ReplicatedService))] @@ -196,6 +204,9 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(ServiceStatus))] [JsonSerializable(typeof(ServiceUpdateParameters))] [JsonSerializable(typeof(ServiceUpdateResponse))] + [JsonSerializable(typeof(SignatureIdentity))] + [JsonSerializable(typeof(SignatureTimestamp))] + [JsonSerializable(typeof(SignerIdentity))] [JsonSerializable(typeof(Spec))] [JsonSerializable(typeof(SpreadOver))] [JsonSerializable(typeof(State))] @@ -227,6 +238,7 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(SwarmUpdateConfig))] [JsonSerializable(typeof(SwarmUpdateConfigParameters))] [JsonSerializable(typeof(SwarmUpdateParameters))] + [JsonSerializable(typeof(SystemDataUsageInfoResponse))] [JsonSerializable(typeof(SystemInfoResponse))] [JsonSerializable(typeof(TLSInfo))] [JsonSerializable(typeof(TaskDefaults))] @@ -246,8 +258,10 @@ namespace Docker.DotNet.Models [JsonSerializable(typeof(UsageData))] [JsonSerializable(typeof(Version))] [JsonSerializable(typeof(VersionResponse))] + [JsonSerializable(typeof(Volume))] [JsonSerializable(typeof(VolumeAccessMode))] [JsonSerializable(typeof(VolumeAttachment))] + [JsonSerializable(typeof(VolumeDiskUsage))] [JsonSerializable(typeof(VolumeInfo))] [JsonSerializable(typeof(VolumeOptions))] [JsonSerializable(typeof(VolumeResponse))] diff --git a/src/Docker.DotNet/Models/EndpointIPAMConfig.Generated.cs b/src/Docker.DotNet/Models/EndpointIPAMConfig.Generated.cs index 8e565e17..34fbb0a6 100644 --- a/src/Docker.DotNet/Models/EndpointIPAMConfig.Generated.cs +++ b/src/Docker.DotNet/Models/EndpointIPAMConfig.Generated.cs @@ -7,10 +7,10 @@ namespace Docker.DotNet.Models public class EndpointIPAMConfig // (network.EndpointIPAMConfig) { [JsonPropertyName("IPv4Address")] - public string? IPv4Address { get; set; } + public string IPv4Address { get; set; } = default!; [JsonPropertyName("IPv6Address")] - public string? IPv6Address { get; set; } + public string IPv6Address { get; set; } = default!; [JsonPropertyName("LinkLocalIPs")] public IList? LinkLocalIPs { get; set; } diff --git a/src/Docker.DotNet/Models/EndpointVirtualIP.Generated.cs b/src/Docker.DotNet/Models/EndpointVirtualIP.Generated.cs index 10c71ccb..9b2590b4 100644 --- a/src/Docker.DotNet/Models/EndpointVirtualIP.Generated.cs +++ b/src/Docker.DotNet/Models/EndpointVirtualIP.Generated.cs @@ -15,6 +15,6 @@ public class EndpointVirtualIP // (swarm.EndpointVirtualIP) /// compatibility, but only the IP address is used. /// [JsonPropertyName("Addr")] - public string? Addr { get; set; } + public string Addr { get; set; } = default!; } } diff --git a/src/Docker.DotNet/Models/GenericResource.Generated.cs b/src/Docker.DotNet/Models/GenericResource.Generated.cs index 819ea77a..e8639398 100644 --- a/src/Docker.DotNet/Models/GenericResource.Generated.cs +++ b/src/Docker.DotNet/Models/GenericResource.Generated.cs @@ -2,7 +2,7 @@ namespace Docker.DotNet.Models { /// - /// GenericResource represents a "user defined" resource which can + /// GenericResource represents a "user-defined" resource which can /// be either an integer (e.g: SSD=3) or a string (e.g: SSD=sda1) /// public class GenericResource // (swarm.GenericResource) diff --git a/src/Docker.DotNet/Models/IPAMConfig.Generated.cs b/src/Docker.DotNet/Models/IPAMConfig.Generated.cs index 7262ff9c..24b58572 100644 --- a/src/Docker.DotNet/Models/IPAMConfig.Generated.cs +++ b/src/Docker.DotNet/Models/IPAMConfig.Generated.cs @@ -7,13 +7,13 @@ namespace Docker.DotNet.Models public class IPAMConfig // (network.IPAMConfig) { [JsonPropertyName("Subnet")] - public string? Subnet { get; set; } + public string Subnet { get; set; } = default!; [JsonPropertyName("IPRange")] - public string? IPRange { get; set; } + public string IPRange { get; set; } = default!; [JsonPropertyName("Gateway")] - public string? Gateway { get; set; } + public string Gateway { get; set; } = default!; [JsonPropertyName("AuxiliaryAddresses")] public IDictionary? AuxAddress { get; set; } diff --git a/src/Docker.DotNet/Models/Identity.Generated.cs b/src/Docker.DotNet/Models/Identity.Generated.cs new file mode 100644 index 00000000..d249e7cf --- /dev/null +++ b/src/Docker.DotNet/Models/Identity.Generated.cs @@ -0,0 +1,31 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// Identity holds information about the identity and origin of the image. + /// This is trusted information verified by the daemon and cannot be modified + /// by tagging an image to a different name. + /// + public class Identity // (image.Identity) + { + /// + /// Signature contains the properties of verified signatures for the image. + /// + [JsonPropertyName("Signature")] + public IList Signature { get; set; } = default!; + + /// + /// Pull contains remote location information if image was created via pull. + /// If image was pulled via mirror, this contains the original repository location. + /// After successful push this images also contains the pushed repository location. + /// + [JsonPropertyName("Pull")] + public IList Pull { get; set; } = default!; + + /// + /// Build contains build reference information if image was created via build. + /// + [JsonPropertyName("Build")] + public IList Build { get; set; } = default!; + } +} diff --git a/src/Docker.DotNet/Models/ImageDiskUsage.Generated.cs b/src/Docker.DotNet/Models/ImageDiskUsage.Generated.cs new file mode 100644 index 00000000..b61d8694 --- /dev/null +++ b/src/Docker.DotNet/Models/ImageDiskUsage.Generated.cs @@ -0,0 +1,49 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// DiskUsage represents system data usage for image resources. + /// + /// swagger:model DiskUsage + /// + public class ImageDiskUsage // (image.DiskUsage) + { + /// + /// Count of active images. + /// + /// Example: 1 + /// + [JsonPropertyName("ActiveCount")] + public long? ActiveCount { get; set; } + + /// + /// List of image summaries. + /// + [JsonPropertyName("Items")] + public IList? Items { get; set; } + + /// + /// Disk space that can be reclaimed by removing unused images. + /// + /// Example: 12345678 + /// + [JsonPropertyName("Reclaimable")] + public long? Reclaimable { get; set; } + + /// + /// Count of all images. + /// + /// Example: 4 + /// + [JsonPropertyName("TotalCount")] + public long? TotalCount { get; set; } + + /// + /// Disk space in use by images. + /// + /// Example: 98765432 + /// + [JsonPropertyName("TotalSize")] + public long? TotalSize { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ImageHistoryResponse.Generated.cs b/src/Docker.DotNet/Models/ImageHistoryResponse.Generated.cs index 4deb6dbd..dff0f3b1 100644 --- a/src/Docker.DotNet/Models/ImageHistoryResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ImageHistoryResponse.Generated.cs @@ -2,7 +2,9 @@ namespace Docker.DotNet.Models { /// - /// HistoryResponseItem individual image layer information in response to ImageHistory operation + /// HistoryResponseItem HistoryResponseItem + /// + /// individual image layer information in response to ImageHistory operation /// /// swagger:model HistoryResponseItem /// diff --git a/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs b/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs index 000fbebc..31d6cea2 100644 --- a/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs @@ -147,5 +147,13 @@ public class ImageInspectResponse // (image.InspectResponse) /// [JsonPropertyName("Manifests")] public IList? Manifests { get; set; } + + /// + /// Identity holds information about the identity and origin of the image. + /// This is trusted information verified by the daemon and cannot be modified + /// by tagging an image to a different name. + /// + [JsonPropertyName("Identity")] + public Identity? Identity { get; set; } } } diff --git a/src/Docker.DotNet/Models/ImageProperties.Generated.cs b/src/Docker.DotNet/Models/ImageProperties.Generated.cs index ebd0d62e..0a1c70ac 100644 --- a/src/Docker.DotNet/Models/ImageProperties.Generated.cs +++ b/src/Docker.DotNet/Models/ImageProperties.Generated.cs @@ -11,6 +11,14 @@ public class ImageProperties // (image.ImageProperties) [JsonPropertyName("Platform")] public Platform Platform { get; set; } = default!; + /// + /// Identity holds information about the identity and origin of the image. + /// For image list responses, this can duplicate Build/Pull fields across + /// image manifests, because those parts of identity are image-level metadata. + /// + [JsonPropertyName("Identity")] + public Identity? Identity { get; set; } + [JsonPropertyName("Size")] public ImagePropertiesSize Size { get; set; } = default!; diff --git a/src/Docker.DotNet/Models/JSONMessage.Generated.cs b/src/Docker.DotNet/Models/JSONMessage.Generated.cs index 429eb148..79846ce8 100644 --- a/src/Docker.DotNet/Models/JSONMessage.Generated.cs +++ b/src/Docker.DotNet/Models/JSONMessage.Generated.cs @@ -2,9 +2,9 @@ namespace Docker.DotNet.Models { /// - /// JSONMessage defines a message struct. It describes + /// Message defines a message struct. It describes /// the created time, where it from, status, ID of the - /// message. It's used for docker events. + /// message. /// public class JSONMessage // (jsonstream.Message) { diff --git a/src/Docker.DotNet/Models/NRIInfo.Generated.cs b/src/Docker.DotNet/Models/NRIInfo.Generated.cs new file mode 100644 index 00000000..3fa70afa --- /dev/null +++ b/src/Docker.DotNet/Models/NRIInfo.Generated.cs @@ -0,0 +1,12 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// NRIInfo describes the NRI configuration. + /// + public class NRIInfo // (system.NRIInfo) + { + [JsonPropertyName("Info")] + public IList? Info { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/NamedGenericResource.Generated.cs b/src/Docker.DotNet/Models/NamedGenericResource.Generated.cs index f164fa49..db6941f9 100644 --- a/src/Docker.DotNet/Models/NamedGenericResource.Generated.cs +++ b/src/Docker.DotNet/Models/NamedGenericResource.Generated.cs @@ -2,7 +2,7 @@ namespace Docker.DotNet.Models { /// - /// NamedGenericResource represents a "user defined" resource which is defined + /// NamedGenericResource represents a "user-defined" resource which is defined /// as a string. /// "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) /// Value is used to identify the resource (GPU="UUID-1", FPGA="/dev/sdb5", ...) diff --git a/src/Docker.DotNet/Models/PullIdentity.Generated.cs b/src/Docker.DotNet/Models/PullIdentity.Generated.cs new file mode 100644 index 00000000..1a5889e1 --- /dev/null +++ b/src/Docker.DotNet/Models/PullIdentity.Generated.cs @@ -0,0 +1,16 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// PullIdentity contains remote location information if image was created via pull. + /// If image was pulled via mirror, this contains the original repository location. + /// + public class PullIdentity // (image.PullIdentity) + { + /// + /// Repository is the remote repository location the image was pulled from. + /// + [JsonPropertyName("Repository")] + public string? Repository { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/SignatureIdentity.Generated.cs b/src/Docker.DotNet/Models/SignatureIdentity.Generated.cs new file mode 100644 index 00000000..2a4d2c42 --- /dev/null +++ b/src/Docker.DotNet/Models/SignatureIdentity.Generated.cs @@ -0,0 +1,61 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// SignatureIdentity contains the properties of verified signatures for the image. + /// + public class SignatureIdentity // (image.SignatureIdentity) + { + /// + /// Name is a textual description summarizing the type of signature. + /// + [JsonPropertyName("Name")] + public string? Name { get; set; } + + /// + /// Timestamps contains a list of verified signed timestamps for the signature. + /// + [JsonPropertyName("Timestamps")] + public IList Timestamps { get; set; } = default!; + + /// + /// KnownSigner is an identifier for a special signer identity that is known to the implementation. + /// + [JsonPropertyName("KnownSigner")] + public string? KnownSigner { get; set; } + + /// + /// DockerReference is the Docker image reference associated with the signature. + /// This is an optional field only present in older hashedrecord signatures. + /// + [JsonPropertyName("DockerReference")] + public string? DockerReference { get; set; } + + /// + /// Signer contains information about the signer certificate used to sign the image. + /// + [JsonPropertyName("Signer")] + public SignerIdentity? Signer { get; set; } + + /// + /// SignatureType is the type of signature format. E.g. "bundle-v0.3" or "hashedrecord". + /// + [JsonPropertyName("SignatureType")] + public string? SignatureType { get; set; } + + /// + /// Error contains error information if signature verification failed. + /// Other fields will be empty in this case. + /// + [JsonPropertyName("Error")] + public string? Error { get; set; } + + /// + /// Warnings contains any warnings that occurred during signature verification. + /// For example, if there was no internet connectivity and cached trust roots were used. + /// Warning does not indicate a failed verification but may point to configuration issues. + /// + [JsonPropertyName("Warnings")] + public IList Warnings { get; set; } = default!; + } +} diff --git a/src/Docker.DotNet/Models/SignatureTimestamp.Generated.cs b/src/Docker.DotNet/Models/SignatureTimestamp.Generated.cs new file mode 100644 index 00000000..862d9a55 --- /dev/null +++ b/src/Docker.DotNet/Models/SignatureTimestamp.Generated.cs @@ -0,0 +1,18 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// SignatureTimestamp contains information about a verified signed timestamp for an image signature. + /// + public class SignatureTimestamp // (image.SignatureTimestamp) + { + [JsonPropertyName("Type")] + public string Type { get; set; } = default!; + + [JsonPropertyName("URI")] + public string URI { get; set; } = default!; + + [JsonPropertyName("Timestamp")] + public DateTime Timestamp { get; set; } = default!; + } +} diff --git a/src/Docker.DotNet/Models/SignerIdentity.Generated.cs b/src/Docker.DotNet/Models/SignerIdentity.Generated.cs new file mode 100644 index 00000000..8e780451 --- /dev/null +++ b/src/Docker.DotNet/Models/SignerIdentity.Generated.cs @@ -0,0 +1,111 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// SignerIdentity contains information about the signer certificate used to sign the image. + /// This is [certificate.Summary] with deprecated fields removed and keys in Moby uppercase style. + /// + /// [certificate.Summary]: https://pkg.go.dev/github.com/sigstore/sigstore-go/pkg/fulcio/certificate#Summary + /// + public class SignerIdentity // (image.SignerIdentity) + { + [JsonPropertyName("CertificateIssuer")] + public string CertificateIssuer { get; set; } = default!; + + [JsonPropertyName("SubjectAlternativeName")] + public string SubjectAlternativeName { get; set; } = default!; + + /// + /// The OIDC issuer. Should match `iss` claim of ID token or, in the case of + /// a federated login like Dex it should match the issuer URL of the + /// upstream issuer. The issuer is not set the extensions are invalid and + /// will fail to render. + /// + [JsonPropertyName("Issuer")] + public string? Issuer { get; set; } + + /// + /// Reference to specific build instructions that are responsible for signing. + /// + [JsonPropertyName("BuildSignerURI")] + public string? BuildSignerURI { get; set; } + + /// + /// Immutable reference to the specific version of the build instructions that is responsible for signing. + /// + [JsonPropertyName("BuildSignerDigest")] + public string? BuildSignerDigest { get; set; } + + /// + /// Specifies whether the build took place in platform-hosted cloud infrastructure or customer/self-hosted infrastructure. + /// + [JsonPropertyName("RunnerEnvironment")] + public string? RunnerEnvironment { get; set; } + + /// + /// Source repository URL that the build was based on. + /// + [JsonPropertyName("SourceRepositoryURI")] + public string? SourceRepositoryURI { get; set; } + + /// + /// Immutable reference to a specific version of the source code that the build was based upon. + /// + [JsonPropertyName("SourceRepositoryDigest")] + public string? SourceRepositoryDigest { get; set; } + + /// + /// Source Repository Ref that the build run was based upon. + /// + [JsonPropertyName("SourceRepositoryRef")] + public string? SourceRepositoryRef { get; set; } + + /// + /// Immutable identifier for the source repository the workflow was based upon. + /// + [JsonPropertyName("SourceRepositoryIdentifier")] + public string? SourceRepositoryIdentifier { get; set; } + + /// + /// Source repository owner URL of the owner of the source repository that the build was based on. + /// + [JsonPropertyName("SourceRepositoryOwnerURI")] + public string? SourceRepositoryOwnerURI { get; set; } + + /// + /// Immutable identifier for the owner of the source repository that the workflow was based upon. + /// + [JsonPropertyName("SourceRepositoryOwnerIdentifier")] + public string? SourceRepositoryOwnerIdentifier { get; set; } + + /// + /// Build Config URL to the top-level/initiating build instructions. + /// + [JsonPropertyName("BuildConfigURI")] + public string? BuildConfigURI { get; set; } + + /// + /// Immutable reference to the specific version of the top-level/initiating build instructions. + /// + [JsonPropertyName("BuildConfigDigest")] + public string? BuildConfigDigest { get; set; } + + /// + /// Event or action that initiated the build. + /// + [JsonPropertyName("BuildTrigger")] + public string? BuildTrigger { get; set; } + + /// + /// Run Invocation URL to uniquely identify the build execution. + /// + [JsonPropertyName("RunInvocationURI")] + public string? RunInvocationURI { get; set; } + + /// + /// Source repository visibility at the time of signing the certificate. + /// + [JsonPropertyName("SourceRepositoryVisibilityAtSigning")] + public string? SourceRepositoryVisibilityAtSigning { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/SwarmIPAMConfig.Generated.cs b/src/Docker.DotNet/Models/SwarmIPAMConfig.Generated.cs index 85bb552e..feaac513 100644 --- a/src/Docker.DotNet/Models/SwarmIPAMConfig.Generated.cs +++ b/src/Docker.DotNet/Models/SwarmIPAMConfig.Generated.cs @@ -7,12 +7,12 @@ namespace Docker.DotNet.Models public class SwarmIPAMConfig // (swarm.IPAMConfig) { [JsonPropertyName("Subnet")] - public string? Subnet { get; set; } + public string Subnet { get; set; } = default!; [JsonPropertyName("Range")] - public string? Range { get; set; } + public string Range { get; set; } = default!; [JsonPropertyName("Gateway")] - public string? Gateway { get; set; } + public string Gateway { get; set; } = default!; } } diff --git a/src/Docker.DotNet/Models/SystemDataUsageInfoResponse.Generated.cs b/src/Docker.DotNet/Models/SystemDataUsageInfoResponse.Generated.cs new file mode 100644 index 00000000..667aae0a --- /dev/null +++ b/src/Docker.DotNet/Models/SystemDataUsageInfoResponse.Generated.cs @@ -0,0 +1,22 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// DiskUsage contains response of Engine API: + /// GET "/system/df" + /// + public class SystemDataUsageInfoResponse // (system.DiskUsage) + { + [JsonPropertyName("ImageUsage")] + public ImageDiskUsage? ImageUsage { get; set; } + + [JsonPropertyName("ContainerUsage")] + public ContainerDiskUsage? ContainerUsage { get; set; } + + [JsonPropertyName("VolumeUsage")] + public VolumeDiskUsage? VolumeUsage { get; set; } + + [JsonPropertyName("BuildCacheUsage")] + public BuildDiskUsage? BuildCacheUsage { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs index f7cb3c3a..7a360508 100644 --- a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs +++ b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs @@ -195,6 +195,9 @@ public class SystemInfoResponse // (system.Info) [JsonPropertyName("DiscoveredDevices")] public IList? DiscoveredDevices { get; set; } + [JsonPropertyName("NRI")] + public NRIInfo? NRI { get; set; } + [JsonPropertyName("Containerd")] public ContainerdInfo? Containerd { get; set; } diff --git a/src/Docker.DotNet/Models/SytemDataUsageInfoParameters.Generated.cs b/src/Docker.DotNet/Models/SytemDataUsageInfoParameters.Generated.cs new file mode 100644 index 00000000..78819482 --- /dev/null +++ b/src/Docker.DotNet/Models/SytemDataUsageInfoParameters.Generated.cs @@ -0,0 +1,12 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + public class SytemDataUsageInfoParameters // (main.SytemDataUsageInfoParameters) + { + [QueryStringListParameter("type", false)] + public IList? Type { get; set; } + + [QueryStringBoolParameter("verbose", false)] + public bool? Verbose { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/Volume.Generated.cs b/src/Docker.DotNet/Models/Volume.Generated.cs new file mode 100644 index 00000000..35d06244 --- /dev/null +++ b/src/Docker.DotNet/Models/Volume.Generated.cs @@ -0,0 +1,95 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// Volume volume + /// + /// swagger:model Volume + /// + public class Volume // (volume.Volume) + { + /// + /// cluster volume + /// + [JsonPropertyName("ClusterVolume")] + public ClusterVolume? ClusterVolume { get; set; } + + /// + /// Date/Time the volume was created. + /// Example: 2016-06-07T20:31:11.853781916Z + /// + [JsonPropertyName("CreatedAt")] + public string? CreatedAt { get; set; } + + /// + /// Name of the volume driver used by the volume. + /// Example: custom + /// Required: true + /// + [JsonPropertyName("Driver")] + public string Driver { get; set; } = default!; + + /// + /// User-defined key/value metadata. + /// Example: {"com.example.some-label":"some-value","com.example.some-other-label":"some-other-value"} + /// Required: true + /// + [JsonPropertyName("Labels")] + public IDictionary Labels { get; set; } = default!; + + /// + /// Mount path of the volume on the host. + /// Example: /var/lib/docker/volumes/tardis + /// Required: true + /// + [JsonPropertyName("Mountpoint")] + public string Mountpoint { get; set; } = default!; + + /// + /// Name of the volume. + /// Example: tardis + /// Required: true + /// + [JsonPropertyName("Name")] + public string Name { get; set; } = default!; + + /// + /// The driver specific options used when creating the volume. + /// + /// Example: {"device":"tmpfs","o":"size=100m,uid=1000","type":"tmpfs"} + /// Required: true + /// + [JsonPropertyName("Options")] + public IDictionary Options { get; set; } = default!; + + /// + /// The level at which the volume exists. Either `global` for cluster-wide, + /// or `local` for machine level. + /// + /// Example: local + /// Required: true + /// Enum: ["local","global"] + /// + [JsonPropertyName("Scope")] + public string Scope { get; set; } = default!; + + /// + /// Low-level details about the volume, provided by the volume driver. + /// Details are returned as a map with key/value pairs: + /// `{"key":"value","key2":"value2"}`. + /// + /// The `Status` field is optional, and is omitted if the volume driver + /// does not support this feature. + /// + /// Example: {"hello":"world"} + /// + [JsonPropertyName("Status")] + public IDictionary? Status { get; set; } + + /// + /// usage data + /// + [JsonPropertyName("UsageData")] + public UsageData? UsageData { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/VolumeDiskUsage.Generated.cs b/src/Docker.DotNet/Models/VolumeDiskUsage.Generated.cs new file mode 100644 index 00000000..0b7fb563 --- /dev/null +++ b/src/Docker.DotNet/Models/VolumeDiskUsage.Generated.cs @@ -0,0 +1,49 @@ +#nullable enable +namespace Docker.DotNet.Models +{ + /// + /// DiskUsage represents system data usage for volume resources. + /// + /// swagger:model DiskUsage + /// + public class VolumeDiskUsage // (volume.DiskUsage) + { + /// + /// Count of active volumes. + /// + /// Example: 1 + /// + [JsonPropertyName("ActiveCount")] + public long? ActiveCount { get; set; } + + /// + /// List of volumes. + /// + [JsonPropertyName("Items")] + public IList? Items { get; set; } + + /// + /// Disk space that can be reclaimed by removing inactive volumes. + /// + /// Example: 12345678 + /// + [JsonPropertyName("Reclaimable")] + public long? Reclaimable { get; set; } + + /// + /// Count of all volumes. + /// + /// Example: 4 + /// + [JsonPropertyName("TotalCount")] + public long? TotalCount { get; set; } + + /// + /// Disk space in use by volumes. + /// + /// Example: 98765432 + /// + [JsonPropertyName("TotalSize")] + public long? TotalSize { get; set; } + } +} diff --git a/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs b/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs index d1064779..6908f1cc 100644 --- a/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs +++ b/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs @@ -249,4 +249,11 @@ public async Task PingAsync_Succeeds() { await _testFixture.DockerClient.System.PingAsync(TestContext.Current.CancellationToken); } + + [Fact] + public async Task GetDataUsageInfoAsync_Succeeds() + { + var result = await _testFixture.DockerClient.System.GetDataUsageInfoAsync(cancellationToken: TestContext.Current.CancellationToken); + Assert.NotNull(result); + } } \ No newline at end of file diff --git a/tools/specgen/README.md b/tools/specgen/README.md index 13ad2281..fc46b6cb 100644 --- a/tools/specgen/README.md +++ b/tools/specgen/README.md @@ -9,11 +9,11 @@ A tool that reflects the Docker client [engine-api](https://github.com/docker/en Use the update scripts from the repository root to fetch Docker API/client definitions for a specific [release tag](https://github.com/moby/moby/releases/) and regenerate [Docker.DotNet Models](../../src/Docker.DotNet/Models): ```powershell -.\tools\specgen\update-generated-code.ps1 -ReleaseTag docker-v29.1.5 +.\tools\specgen\update-generated-code.ps1 -ReleaseTag docker-v29.4.1 ``` ```bash -./tools/specgen/update-generated-code.sh docker-v29.1.5 +./tools/specgen/update-generated-code.sh docker-v29.4.1 ``` The scripts will: diff --git a/tools/specgen/go.mod b/tools/specgen/go.mod index c0af17d0..7647e23d 100644 --- a/tools/specgen/go.mod +++ b/tools/specgen/go.mod @@ -3,9 +3,8 @@ module github.com/dotnet/Docker.DotNet/tools/specgen go 1.24.0 require ( - github.com/moby/moby/api v1.52.1-0.20260116122120-3b01d641ef33 - github.com/moby/moby/client v0.2.2-0.20260116122120-3b01d641ef33 - github.com/opencontainers/image-spec v1.1.1 + github.com/moby/moby/api v1.54.3-0.20260420162417-6c91b92cc710 + github.com/moby/moby/client v0.4.2-0.20260420162417-6c91b92cc710 ) require ( @@ -14,13 +13,14 @@ require ( github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/go-connections v0.6.0 // indirect + github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect go.opentelemetry.io/otel v1.40.0 // indirect diff --git a/tools/specgen/go.sum b/tools/specgen/go.sum index 3953b044..4d6224fa 100644 --- a/tools/specgen/go.sum +++ b/tools/specgen/go.sum @@ -10,8 +10,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= -github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= +github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= +github.com/docker/go-connections v0.7.0/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -27,20 +27,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/moby/api v1.52.1-0.20251119163722-1fa8a3155618 h1:wpNMHn2Tqbs/HEvGyskQcCaf7nptj2rnH2ED8/dDR8k= -github.com/moby/moby/api v1.52.1-0.20251119163722-1fa8a3155618/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/api v1.52.1-0.20251128103149-9a84135d5240 h1:iUXoNduZHK2e9J/o29+7Zgcs07SnSTwURkh0e+ra86M= -github.com/moby/moby/api v1.52.1-0.20251128103149-9a84135d5240/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/api v1.52.1-0.20260116122120-3b01d641ef33 h1:UE+P1YA2HM8dcNLcuclgw6eQNrbeQ4APa0VWDCjZUSo= -github.com/moby/moby/api v1.52.1-0.20260116122120-3b01d641ef33/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/api v1.53.0 h1:PihqG1ncw4W+8mZs69jlwGXdaYBeb5brF6BL7mPIS/w= -github.com/moby/moby/api v1.53.0/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/client v0.1.1-0.20251119163722-1fa8a3155618 h1:eFftLw+l+zczLYpeHuaqtUhex02NH7OP+78F+X80mRI= -github.com/moby/moby/client v0.1.1-0.20251119163722-1fa8a3155618/go.mod h1:O+/tw5d4a1Ha/ZA/tPxIZJapJRUS6LNZ1wiVRxYHyUE= -github.com/moby/moby/client v0.2.2-0.20251128103149-9a84135d5240 h1:9mkIdtmxPRmEfb/8fWf/oBJQBahgj/PXatn4MojZVbU= -github.com/moby/moby/client v0.2.2-0.20251128103149-9a84135d5240/go.mod h1:O+/tw5d4a1Ha/ZA/tPxIZJapJRUS6LNZ1wiVRxYHyUE= -github.com/moby/moby/client v0.2.2-0.20260116122120-3b01d641ef33 h1:taws1i4LNtIDLz1NKPJv0z13+R6Ij2/4TO7H0cww4jY= -github.com/moby/moby/client v0.2.2-0.20260116122120-3b01d641ef33/go.mod h1:O+/tw5d4a1Ha/ZA/tPxIZJapJRUS6LNZ1wiVRxYHyUE= +github.com/moby/moby/api v1.54.3-0.20260420162417-6c91b92cc710 h1:rfx6r+9HRR08bmnrWsNKPvmuBMhLh8FwSGFaeBrZhyo= +github.com/moby/moby/api v1.54.3-0.20260420162417-6c91b92cc710/go.mod h1:+RQ6wluLwtYaTd1WnPLykIDPekkuyD/ROWQClE83pzs= +github.com/moby/moby/client v0.4.2-0.20260420162417-6c91b92cc710 h1:vM435T9iE5OkpydLVtIIcLBqsBV4jWqSBFa5e5Uilkk= +github.com/moby/moby/client v0.4.2-0.20260420162417-6c91b92cc710/go.mod h1:z52C9O2POPOsnxZAy//WtKcQ32P+jT/NGeXu/7nfjGQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -51,30 +41,18 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= -go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= -go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= -go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= -go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/tools/specgen/modeldefs.go b/tools/specgen/modeldefs.go index 17de0219..fedacbb0 100644 --- a/tools/specgen/modeldefs.go +++ b/tools/specgen/modeldefs.go @@ -432,3 +432,9 @@ type SecretCreateResponse struct { type TasksListParameters struct { Filters Args `rest:"query"` } + +// SytemDataUsageInfoParameters for GET /system/df +type SytemDataUsageInfoParameters struct { + Type []string `rest:"query"` + Verbose bool `rest:"query"` +} diff --git a/tools/specgen/specgen.go b/tools/specgen/specgen.go index 921d89db..36cc8cbb 100644 --- a/tools/specgen/specgen.go +++ b/tools/specgen/specgen.go @@ -16,6 +16,7 @@ import ( "strconv" "strings" + "github.com/moby/moby/api/types/build" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/events" "github.com/moby/moby/api/types/image" @@ -226,9 +227,13 @@ var typesToDisambiguate = map[string]*CSModelType{ {Name: "Types", Type: CSType{"System.Collections.Generic", "IList"}}, }, }, - + typeToKey(reflect.TypeOf(build.DiskUsage{})): {Name: "BuildDiskUsage"}, + typeToKey(reflect.TypeOf(container.DiskUsage{})): {Name: "ContainerDiskUsage"}, typeToKey(reflect.TypeOf(container.StatsResponse{})): {Name: "ContainerStatsResponse"}, + typeToKey(reflect.TypeOf(image.DiskUsage{})): {Name: "ImageDiskUsage"}, + typeToKey(reflect.TypeOf(system.DiskUsage{})): {Name: "SystemDataUsageInfoResponse"}, typeToKey(reflect.TypeOf(system.VersionResponse{})): {Name: "VersionResponse"}, + typeToKey(reflect.TypeOf(volume.DiskUsage{})): {Name: "VolumeDiskUsage"}, typeToKey(reflect.TypeOf(volume.PruneReport{})): {Name: "VolumesPruneResponse"}, typeToKey(reflect.TypeOf(VolumeResponse{})): {Name: "VolumeResponse"}, } @@ -382,6 +387,10 @@ var dockerTypesToReflect = []reflect.Type{ reflect.TypeOf(system.Info{}), reflect.TypeOf(registry.ServiceConfig{}), + // GET /system/df + reflect.TypeOf(SytemDataUsageInfoParameters{}), + reflect.TypeOf(system.DiskUsage{}), + // GET /networks reflect.TypeOf(NetworksListParameters{}), reflect.TypeOf(network.Inspect{}), diff --git a/tools/specgen/update-generated-code.ps1 b/tools/specgen/update-generated-code.ps1 index 996d8ba5..c59b4e86 100644 --- a/tools/specgen/update-generated-code.ps1 +++ b/tools/specgen/update-generated-code.ps1 @@ -1,6 +1,6 @@ [CmdletBinding()] param( - [Parameter(Mandatory = $true, Position = 0, HelpMessage = "Release tag to use for moby api/client (example: docker-v29.1.5)")] + [Parameter(Mandatory = $true, Position = 0, HelpMessage = "Release tag to use for moby api/client (example: docker-v29.4.1)")] [ValidateNotNullOrEmpty()] [string]$ReleaseTag ) diff --git a/tools/specgen/update-generated-code.sh b/tools/specgen/update-generated-code.sh index 4f3b621c..031b8b6c 100755 --- a/tools/specgen/update-generated-code.sh +++ b/tools/specgen/update-generated-code.sh @@ -4,7 +4,7 @@ set -euo pipefail usage() { echo "Usage: $0 " - echo "Example: $0 docker-v29.1.5" + echo "Example: $0 docker-v29.4.1" } if [[ $# -ne 1 ]]; then