public ReturnStatus Execute() { ReturnStatus status = new ReturnStatus(); try { ApplicationContainer container = new ApplicationContainer(WithAppUuid, WithContainerUuid, null, WithAppName, WithContainerName, WithNamespace, null, null, null); List<SshKey> keys = new List<SshKey>(); if (!string.IsNullOrWhiteSpace(WithSshKeys)) { JArray varsArray = (JArray)JsonConvert.DeserializeObject(WithSshKeys); keys = varsArray.ToObject<List<SshKey>>(); } container.ReplaceSshKeys(keys); status.ExitCode = 0; status.Output = string.Empty; } catch(Exception ex) { Logger.Error("Error running oo-authorized-ssh-keys-replace command: {0} - {1}", ex.Message, ex.StackTrace); status.ExitCode = 1; status.Output = ex.Message; } return status; }