(privnic)
| 57 | |
| 58 | |
| 59 | def 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 | |
| 82 | def get_libvirt_connection(): |
no test coverage detected