-
Notifications
You must be signed in to change notification settings - Fork 195
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
YAML consolidation prelude: OVS handling (FR-702) #249
YAML consolidation prelude: OVS handling (FR-702) #249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It makes sense to handle the definitions in an ordered way. If you don't mind I'd like the ovs-ports
name, though, as this is kind of an edge case and should be visible as such, IMO.
Thanks!
Codecov Report
@@ Coverage Diff @@
## main #249 +/- ##
=======================================
Coverage 99.10% 99.10%
=======================================
Files 58 58
Lines 10052 10052
=======================================
Hits 9962 9962
Misses 90 90
Continue to review full report at Codecov.
|
a3ca281
to
901c928
Compare
The previous implementation relied on the order of traversal of a hashtable, which isn't exactly reliable. It wasn't problematic because the semantics of the port pair are symetrical, but since we're planing on using the YAML netplan generator backend as a passthrough for `netplan set`, we want to preserve the user's input as pristinely as possible. The new implementation uses the ordered list of netdefs to determine the order in which netdefs are processed, which is both deterministic and sensible, since it respects the order in which the user fed us the info (modulo the grouping by devtype).
Later in the patchset we expose this data to Python, and are using the names rather than the integers to represent the netdef types. As a result, we need a proper name for this type to distinguish it from the default value.
Contrary to all other def types, this one is "virtual", as it doesn't have a YAML key matching it. Prefixing it with an underscore should make it obvious that *something* is different there. Co-authored-by: Lukas Märdan <[email protected]> Co-authored-by: Lukas Märdian <[email protected]>
901c928
to
2625234
Compare
Description
A couple of patches related to OpenVSwitch handling. The consistency patch is needed to be able to ensure idempotency of the user input (within reason). The type name definition will be needed when we'll rewrite
sriov.py
as we'll need to identify those definitions.Checklist
make check
successfully.make check-coverage
).