Skip to content

Commit fbe504f

Browse files
committed
feat: Update specgen configuration to Docker Engine API 27.2.1
1 parent 81faf5d commit fbe504f

File tree

92 files changed

+433
-256
lines changed

Some content is hidden

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

92 files changed

+433
-256
lines changed

src/Docker.DotNet/DockerPipeStream.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public override void CloseWrite()
6767
const int ERROR_IO_PENDING = 997;
6868
if (Marshal.GetLastWin32Error() == ERROR_IO_PENDING)
6969
{
70-
int written;
71-
if (GetOverlappedResult(_stream.SafePipeHandle, ref overlapped, out written, 1) == 0)
70+
if (GetOverlappedResult(_stream.SafePipeHandle, ref overlapped, out var _, 1) == 0)
7271
{
7372
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
7473
}

src/Docker.DotNet/Endpoints/IImageOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public interface IImageOperations
7272
/// <exception cref="ArgumentNullException">One or more of the inputs was <see langword="null"/>.</exception>
7373
/// <exception cref="DockerApiException">The input is invalid or the daemon experienced an error.</exception>
7474
/// <exception cref="HttpRequestException">The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
75-
[ObsoleteAttribute("This method does not wait for build to complete. Use new BuildImageFromDockerfileAsync(contents, parameters, authConfigs, headers, progress, cancellationToken, instead.)", false)]
75+
[Obsolete("This method does not wait for build to complete. Use new BuildImageFromDockerfileAsync(contents, parameters, authConfigs, headers, progress, cancellationToken, instead.)", false)]
7676
Task<Stream> BuildImageFromDockerfileAsync(Stream contents, ImageBuildParameters parameters, CancellationToken cancellationToken = default(CancellationToken));
7777

7878
/// <summary>

src/Docker.DotNet/Endpoints/IVolumeOperations.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Collections.Generic;
21
using System.Threading.Tasks;
32
using Docker.DotNet.Models;
43
using System.Threading;

src/Docker.DotNet/Endpoints/StreamUtil.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Diagnostics;
32
using System.IO;
43
using System.Net.Http;
54
using System.Text;
@@ -48,7 +47,7 @@ internal static async Task MonitorResponseForMessagesAsync<T>(Task<HttpResponseM
4847
{
4948
using (var response = await responseTask)
5049
{
51-
await MonitorStreamForMessagesAsync<T>(response.Content.ReadAsStreamAsync(), client, cancel, progress);
50+
await MonitorStreamForMessagesAsync(response.Content.ReadAsStreamAsync(), client, cancel, progress);
5251
}
5352
}
5453
}

src/Docker.DotNet/Endpoints/VolumeOperations.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Docker.DotNet.Models;
22
using System;
3-
using System.IO;
43
using System.Net.Http;
54
using System.Threading;
65
using System.Threading.Tasks;

src/Docker.DotNet/Microsoft.Net.Http.Client/HttpConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private string SerializeRequest(HttpRequestMessage request)
6868
builder.Append(request.Version.ToString(2));
6969
builder.Append("\r\n");
7070

71-
builder.Append(request.Headers.ToString());
71+
builder.Append(request.Headers);
7272

7373
if (request.Content != null)
7474
{
@@ -79,7 +79,7 @@ private string SerializeRequest(HttpRequestMessage request)
7979
request.Content.Headers.ContentLength = contentLength.Value;
8080
}
8181

82-
builder.Append(request.Content.Headers.ToString());
82+
builder.Append(request.Content.Headers);
8383
if (!contentLength.HasValue)
8484
{
8585
// Add header for chunked mode.

src/Docker.DotNet/Microsoft.Net.Http.Client/ManagedHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ private async Task TunnelThroughProxyAsync(HttpRequestMessage request, Stream tr
384384
if ((int)connectResponse.StatusCode < 200 || 300 <= (int)connectResponse.StatusCode)
385385
{
386386
transport.Dispose();
387-
throw new HttpRequestException("Failed to negotiate the proxy tunnel: " + connectResponse.ToString());
387+
throw new HttpRequestException("Failed to negotiate the proxy tunnel: " + connectResponse);
388388
}
389389
}
390390
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Runtime.Serialization;
2+
3+
namespace Docker.DotNet.Models
4+
{
5+
[DataContract]
6+
public class AppArmorOpts // (swarm.AppArmorOpts)
7+
{
8+
[DataMember(Name = "Mode", EmitDefaultValue = false)]
9+
public string Mode { get; set; }
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System.Runtime.Serialization;
2+
3+
namespace Docker.DotNet.Models
4+
{
5+
[DataContract]
6+
public class AttestationProperties // (image.AttestationProperties)
7+
{
8+
[DataMember(Name = "For", EmitDefaultValue = false)]
9+
public string For { get; set; }
10+
}
11+
}

src/Docker.DotNet/Models/BindOptions.Generated.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@ public class BindOptions // (mount.BindOptions)
1313

1414
[DataMember(Name = "CreateMountpoint", EmitDefaultValue = false)]
1515
public bool CreateMountpoint { get; set; }
16+
17+
[DataMember(Name = "ReadOnlyNonRecursive", EmitDefaultValue = false)]
18+
public bool ReadOnlyNonRecursive { get; set; }
19+
20+
[DataMember(Name = "ReadOnlyForceRecursive", EmitDefaultValue = false)]
21+
public bool ReadOnlyForceRecursive { get; set; }
1622
}
1723
}

0 commit comments

Comments
 (0)