Action properties#993
Open
MorganaFuture wants to merge 2 commits into
Open
Conversation
Add an ActionProperties trait (no-op defaults, so nothing else has to change) and require it on the four Action super-traits. RuleDump now carries a Vec<ActionProperty> so dump-layer callers can read each action's config; bump API_VERSION to 41. Hook up the existing engine and oxide-vpc actions. The motivating one is EncapAction, which now exposes vni and phys_ip_src — so an operator can finally tell which VNI a port is encapsulating into.
Reads the action properties via the existing dump-layer ioctl and prints them as a small table — or, with -c, as LAYER:DIR:RULE:PROPERTY:VALUE lines (colons and backslashes escaped, dladm show-linkprop -c style). Filters: -l, -d, -r, --prop. Filtering and formatting helpers live in opte::print so they can be unit-tested without linking the illumos-only binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
ActionPropertiestrait so eachActioncan advertise its read-only config as K/V pairs, plus anopteadm show-propsubcommand to read them (with a -c mode for parseable output, likedladm show-linkprop-c). The motivating case is finding which VNI a port is encapsulating into - now exposed byEncapAction.RuleDumpgains aVec<ActionProperty>;API_VERSION bumped to 41.
Tested with
cargo test -p opte -p opte-api -p oxide-vpc(10 new tests).Closes #960.