Skip to content

Releases: stmcginnis/gofish

v0.24.0

Choose a tag to compare

@stmcginnis stmcginnis released this 30 Jul 17:26
e9946f1

What's Changed

New Contributors

Full Changelog: v0.23.0...v0.24.0

v0.23.0

Choose a tag to compare

@stmcginnis stmcginnis released this 07 Jul 21:43

What's Changed

Full Changelog: v0.22.0...v0.23.0

v0.22.0

Choose a tag to compare

@stmcginnis stmcginnis released this 26 May 15:22
dafb96b

What's Changed

Full Changelog: v0.21.6...v0.22.0

v0.21.6

Choose a tag to compare

@stmcginnis stmcginnis released this 14 Apr 14:33
4fc5c9b

What's Changed

New Contributors

Full Changelog: v0.21.5...v0.21.6

v0.21.5

Choose a tag to compare

@stmcginnis stmcginnis released this 03 Apr 08:42
4f26423

What's Changed

  • fix(computersystem): use settingsTarget in SetBoot and sanitize gzip ETags by @y-isono in #511
  • fix: retry action POST without If-Match on 412 Precondition Failed by @y-isono in #510
  • Add string deserialization for SensoryArray. by @thespags in #517
  • Fix AttributeRegistry CurrentValue/DefaultValue type regression by @NikkeTryHard in #520
  • Try main System resource before Settings in SetBoot by @rahulbabu95 in #519
  • fix: set ForceAttemptHTTP2 on custom transport to restore HTTP/2 negotiation by @xkonni in #518

New Contributors

Full Changelog: v0.21.4...v0.21.5

v0.21.4

Choose a tag to compare

@stmcginnis stmcginnis released this 02 Mar 14:14
f4b7846

What's Changed

New Contributors

Full Changelog: v0.21.3...v0.21.4

v0.21.3

Choose a tag to compare

@stmcginnis stmcginnis released this 20 Feb 21:56
fdd87a7

What's Changed

  • Fix Drive.Location regression: restore array type per DMTF spec by @atd9876 in #506

New Contributors

Full Changelog: v0.21.2...v0.21.3

v0.21.2

Choose a tag to compare

@stmcginnis stmcginnis released this 19 Feb 22:11
3bfd741

What's Changed

  • Update generator to always fetch latest official releases by @stmcginnis in #503
  • fix: In computersystem Boot struct, omitempty everything by @arossbell in #504

Full Changelog: v0.21.1...v0.21.2

v0.21.1

Choose a tag to compare

@stmcginnis stmcginnis released this 17 Feb 14:21
d1c49b0

What's Changed

  • Fix ComputerSystem.Reset() method (regression from #493) by @izvyk in #502

New Contributors

Full Changelog: v0.21.0...v0.21.1

v0.21.0

Choose a tag to compare

@stmcginnis stmcginnis released this 13 Feb 18:00
47a61ec

⚠️ This release has many breaking changes ⚠️

Significant Changes

Package refactoring

There has been a lot of struggle and compromises trying to keep the Redfish and Swordfish packages separate. The Swordfish schema builds on top of Redfish, but there are now many cases where Redfish schemas refer to Swordfish schema objects and types. This works fine for defining a spec, but has some issues with languages like Go and avoiding circular imports.

This release refactors nearly everything to move all Redfish and Swordfish objects into the schemas package. This makes it easier to find everything and avoids the circular import issue.

Code generation

There were some helpers for generating some source files in the past, but it wasn't very well maintained and the resulting files required a lot of clean up to make them usable. Some effort was put in to creating new generator tooling for everything. Cleanup is still needed, but much less than before. Now, when new spec versions are released, the generator can be run and the diff of the old and new code can be used to find differences and keep our workarounds.

This has also made it easy to flesh out a lot more of the spec implementation. Many objects and properties have been added that were in the spec but missing from Gofish. Implementation should be much more complete than it was before.

Optional numeric values

Monitoring software using Gofish has had the issue that some values would be reported as 0, but it wasn't always clear if that was the actual value or if the service didn't report anything. This could be a challenge for things like metrics reporting.

This release is now consistent where any numeric value that is defined as optional: true in the spec is now a pointer value. For library users that need to know if the value was present or not, you can now do something like:

if ps.PowerConsumedWatts != nil {
	// Only report the value if the system provides it
	powerConsumedCounter.Record(ctx, *ps.PowerConsumedWatts)
}

For those that do not care there is a helper method to just get the referenced value or its "zero value":

watts := gofish.Deref(ps.PowerConsumedWatts)

And setting values for updates:

cs.PowerCycleDelaySeconds = gofish.ToRef(30)

Consistent action calls

Some Redfish actions are async. Implementations can optionally return task or task monitor information in the headers or the body of the response. This is somewhat up to the implementation, so it's not a clear expectation just from the spec. This release changes all action methods that do not explicitly return a synchronous result to optionally return a TaskMonitor to be able to track async progress.

This means calls the used to only return a possible error result now return both a possible TaskMonitor and possible error, resulting in changes like:

err = accountToUpdate.ChangePassword(newPassword, sessionAccountPassword)

changing to:

_, err = accountToUpdate.ChangePassword(newPassword, sessionAccountPassword)

// Or
tm, err := accountToUpdate.ChangePassword(newPassword, sessionAccountPassword)
if tm != nil {
	resp, err := WaitForTaskMonitor(ctx, client, pollRate, tm, resultChan)
}

What's Changed

Read more