@@ -265,7 +265,7 @@ func (c *client) createFirewallRule(isoNet *infrav1.CloudStackIsolatedNetwork, p
265265 p .SetIcmpcode (- 1 )
266266 }
267267 _ , err := c .cs .Firewall .CreateRoutingFirewallRule (p )
268- if err != nil && ! c .isIgnorableError (err ) {
268+ if err != nil && ! c .isIgnorableFirewallRuleError (err ) {
269269 return errors .Wrapf (err , "failed creating routing firewall rule for network ID %s protocol %s" , isoNet .Spec .ID , proto )
270270 }
271271 return nil
@@ -278,7 +278,7 @@ func (c *client) createFirewallRule(isoNet *infrav1.CloudStackIsolatedNetwork, p
278278 p .SetIcmpcode (- 1 )
279279 }
280280 _ , err := c .cs .Firewall .CreateEgressFirewallRule (p )
281- if err != nil && ! c .isIgnorableError (err ) {
281+ if err != nil && ! c .isIgnorableFirewallRuleError (err ) {
282282 return errors .Wrapf (err , "failed creating egress firewall rule for network ID %s protocol %s" , isoNet .Spec .ID , proto )
283283 }
284284 return nil
@@ -292,7 +292,7 @@ const (
292292)
293293
294294// Helper function to check if an error is ignorable
295- func (c * client ) isIgnorableError (err error ) bool {
295+ func (c * client ) isIgnorableFirewallRuleError (err error ) bool {
296296 errorMsg := strings .ToLower (err .Error ())
297297 return strings .Contains (errorMsg , ErrAlreadyExists ) ||
298298 strings .Contains (errorMsg , ErrRuleConflict ) ||
0 commit comments