Skip to content

Add handling of firmware upgrades for nxos - #536

Open
IvoGoman wants to merge 2 commits into
mainfrom
feat/nxos-upgrade-firmware
Open

Add handling of firmware upgrades for nxos#536
IvoGoman wants to merge 2 commits into
mainfrom
feat/nxos-upgrade-firmware

Conversation

@IvoGoman

Copy link
Copy Markdown
Contributor
- adds new DeviceMaintenance key "firmware-upgrade"
- pauses reconciliation while upgrade is running
- adds DeviceMaintenanceFirmwareTargetAnnotation to specify the target firmware version

nxos provider impletementation
- ensure enough space, extends NX-API timeout during upgrade.
- image is copied & verified.
- show incompatibility-all nxos & show install all impact nxos are run to check software & hw
- after install & reload the device is checked for version. When boot image matches the target image the upgrade is considered done.

    - adds new DeviceMaintenance key "firmware-upgrade"
    - pauses reconciliation while upgrade is running
    - adds DeviceMaintenanceFirmwareTargetAnnotation to
      specify the target firmware version

    nxos provider impletementation
    - ensure enough space, extends NX-API
    timeout during upgrade.
    - image is copied & verified.
    - show incompatibility-all nxos & show install all
    impact nxos are run to check software & hw
    - after install & reload the device is checked for
    version. When boot image matches the target image
    the upgrade is considered done.

Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from 613ec6e to 03995ad Compare August 31, 2026 10:20
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Sep 1, 2026
@hardikdr hardikdr added this to Roadmap Sep 1, 2026
Comment thread internal/controller/core/device_controller.go Outdated
Comment thread internal/controller/core/device_controller.go
Comment thread internal/paused/paused.go Outdated
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
Comment thread internal/provider/provider.go Outdated
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
Comment thread internal/provider/cisco/nxos/firmware_test.go Outdated
Comment thread internal/provider/cisco/nxos/firmware_test.go
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from 2d08c2e to 0815b8c Compare September 9, 2026 07:07
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from 0815b8c to a7b79c6 Compare September 9, 2026 09:54
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Merging this branch changes the coverage (2 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1 2.52% (ø)
github.com/ironcore-dev/network-operator/internal/controller/core 60.67% (-0.57%) 👎
github.com/ironcore-dev/network-operator/internal/paused 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 12.51% (+3.04%) 👍
github.com/ironcore-dev/network-operator/internal/transport/nxapi 68.97% (-4.43%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1/groupversion_info.go 0.00% (ø) 2 0 2
github.com/ironcore-dev/network-operator/internal/controller/core/device_controller.go 57.49% (-9.65%) 327 (+47) 188 139 (+47) 👎
github.com/ironcore-dev/network-operator/internal/paused/paused.go 0.00% (ø) 58 (+5) 0 58 (+5)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/firmware.go 74.62% (+74.62%) 130 (+130) 97 (+97) 33 (+33) 🌟
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/system.go 3.23% (-0.11%) 31 (+1) 1 30 (+1) 👎
github.com/ironcore-dev/network-operator/internal/provider/provider.go 0.00% (ø) 42 0 42
github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi.go 68.70% (-4.45%) 115 (+7) 79 36 (+7) 👎

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/suite_test.go
  • github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/firmware_test.go

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. size/XL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants