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

Function can_bridge_firewall

scripts/vm/network/security_group.py:59–79  ·  view source on GitHub ↗
(privnic)

Source from the content-addressed store, hash-verified

57
58
59def can_bridge_firewall(privnic):
60 try:
61 execute("which iptables")
62 except:
63 print("no iptables on your host machine")
64 sys.exit(1)
65
66 try:
67 execute("which ebtables")
68 except:
69 print("no ebtables on your host machine")
70 sys.exit(2)
71
72
73 if not os.path.exists(logpath):
74 os.makedirs(logpath)
75
76 cleanup_rules_for_dead_vms()
77 cleanup_rules()
78
79 return True
80
81
82def get_libvirt_connection():

Callers 1

security_group.pyFile · 0.85

Calls 4

cleanup_rulesFunction · 0.85
executeFunction · 0.70
existsMethod · 0.65

Tested by

no test coverage detected