Skip to content

Add LastRebootTime to Device status - #276

Merged
felix-kaestner merged 2 commits into
mainfrom
uptime
Apr 2, 2026
Merged

felix-kaestner merged 2 commits into
mainfrom
uptime

Conversation

@felix-kaestner

@felix-kaestner felix-kaestner commented Apr 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Exposes the last reboot timestamp of a device in its status.

  • Adds lastRebootTime field to DeviceStatus in the API and propagates it from the provider's DeviceInfo
  • Implements a BootTime type for the NX-OS provider that fetches a stable Unix boot timestamp via GNMI, with a custom JSON unmarshaller to handle both numeric and string-encoded Unix timestamps
  • Adds a RebootTime printer column to the Device CRD

@felix-kaestner
felix-kaestner requested a review from a team April 2, 2026 09:47
@felix-kaestner
felix-kaestner enabled auto-merge (rebase) April 2, 2026 09:48
@felix-kaestner
felix-kaestner force-pushed the uptime branch 2 times, most recently from 3dc57d1 to dc27ac4 Compare April 2, 2026 13:31
@felix-kaestner
felix-kaestner disabled auto-merge April 2, 2026 13:35
Exposes the last reboot timestamp of a device in its status.
@felix-kaestner
felix-kaestner merged commit bdedecd into main Apr 2, 2026
10 checks passed
@felix-kaestner
felix-kaestner deleted the uptime branch April 2, 2026 13:54
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/controller/core 63.02% (-0.06%) 👎
github.com/ironcore-dev/network-operator/internal/provider 52.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.30% (-0.06%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1/device_types.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/core/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/internal/controller/core/device_controller.go 60.78% (-5.72%) 204 (+1) 124 (-11) 80 (+12) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.06% (-0.00%) 1611 (+1) 1 1610 (+1) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/system.go 3.23% (-2.04%) 31 (+12) 1 30 (+12) 👎
github.com/ironcore-dev/network-operator/internal/provider/provider.go 52.00% (ø) 25 13 12

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ironcore-dev/network-operator/internal/controller/core/device_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/suite_test.go

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Apr 3, 2026
@hardikdr hardikdr added this to Roadmap Apr 3, 2026
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants