MCPcopy Create free account
hub / github.com/apache/cloudstack / save_iptables

Function save_iptables

systemvm/debian/opt/cloud/bin/cs/CsHelper.py:213–223  ·  view source on GitHub ↗

Execute command

(command, iptables_file)

Source from the content-addressed store, hash-verified

211
212
213def save_iptables(command, iptables_file):
214 """ Execute command """
215 logging.debug("Saving iptables for %s" % command)
216
217 result = execute(command)
218 fIptables = open(iptables_file, "w+")
219
220 for line in result:
221 fIptables.write(line)
222 fIptables.write("\n")
223 fIptables.close()
224
225
226def execute2(command, wait=True):

Callers

nothing calls this directly

Calls 4

debugMethod · 0.80
executeFunction · 0.70
writeMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected