Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rename AccessMode to VolumeAccessMode #4

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: Rename AccessMode to VolumeAccessMode
HofmeisterAn committed Nov 4, 2024

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit 56326b52b9f85c265ac5ea67550050238cd7980a
2 changes: 1 addition & 1 deletion src/Docker.DotNet/Models/ClusterVolumeSpec.Generated.cs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ public class ClusterVolumeSpec // (volume.ClusterVolumeSpec)
public string Group { get; set; }

[DataMember(Name = "AccessMode", EmitDefaultValue = false)]
public AccessMode AccessMode { get; set; }
public VolumeAccessMode AccessMode { get; set; }

[DataMember(Name = "AccessibilityRequirements", EmitDefaultValue = false)]
public TopologyRequirement AccessibilityRequirements { get; set; }
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
namespace Docker.DotNet.Models
{
[DataContract]
public class AccessMode // (volume.AccessMode)
public class VolumeAccessMode // (volume.AccessMode)
{
[DataMember(Name = "Scope", EmitDefaultValue = false)]
public string Scope { get; set; }
3 changes: 2 additions & 1 deletion tools/specgen/specgen.go
Original file line number Diff line number Diff line change
@@ -71,9 +71,10 @@ var typesToDisambiguate = map[string]*CSModelType{
},
},
},
typeToKey(reflect.TypeOf(volume.AccessMode{})): {Name: "VolumeAccessMode"},
typeToKey(reflect.TypeOf(volume.Info{})): {Name: "VolumeInfo"},
typeToKey(reflect.TypeOf(volume.Topology{})): {Name: "VolumeTopology"},
typeToKey(reflect.TypeOf(volume.Secret{})): {Name: "VolumeSecret"},
typeToKey(reflect.TypeOf(volume.Topology{})): {Name: "VolumeTopology"},
typeToKey(reflect.TypeOf(network.Task{})): {Name: "NetworkTask"},
typeToKey(reflect.TypeOf(registry.AuthenticateOKBody{})): {Name: "AuthResponse"},
typeToKey(reflect.TypeOf(registry.SearchResult{})): {Name: "ImageSearchResponse"},

Unchanged files with check annotations Beta

{
// The Docker daemon expects a write of zero bytes to signal the end of writes. Use native
// calls to achieve this since CoreCLR ignores a zero-byte write.
var overlapped = new NativeOverlapped();

Check warning on line 54 in src/Docker.DotNet/DockerPipeStream.cs

GitHub Actions / build

This call site is reachable on all platforms. 'NativeOverlapped' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check warning on line 54 in src/Docker.DotNet/DockerPipeStream.cs

GitHub Actions / build

This call site is reachable on all platforms. 'NativeOverlapped' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#if NET45
var handle = _event.SafeWaitHandle;
// Set the low bit to tell Windows not to send the result of this IO to the
// completion port.
overlapped.EventHandle = (IntPtr)(handle.DangerousGetHandle().ToInt64() | 1);

Check warning on line 64 in src/Docker.DotNet/DockerPipeStream.cs

GitHub Actions / build

This call site is reachable on all platforms. 'NativeOverlapped.EventHandle' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check warning on line 64 in src/Docker.DotNet/DockerPipeStream.cs

GitHub Actions / build

This call site is reachable on all platforms. 'NativeOverlapped.EventHandle' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
if (WriteFile(_stream.SafePipeHandle, IntPtr.Zero, 0, IntPtr.Zero, ref overlapped) == 0)
{
const int ERROR_IO_PENDING = 997;
if (request.IsHttps())
{
SslStream sslStream = new SslStream(transport, false, ServerCertificateValidationCallback);
await sslStream.AuthenticateAsClientAsync(request.GetHostProperty(), ClientCertificates, SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls, false);

Check warning on line 182 in src/Docker.DotNet/Microsoft.Net.Http.Client/ManagedHandler.cs

GitHub Actions / build

'SslProtocols.Tls11' is obsolete: 'TLS versions 1.0 and 1.1 have known vulnerabilities and are not recommended. Use a newer TLS version instead, or use SslProtocols.None to defer to OS defaults.' (https://aka.ms/dotnet-warnings/SYSLIB0039)

Check warning on line 182 in src/Docker.DotNet/Microsoft.Net.Http.Client/ManagedHandler.cs

GitHub Actions / build

'SslProtocols.Tls' is obsolete: 'TLS versions 1.0 and 1.1 have known vulnerabilities and are not recommended. Use a newer TLS version instead, or use SslProtocols.None to defer to OS defaults.' (https://aka.ms/dotnet-warnings/SYSLIB0039)
transport = sslStream;
}
public static X509Certificate2 GetCertFromPEMFiles(string certFilePath, string keyFilePath)
{
var cert = new X509Certificate2(certFilePath);
cert.PrivateKey = ReadFromPemFile(keyFilePath);

Check warning on line 27 in src/Docker.DotNet.X509/RSAUtil.cs

GitHub Actions / build

'X509Certificate2.PrivateKey' is obsolete: 'X509Certificate2.PrivateKey is obsolete. Use the appropriate method to get the private key, such as GetRSAPrivateKey, or use the CopyWithPrivateKey method to create a new instance with a private key.' (https://aka.ms/dotnet-warnings/SYSLIB0028)
return cert;
}
};
// Use "1" to indicate RSA.
var csp = new CspParameters(1)

Check warning on line 87 in src/Docker.DotNet.X509/RSAUtil.cs

GitHub Actions / build

This call site is reachable on all platforms. 'CspParameters' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
{
// Set the KeyContainerName so that native code that looks up the private key
// can find it. This produces a keyset file on disk as a side effect.
KeyContainerName = pemFilePath

Check warning on line 92 in src/Docker.DotNet.X509/RSAUtil.cs

GitHub Actions / build

This call site is reachable on all platforms. 'CspParameters.KeyContainerName' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
};
var rsaProvider = new RSACryptoServiceProvider(csp)

Check warning on line 94 in src/Docker.DotNet.X509/RSAUtil.cs

GitHub Actions / build

This call site is reachable on all platforms. 'RSACryptoServiceProvider' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
{
// Setting to false makes sure the keystore file will be cleaned up