Copilot commented on code in PR #12850:
URL: https://github.com/apache/cloudstack/pull/12850#discussion_r3970901932


##########
scripts/vm/network/security_group.py:
##########
@@ -55,6 +55,42 @@ def execute(cmd):
         logging.exception('Command exited non-zero: %s', cmd)
         raise
 
+def iptables_chain_exists(chain):
+    """Check if iptables chain exists."""
+    try:
+        check_output("iptables -S %s 2>/dev/null" % chain, shell=True)
+        return True

Review Comment:
   PR description says the new helpers use the existing `execute()` wrapper, 
but the implementation calls `check_output()` directly. Either update the 
description or refactor helpers to use `execute()` (or a shared wrapper) so 
logging/behavior is consistent across command execution in this file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to