Skip to content

v2.1.0

Compare
Choose a tag to compare
@ehrenfeu ehrenfeu released this 12 May 19:40
· 56 commits to main since this release

PowerShell changes

The JSON returned by the REST server was completely missing the Status object, this is now fixed. Additionally, that object now also contains a Timestamp property to report (in seconds since the epoch, a.k.a. Unix time) when the response has been generated.

Added ✨

  • The constructor of psytricks.wrapper.ResTricksWrapper is now doing a connection check to the defined server upon instantiation.
  • In addition it was extended by an optional argument verify (defaulting to True) for requesting the server version to be verified against the client version.
  • If verify is set to True exceptions will be raised in case the connection check fails or if a version mismatch is detected.

Changed 🏗

  • In case the core HTTP request (GET or POST) fails in any of the wrapper methods, the corresponding exception is now re-raised to make this visible to the calling code. Previously only log messages were generated and the exceptions had been silenced explicitly.
  • Each HTTP response is now expected to contain a JSON payload. In case the HTTP status code is indicating an issue, the Status attributes of the returned JSON are printed to the log to facilitate debugging.
  • The psytricks.wrapper.ResTricksWrapper.perform_poweraction method now returns the details on the power action status of the given machine.

Fixed 🩹

  • Citrix status values and PowerShell timestamps are now properly mapped also in psytricks.wrapper.ResTricksWrapper methods. Previously this had been the case in psytricks.wrapper.PSyTricksWrapper methods only.