Skip to content

Add handling of firmware upgrades for nxos - #536

Merged
IvoGoman merged 3 commits into
mainfrom
feat/nxos-upgrade-firmware
Sep 17, 2026
Merged

IvoGoman merged 3 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.

@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 Outdated
Comment thread internal/provider/cisco/nxos/firmware.go Outdated
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch 2 times, most recently from 0815b8c to a7b79c6 Compare September 9, 2026 09:54
@github-actions github-actions Bot added size/XXL and removed size/XL labels Sep 16, 2026

@felix-kaestner felix-kaestner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IvoGoman I guess just some linting that needs to be fixed.

@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from d1c1f61 to 5b21d15 Compare September 17, 2026 07:27
@github-actions github-actions Bot added size/XL and removed size/XXL labels Sep 17, 2026
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from 5b21d15 to ac98cf5 Compare September 17, 2026 07:30
    - 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>
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
@IvoGoman
IvoGoman force-pushed the feat/nxos-upgrade-firmware branch from ac98cf5 to 86e9ab3 Compare September 17, 2026 07:31
@github-actions

Copy link
Copy Markdown

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

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1 2.60% (-0.01%) 👎
github.com/ironcore-dev/network-operator/internal/controller/core 62.68% (-0.41%) 👎
github.com/ironcore-dev/network-operator/internal/paused 51.32% (-3.61%) 👎
github.com/ironcore-dev/network-operator/internal/provider 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.01% (+2.88%) 👍
github.com/ironcore-dev/network-operator/internal/transport/nxapi 42.56% (-30.24%) 💀 💀 💀

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 59.79% (-8.62%) 373 (+47) 223 150 (+47) 👎
github.com/ironcore-dev/network-operator/internal/paused/paused.go 51.32% (-3.61%) 76 (+5) 39 37 (+5) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/firmware.go 77.18% (+77.18%) 149 (+149) 115 (+115) 34 (+34) 🌟
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.87% (+0.63%) 3342 (+36) 29 (+21) 3313 (+15) 👍
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/system.go 2.56% (-0.07%) 39 (+1) 1 38 (+1) 👎
github.com/ironcore-dev/network-operator/internal/provider/provider.go 0.00% (ø) 54 0 54
github.com/ironcore-dev/network-operator/internal/transport/nxapi/client_mock.go 0.00% (ø) 62 (+62) 0 62 (+62)
github.com/ironcore-dev/network-operator/internal/transport/nxapi/client_mock_helper.go 0.00% (ø) 8 (+8) 0 8 (+8)
github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi.go 66.13% (-6.44%) 124 (+11) 82 42 (+11) 👎

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
  • github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi_test.go

@IvoGoman
IvoGoman merged commit 19eb933 into main Sep 17, 2026
26 checks passed
@IvoGoman
IvoGoman deleted the feat/nxos-upgrade-firmware branch September 17, 2026 12:51
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Sep 17, 2026
ofrzeta pushed a commit to ofrzeta/network-operator that referenced this pull request Sep 18, 2026
* Add handling of firmware upgrades for nxos

    - 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>

* incoporate PR review

Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>

* use moq for nxos api client

Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>

---------

Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
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: Done

Development

Successfully merging this pull request may close these issues.

3 participants