Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netplan state refactoring #399

Merged
merged 4 commits into from Aug 17, 2023
Merged

Conversation

daniloegea
Copy link
Collaborator

Description

It's basically #386 without the diff part.

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

- Define default values to fields
- Add a str() method that will return the route as a string in a format
  similar to the one returned from "ip route"
- Defined to_dict() method that will be used by the JSON encoder
  when dumping the NetplanRoute class.
- Refactor the _NetplanRouteIterator class to use **kwargs. It makes it
  clearer what fields we are assigning.
Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

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

Just one tiny TODO inline, that we need to resolve. Otherwise, lgtm!
Thank you very much!

netplan_cli/cli/state.py Outdated Show resolved Hide resolved
@slyon slyon merged commit 31c0c0d into canonical:main Aug 17, 2023
12 of 14 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
2 participants