Skip to content

Commit 7c0e19e

Browse files
committed
add logging test
fix naming convention
1 parent b04f266 commit 7c0e19e

File tree

4 files changed

+235
-166
lines changed

4 files changed

+235
-166
lines changed

src/Docker.DotNet/Endpoints/ConfigsOperations.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ internal ConfigsOperations(DockerClient client)
1616
this._client = client;
1717
}
1818

19-
async Task<IList<SwarmConfig>> IConfigsOperations.ListAsync(CancellationToken cancellationToken)
19+
async Task<IList<SwarmConfig>> IConfigsOperations.ListConfigAsync(CancellationToken cancellationToken)
2020
{
2121
var response = await this._client.MakeRequestAsync(this._client.NoErrorHandlers, HttpMethod.Get, "configs", cancellationToken).ConfigureAwait(false);
2222
return this._client.JsonSerializer.DeserializeObject<IList<SwarmConfig>>(response.Body);
2323
}
2424

25-
async Task<SwarmCreateConfigResponse> IConfigsOperations.CreateAsync(SwarmCreateConfigParameters body, CancellationToken cancellationToken)
25+
async Task<SwarmCreateConfigResponse> IConfigsOperations.CreateConfigAsync(SwarmCreateConfigParameters body, CancellationToken cancellationToken)
2626
{
2727
if (body == null)
2828
{
@@ -34,7 +34,7 @@ async Task<SwarmCreateConfigResponse> IConfigsOperations.CreateAsync(SwarmCreate
3434
return this._client.JsonSerializer.DeserializeObject<SwarmCreateConfigResponse>(response.Body);
3535
}
3636

37-
async Task<SwarmConfig> IConfigsOperations.InspectAsync(string id, CancellationToken cancellationToken)
37+
async Task<SwarmConfig> IConfigsOperations.InspectConfigAsync(string id, CancellationToken cancellationToken)
3838
{
3939
if (string.IsNullOrEmpty(id))
4040
{
@@ -45,7 +45,7 @@ async Task<SwarmConfig> IConfigsOperations.InspectAsync(string id, CancellationT
4545
return this._client.JsonSerializer.DeserializeObject<SwarmConfig>(response.Body);
4646
}
4747

48-
Task IConfigsOperations.DeleteAsync(string id, CancellationToken cancellationToken)
48+
Task IConfigsOperations.RemoveConfigAsync(string id, CancellationToken cancellationToken)
4949
{
5050
if (string.IsNullOrEmpty(id))
5151
{

src/Docker.DotNet/Endpoints/IConfigsOperations.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ namespace Docker.DotNet
88
public interface IConfigsOperations
99
{
1010
/// <summary>
11-
/// List secrets
11+
/// List configs
1212
/// </summary>
1313
/// <remarks>
1414
/// 200 - No error.
1515
/// 500 - Server error.
1616
/// </remarks>
17-
Task<IList<SwarmConfig>> ListAsync(CancellationToken cancellationToken = default(CancellationToken));
17+
Task<IList<SwarmConfig>> ListConfigAsync(CancellationToken cancellationToken = default(CancellationToken));
1818

1919
/// <summary>
20-
/// Create a secret
20+
/// Create a configs
2121
/// </summary>
2222
/// <remarks>
2323
/// 201 - No error.
2424
/// 406 - Server error or node is not part of a swarm.
2525
/// 409 - Name conflicts with an existing object.
2626
/// 500 - Server error.
2727
/// </remarks>
28-
Task<SwarmCreateConfigResponse> CreateAsync(SwarmCreateConfigParameters body, CancellationToken cancellationToken = default(CancellationToken));
28+
Task<SwarmCreateConfigResponse> CreateConfigAsync(SwarmCreateConfigParameters body, CancellationToken cancellationToken = default(CancellationToken));
2929

3030
/// <summary>
31-
/// Inspect a secret
31+
/// Inspect a configs
3232
/// </summary>
3333
/// <remarks>
3434
/// 200 - No error.
@@ -37,17 +37,17 @@ public interface IConfigsOperations
3737
/// 500 - Server error.
3838
/// </remarks>
3939
/// <param name="id">ID of the config.</param>
40-
Task<SwarmConfig> InspectAsync(string id, CancellationToken cancellationToken = default(CancellationToken));
40+
Task<SwarmConfig> InspectConfigAsync(string id, CancellationToken cancellationToken = default(CancellationToken));
4141

4242
/// <summary>
43-
/// Delete a secret
43+
/// Remove a configs
4444
/// </summary>
4545
/// <remarks>
4646
/// 204 - No error.
4747
/// 404 - Secret not found.
4848
/// 500 - Server error.
4949
/// </remarks>
5050
/// <param name="id">ID of the config.</param>
51-
Task DeleteAsync(string id, CancellationToken cancellationToken = default(CancellationToken));
51+
Task RemoveConfigAsync(string id, CancellationToken cancellationToken = default(CancellationToken));
5252
}
5353
}

src/Docker.DotNet/Endpoints/SwarmOperations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async Task<ServiceUpdateResponse> ISwarmOperations.UpdateServiceAsync(string id,
192192
return new MultiplexedStream(result, !tty);
193193
}
194194

195-
async Task ISwarmOperations.UpdateSwarmAsync(SwarmUpdateParameters parameters, CancellationToken cancellationToken)
195+
async Task ISwarmOperations.UpdateSwarmAsync(SwarmUpdateParameters parameters, CancellationToken cancellationToken)
196196
{
197197
var query = new QueryString<SwarmUpdateParameters>(parameters ?? throw new ArgumentNullException(nameof(parameters)));
198198
var body = new JsonRequestContent<Spec>(parameters.Spec ?? throw new ArgumentNullException(nameof(parameters.Spec)), this._client.JsonSerializer);
@@ -247,7 +247,7 @@ async Task<NodeListResponse> ISwarmOperations.InspectNodeAsync(string id, Cancel
247247
async Task ISwarmOperations.RemoveNodeAsync(string id, bool force, CancellationToken cancellationToken)
248248
{
249249
if (string.IsNullOrEmpty(id)) throw new ArgumentNullException(nameof(id));
250-
var parameters = new NodeRemoveParameters {Force = force};
250+
var parameters = new NodeRemoveParameters { Force = force };
251251
var query = new QueryString<NodeRemoveParameters>(parameters);
252252
await this._client.MakeRequestAsync(new[] { SwarmResponseHandler }, HttpMethod.Delete, $"nodes/{id}", query, cancellationToken).ConfigureAwait(false);
253253
}

0 commit comments

Comments
 (0)