Releases: stmcginnis/gofish
Release list
v0.24.0
What's Changed
- Restore manager OemLinks by @Keruspe in #542
- Bump actions/setup-go from 6.5.0 to 7.0.0 by @dependabot[bot] in #543
- Bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #544
- Add PatchWithTask and UpdateBiosAttributesApplyAtWithTask by @breml in #547
- Dedupe some task code and cleanup nits by @stmcginnis in #548
- Keep order to parallel object retrieval by @stmcginnis in #550
New Contributors
Full Changelog: v0.23.0...v0.24.0
v0.23.0
What's Changed
- Bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #531
- Workaround ZTE bug in processors by @stmcginnis in #533
- Bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #534
- Bump actions/setup-go from 6.4.0 to 6.5.0 by @dependabot[bot] in #538
- Bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 by @dependabot[bot] in #537
- Schemas: change LocationIndicatorActive to *bool to distinguish missing vs false by @izvyk in #539
- Add object Refresh method for conditional Get by @stmcginnis in #540
- Update to golangci-lint 2.12.2 by @stmcginnis in #541
Full Changelog: v0.22.0...v0.23.0
v0.22.0
What's Changed
- Fix lint issues in example code by @stmcginnis in #524
- Pin third party GitHub Actions to SHA by @stmcginnis in #526
- Bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by @dependabot[bot] in #528
- Workaround for Lenovo VirtualMedia handling by @stmcginnis in #530
Full Changelog: v0.21.6...v0.22.0
v0.21.6
What's Changed
- fix: upperbound and lowerbound attribute type by @JeanArhancet in #521
- Updates for Swordfish Schema v1.2.8 by @stmcginnis in #522
- Add proper godoc examples by @stmcginnis in #523
New Contributors
- @JeanArhancet made their first contribution in #521
Full Changelog: v0.21.5...v0.21.6
v0.21.5
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
- @y-isono made their first contribution in #511
- @NikkeTryHard made their first contribution in #520
- @rahulbabu95 made their first contribution in #519
Full Changelog: v0.21.4...v0.21.5
v0.21.4
v0.21.3
v0.21.2
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
v0.21.0
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
- Add some AMI OEM objects by @stmcginnis in #377
- Increase Sensor.Reading to float64 by @iamsli in #379
- Fix OperatingSystem link in ComputerSystem by @stmcginnis in #380
- Gets instances of resources where relevant in cooling unit by @iamsli in #381
- Add SSLCert Upload to Supermicro UpdateService by @lamaral in #378
- LeakDetection is an instance in ThermalSubsystem by @iamsli in #383
- Add ProcessorSummary Metrics link by @mwieczorek in #386
- Add Conditions to Status by @iamsli in #387
- Add method to get metrics from PowerSupply by @smiller248 in #389
- Add OEM field to Port by @iamsli in #390
- Ports gets the instances managed by the Processor by @iamsli in #391
- Add some DMTF 2024.4 release bits by @iamsli in #393
- Add new FullPowerCycle ResetType by @pereztr5 in #394
- Clean up session on logout by @mahendrapaipuri in #396
- Fix missing ResetType value by @pereztr5 in #398
- add IPMISOL SOL by @Muyk33rus in #397
- Add client to the returned ManagerAccount on account creation by @pereztr5 in #402
- LeakDetectors gets the collection in chassis by @iamsli in #403
- Fix golangci config by @mwieczorek in #407
- Set client.keepAlive flag also for passed HTTPClient by @mwieczorek in #404
- Allow logout even when APIClient ctx is canceled by @mwieczorek in #405
- Add Oem property to MemoryMetrics by @mwieczorek in #406
- Add Oem property to EnvironmentMetrics by @mwieczorek in #410
- Add Oem property to Status by @mwieczorek in #411
- Add Metrics to MemorySummary by @mwieczorek in #417
- Add Oem property to Processor by @mwieczorek in #416
- Add CacheMemory to Processor resource by @mwieczorek in #413
- Use float64 for Sensor.ReadingRangeMin by @mwieczorek in #420
- redfish/virtualmedia: Return Task if Link present in Insert response by @mmlb in #419
- Bump golangci/golangci-lint-action from 6 to 8 by @dependabot[bot] in #421
- Update SMC OEM readwrite field values to match SMC documentation. by @arossbell in #424
- Strip omitempty when formulating object update by @stmcginnis in #432
- add support for logservice CollectDiagnosticData by @joeyberkovitz in #430
- Ensure ClientConfig settings are applied to provided HTTPClients by @stouset in #433
- fix: TrustedComponent TPM is a json object by @bbrown-cw in #435
- Add support for ActionInfo and implement for CollectDiagnosticData by @joeyberkovitz in #434
- Fix: handle missing NetworkAdapters link in Chassis resources by @T-jegou in #437
- Initialize TLSClientConfig when using default transport by @stmcginnis in #438
- Handle etag properly on CreateAccount call by @joeyberkovitz in #439
- Complete support for Thermal.v1_7_1 schema by @Muyk33rus in #440
- Allow non standard transports to reuse connections. by @thespags in #441
- Handle empty arrays for PCIeInterfaces. by @thespags in #443
- adaptation to the specification https://redfish.dmtf.org/schemas/v1/Power.v1_7_3.json by @Muyk33rus in #445
- Refactor Update method to reduce boilerplate by @stmcginnis in #446
- adaptation to the specification https://redfish.dmtf.org/schemas/v1/Sensor.v1_11_0.json by @Muyk33rus in #447
- Update PartLocation to handle string int. by @thespags in #448
- UP to VirtualMedia.v1_6_5.json by @Muyk33rus in #449
- feat: add WithContext function to client by @joeyberkovitz in #452
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #454
- Add support for ActionInfo to common and redfish.VirtualMedia by @mmlb in #423
- Add AllowableBootSourceOverrideTargetValues + AllowableUefiTargetBootSourceOverrideValues to the Boot object by @ungureanuvladvictor in #456
- Bump actions/setup-go from 5 to 6 by @dependabot[bot] in #457
- feat(redfish): Add function to handle async SPDMGetSignedMeasurements by @dukovac in #458
- Add Reset action to the PowerSupply type by @smiller248 in #460
- Add RawData to PowerSubsystem type by @smiller248 in #461
- Add RawData to PowerDistributionMetrics type by @smiller248 in #464
- Expose RawData in PowerSupplyUnit type by @smiller248 in #463
- Update Thermal Equipment Resources by @iamsli in #465
- feat: add support for reset action info by @joeyberkovitz in #466
- add dell OEM methods by @jafurlan in #468
*...