From f7067560702b38ec88c4e8c709dda4d4e7793ac7 Mon Sep 17 00:00:00 2001 From: Philippe El Asmar Date: Fri, 21 May 2021 12:52:50 -0400 Subject: [PATCH 1/3] build: Version bump to 0.8 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index b0a313142..bfa0674fd 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.7", + "version": "0.8", "publicReleaseRefSpec": [ ".*" ], From 9796d436cbf27fe3e6730e7a83928e655e8cbd4e Mon Sep 17 00:00:00 2001 From: Philippe El Asmar Date: Mon, 24 May 2021 09:49:30 -0400 Subject: [PATCH 2/3] build: update ServerMode.Client project to include description, license and package ID --- public.snk | Bin 0 -> 596 bytes src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj | 1 - .../AWS.Deploy.ServerMode.Client.csproj | 19 ++++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 public.snk diff --git a/public.snk b/public.snk new file mode 100644 index 0000000000000000000000000000000000000000..be0ad9c5930ece51dbbbe0747b6ef61162b261b0 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096|Y^q}s+m;-#cLLTpcEz~M)?rnA(Tm=n zxn{dCq(myaC#0pUrLPsqdw28r_Jivjqb%3x(e2B-8e;w-Pyy8k!b5)rD=Ab9dJ*lt z$KT;C;0!nU=L~*@phZE2jHGL_SP+?b0U_>yL31l|6zrQ^NIvmA9k$i@YH|F)6x^>j zeI_9tbhMxmF6L`Ve;(0Wb_^uJ4IyYQ$|443<=Y2#k%xBCmjE6b)%NKdazC+Mwd7C3 zkx2V4bjIHHf&A9DW>t9bDP2S1AZ?<9ZY^&ZwRon-c^ix#{~83~F|_M&CDe6a$5S

B z9C9-B9(P5_;uB9KyhnmCd08T6X2O1aLVj{0^AAnyJR47&@JF;;V^>uuS9&}S*7;eo zpAXoHrS}~W`144rh)W{qqhOR)7)>&#>lUuDMXH1M)T`19ztdQCXIMMCO zaAE0ll?kB%s_Hx-UslVXh>dp{hgKgs5hui?Oa<0wQC|4IIkHB<*$nxWDUgAbw~Kck*Sl&N!X8%4 i`jVcY0AWS;Amazon;ElasticBeanstalk;ECS;Deploy AWS.Deploy.CLI AWS.Deploy.CLI - Latest icon.png https://github.com/aws/aws-dotnet-deploy true diff --git a/src/AWS.Deploy.ServerMode.Client/AWS.Deploy.ServerMode.Client.csproj b/src/AWS.Deploy.ServerMode.Client/AWS.Deploy.ServerMode.Client.csproj index b2c7a2af7..701a74649 100644 --- a/src/AWS.Deploy.ServerMode.Client/AWS.Deploy.ServerMode.Client.csproj +++ b/src/AWS.Deploy.ServerMode.Client/AWS.Deploy.ServerMode.Client.csproj @@ -2,6 +2,15 @@ netstandard2.0 + AWS .NET deployment tool Server Mode Client + Package to access the APIs exposed by the deployment tool server mode. This package is not intended for direct usage. + AWS.Deploy.ServerMode.Client + AWS;Amazon;Deploy;ServerMode + true + icon.png + https://github.com/aws/aws-dotnet-deploy + true + ..\..\public.snk @@ -10,4 +19,14 @@ + + + + + + + + + + From 5906a2b5395b5d92f498b3b206e137b3def83ef8 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Tue, 25 May 2021 09:39:00 -0700 Subject: [PATCH 3/3] feat: Generate interfaces for server mode clients --- .../DeploymentCommunicationClient.cs | 15 ++- src/AWS.Deploy.ServerMode.Client/RestAPI.cs | 95 ++++++++++++++++++- .../Program.cs | 1 + 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/src/AWS.Deploy.ServerMode.Client/DeploymentCommunicationClient.cs b/src/AWS.Deploy.ServerMode.Client/DeploymentCommunicationClient.cs index d59d94d30..5a5900e4b 100644 --- a/src/AWS.Deploy.ServerMode.Client/DeploymentCommunicationClient.cs +++ b/src/AWS.Deploy.ServerMode.Client/DeploymentCommunicationClient.cs @@ -10,7 +10,20 @@ namespace AWS.Deploy.ServerMode.Client { - public class DeploymentCommunicationClient : IDisposable + public interface IDeploymentCommunicationClient : IDisposable + { + Action? ReceiveLogDebugLine { get; set; } + + Action? ReceiveLogErrorMessageLine { get; set; } + + Action? ReceiveLogMessageLineAction { get; set; } + + Action? ReceiveLogAllLogAction { get; set; } + + Task JoinSession(string sessionId); + } + + public class DeploymentCommunicationClient : IDeploymentCommunicationClient { private bool _disposedValue; diff --git a/src/AWS.Deploy.ServerMode.Client/RestAPI.cs b/src/AWS.Deploy.ServerMode.Client/RestAPI.cs index ec022606e..b1846da74 100644 --- a/src/AWS.Deploy.ServerMode.Client/RestAPI.cs +++ b/src/AWS.Deploy.ServerMode.Client/RestAPI.cs @@ -16,7 +16,100 @@ namespace AWS.Deploy.ServerMode.Client using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.10.9.0 (NJsonSchema v10.4.1.0 (Newtonsoft.Json v12.0.0.0))")] - public partial class RestAPIClient + public partial interface IRestAPIClient + { + ///

Start a deployment session. A session id will be generated. This session id needs to be passed in future API calls to configure and execute deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task StartDeploymentSessionAsync(StartDeploymentSessionInput body); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Start a deployment session. A session id will be generated. This session id needs to be passed in future API calls to configure and execute deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task StartDeploymentSessionAsync(StartDeploymentSessionInput body, System.Threading.CancellationToken cancellationToken); + + /// Closes the deployment session. This removes any session state for the session id. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task CloseDeploymentSessionAsync(string sessionId); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Closes the deployment session. This removes any session state for the session id. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task CloseDeploymentSessionAsync(string sessionId, System.Threading.CancellationToken cancellationToken); + + /// Set the target recipe and name for the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task SetDeploymentTargetAsync(string sessionId, SetDeploymentTargetInput body); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Set the target recipe and name for the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task SetDeploymentTargetAsync(string sessionId, SetDeploymentTargetInput body, System.Threading.CancellationToken cancellationToken); + + /// Gets the list of compatible deployments for the session's project. The list is ordered with the first recommendation in the list being the most compatible recommendation. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetRecommendationsAsync(string sessionId); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Gets the list of compatible deployments for the session's project. The list is ordered with the first recommendation in the list being the most compatible recommendation. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetRecommendationsAsync(string sessionId, System.Threading.CancellationToken cancellationToken); + + /// Gets the list of existing deployments that are compatible with the session's project. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetExistingDeploymentsAsync(string sessionId); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Gets the list of existing deployments that are compatible with the session's project. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetExistingDeploymentsAsync(string sessionId, System.Threading.CancellationToken cancellationToken); + + /// Begin execution of the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task StartDeploymentAsync(string sessionId); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Begin execution of the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task StartDeploymentAsync(string sessionId, System.Threading.CancellationToken cancellationToken); + + /// Gets the status of the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetDeploymentStatusAsync(string sessionId); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Gets the status of the deployment. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task GetDeploymentStatusAsync(string sessionId, System.Threading.CancellationToken cancellationToken); + + /// Gets the health of the deployment tool. Use this API after starting the command line to see if the tool is ready to handle requests. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task HealthAsync(); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Gets the health of the deployment tool. Use this API after starting the command line to see if the tool is ready to handle requests. + /// Success + /// A server side error occurred. + System.Threading.Tasks.Task HealthAsync(System.Threading.CancellationToken cancellationToken); + + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.10.9.0 (NJsonSchema v10.4.1.0 (Newtonsoft.Json v12.0.0.0))")] + public partial class RestAPIClient : IRestAPIClient { private string _baseUrl = ""; private ServerModeHttpClient _httpClient; diff --git a/src/AWS.Deploy.ServerMode.ClientGenerator/Program.cs b/src/AWS.Deploy.ServerMode.ClientGenerator/Program.cs index 8d3a5eb91..b2177bdcf 100644 --- a/src/AWS.Deploy.ServerMode.ClientGenerator/Program.cs +++ b/src/AWS.Deploy.ServerMode.ClientGenerator/Program.cs @@ -29,6 +29,7 @@ static async Task Main(string[] args) var settings = new CSharpClientGeneratorSettings { ClassName = "RestAPIClient", + GenerateClientInterfaces = true, CSharpGeneratorSettings = { Namespace = "AWS.Deploy.ServerMode.Client",