refactor(tui): Forward load_balancer to gen ResourceBehaviour - #1978
Merged
Conversation
PR #1975 added the generated mechanical tier for the load_balancer resources but left the hand-written `ResourceBehaviour` impls writing the six derivable methods inline. Thin each hand file to a one-line forwarder onto `super::generated::<r>::Generated::<method>`, keeping only the genuinely custom logic: - `loadbalancers.rs`: dual `filter_carry_action` drilldown into listeners and pools, plus the two `TryFrom<&serde_json::Value>` filter builders. - `pools.rs`: dual `filter_carry_action` drilldown into members and health monitors, plus its two `TryFrom` filter builders. - `listeners.rs` / `health_monitors.rs`: pure forwarders. `pool_members.rs` is a nested resource the generator does not emit and is left untouched. Test title expectations move to the generator's prefix-stripped form ("Load Balancers", "Pools"). Assisted-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
Open
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.
PR #1975 added the generated mechanical tier for the load_balancer
resources but left the hand-written
ResourceBehaviourimpls writing thesix derivable methods inline. Thin each hand file to a one-line forwarder
onto
super::generated::<r>::Generated::<method>, keeping only thegenuinely custom logic:
loadbalancers.rs: dualfilter_carry_actiondrilldown into listenersand pools, plus the two
TryFrom<&serde_json::Value>filter builders.pools.rs: dualfilter_carry_actiondrilldown into members andhealth monitors, plus its two
TryFromfilter builders.listeners.rs/health_monitors.rs: pure forwarders.pool_members.rsis a nested resource the generator does not emit and isleft untouched. Test title expectations move to the generator's
prefix-stripped form ("Load Balancers", "Pools").
Assisted-By: Claude Sonnet 5 noreply@anthropic.com
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com