Skip to content

net: add route-metric support in NetworkManager renderer - #6886

Merged
holmanb merged 4 commits into
canonical:mainfrom
Harshadev-24:fix-nm-route-metric
Jul 14, 2026
Merged

net: add route-metric support in NetworkManager renderer#6886
holmanb merged 4 commits into
canonical:mainfrom
Harshadev-24:fix-nm-route-metric

Conversation

@Harshadev-24

Copy link
Copy Markdown
Contributor

Thank you for submitting a PR to cloud-init!

To ease the process of reviewing your PR, do make sure to complete the following checklist before submitting a pull request.

  • I have signed the CLA: https://ubuntu.com/legal/contributors
  • I have included a comprehensive commit message using the guide below
  • I have added unit tests to cover the new behavior under tests/unittests/
    • Test files should map to source files i.e. a source file cloudinit/example.py should be tested by tests/unittests/test_example.py
    • Run unit tests with tox -e py3
  • I have kept the change small, avoiding unnecessary whitespace or non-functional changes.
  • I have added a reference to issues that this PR relates to in the PR message (Refs integration: do not LXD bind mount /etc/cloud/cloud.cfg.d #1234, Fixes integration: do not LXD bind mount /etc/cloud/cloud.cfg.d #1234)
  • I have updated the documentation with the changed behavior.
    • If the change doesn't change the user interface and is trivial, this step may be skipped.
    • Cloud-config documentation is generated from the jsonschema.
    • Generate docs with tox -e doc.

Proposed Commit Message

fix(net): add route-metric support in NetworkManager renderer

This implements the `route-metric` configuration for the NetworkManager 
renderer when a `metric` value is provided in the subnet data. Prior to 
this, the renderer was silently ignoring the route metrics provided 
by the cloud data sources.

Fixes GH-6854

@challvy

challvy commented May 18, 2026

Copy link
Copy Markdown
Contributor

this PR is releated to this issue #6854

@challvy

challvy commented May 27, 2026

Copy link
Copy Markdown
Contributor

Hi @holmanb , @blackboxsw — would either of you have a moment to review this PR? Thanks in advance!

@holmanb holmanb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please address the failing tests.

@Harshadev-24
Harshadev-24 requested a review from holmanb June 13, 2026 02:52
@Harshadev-24

Copy link
Copy Markdown
Contributor Author

@holmanb Just a heads up, the check_format CI is currently failing on tests/unittests/config/test_cc_phone_home.py (Line 57) due to an E501 line length error. Since this is outside the scope of my changes in the NetworkManager renderer, I believe this is an upstream issue on main. My formatter fixes for test_network_manager.py are pushed and ready. Let me know if you need anything else from me!

@holmanb

holmanb commented Jul 1, 2026

Copy link
Copy Markdown
Member

@holmanb Just a heads up, the check_format CI is currently failing on tests/unittests/config/test_cc_phone_home.py (Line 57) due to an E501 line length error. Since this is outside the scope of my changes in the NetworkManager renderer, I believe this is an upstream issue on main. My formatter fixes for test_network_manager.py are pushed and ready. Let me know if you need anything else from me!

Please rebase or merge on main. I believe that this was already fixed.

@holmanb holmanb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks for the proposal!

@holmanb
holmanb merged commit 8955c28 into canonical:main Jul 14, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants