fix: store the cidr set in the managed egress firewall dummy rule - #348
Open
nagaboinaramgopal wants to merge 1 commit into
Open
fix: store the cidr set in the managed egress firewall dummy rule#348nagaboinaramgopal wants to merge 1 commit into
nagaboinaramgopal wants to merge 1 commit into
Conversation
For a managed egress firewall, Read collects unknown rules into a dummy rule, but stored the uuid string in cidr_list, which is a schema.TypeSet and must hold a *schema.Set. It builds one (cidrs) right above for this, so use it. With the string, reading a managed egress firewall panics with interface conversion: interface {} is string, not *schema.Set.
nagaboinaramgopal
force-pushed
the
fix/egress-firewall-cidr-list-set
branch
from
September 7, 2026 19:58
2b44025 to
02f9daa
Compare
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.
Description
For a managed egress firewall, Read collects the unknown rules into a single dummy rule.
cidr_listis aschema.TypeSet, so its value must be a*schema.Set, and the code even builds one (cidrs) right above for exactly this. But the dummy rule stored the uuid string incidr_listinstead, so reading a managed egress firewall panics withinterface conversion: interface {} is string, not *schema.Set. Use thecidrsset.Testing
Added a unit test
TestEgressFirewallReadManagedDummyRuleCidrListIsSetthat reads a managed egress firewall, via a stub server returning one rule, and asserts each rule'scidr_listis a*schema.Set. It needs no live CloudStack:Before the fix the read panics on the string; after it, the read succeeds.