Skip to content

Commit

Permalink
Backup restore (siemens#30)
Browse files Browse the repository at this point in the history
* remove unnecesary console writeline
  • Loading branch information
KircMax authored Jan 3, 2023
1 parent 72b2428 commit 40117e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/Webserver.API/Models/ApiClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@ public override bool Equals(object obj)
/// <returns></returns>
public override int GetHashCode() => (Name).GetHashCode();

/// <summary>
/// Return the Name
/// </summary>
/// <returns>Name</returns>
public override string ToString()
{
return Name;
}
}
}
1 change: 0 additions & 1 deletion src/Webserver.API/Services/Backup/ApiBackupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public async Task RestoreBackupAsync(string restoreFilePath, string userName, st
//var ticket = await ApiRequestHandler.ApiBrowseTicketsAsync();

var waitHandler = new WaitHandler(timeToWait);
Console.WriteLine($"{DateTime.Now}: Wait for plc to not be pingable anymore (reboot).");
WaitForPlcReboot(waitHandler);
await ApiRequestHandler.ReLoginAsync(userName, password);
ticketResponse = (await ApiRequestHandler.PlcRestoreBackupAsync(password)).Result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ private void CheckResourcePath(string resourcePath)
/// used to create an ApiFileResource from a given filename and localDirectoryPath
/// </summary>
/// <param name="resourcePath">Path to the File/Directory to build the resource from</param>
/// <param name="localDirectoryPath">Local Directory Path - used to determine the filename (Path!)</param>
/// <returns>the ApiFileResource</returns>
public ApiFileResource BuildResourceFromFile(string resourcePath)
{
Expand Down

0 comments on commit 40117e7

Please sign in to comment.