Repository navigation
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.
ui lb algorithm from capability #134
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
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
ui lb algorithm from capability #134
Changes from 1 commit
da709bbd756c1aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Before this change, both the public LB form (LoadBalancing.vue) and the internal LB form (network.js Internal LB action) hard-coded the algorithm dropdown to ['source', 'roundrobin', 'leastconn']. Every Lb provider got the same three options regardless of what the provider actually supported, so a user could pick "leastconn" against, e.g., the OVN provider, only to get the rule rejected later by validateLBRule. The capability is already declared (NetworkElement.getCapabilities() -> Service.Lb -> Capability.SupportedLBAlgorithms) and surfaced by listNetworks - we just weren't reading it. LoadBalancing.vue (public LB - the create modal and the edit-rule modal): - Replaces the three static <a-select-option>s with a v-for over a new `supportedAlgorithms` data field defaulting to the legacy ['roundrobin', 'leastconn', 'source'] (so providers/networks that don't declare the capability behave exactly as before). - Adds fetchLbCapabilities() (called from fetchData) which: * resolves the network id from resource.associatednetworkid or resource.networkid, * looks up the network via listNetworks, * walks service[name=Lb].capability[name=SupportedLbAlgorithms] and splits the CSV into the dropdown list, * snaps newRule.algorithm to the first supported value if the previous default falls outside the new set, * swallows any error so we never break the page on a backend hiccup. listNetworks is the right endpoint here. listNetworkOfferings hard-codes only SupportedLBIsolation/ElasticLb/InlineMode/VmAutoScaling for the Lb service in createNetworkOfferingResponse, while createNetworkResponse walks the live provider's getCapabilities() and exposes everything we declared - including SupportedLbAlgorithms. network.js (internal LB action): - Leaves the static option list in place but flags the spot with a TODO. Driving this declaratively requires AutogenView to support an async or function-valued `mapping[field].options`, which is a framework-level change and out of scope for this UI patch. A follow-up can convert the declarative mapping to a SFC and adopt the same approach as the public LB form. The change is provider-agnostic: it benefits every Lb provider that correctly declares SupportedLBAlgorithms. OVN gets {roundrobin, source}; VirtualRouter keeps {roundrobin, leastconn, source}; Netscaler/F5/etc. will reflect whatever they declare, and providers without the capability fall back to the legacy three. This commit is intentionally self-contained on top of the OVN plugin work so it can be cherry-picked into a dedicated upstream PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing