Support bridge in cloud

Nat take advantage of that and the code is more simple.

Fix #761
This commit is contained in:
Julien Duponchelle committed 2016-11-04 17:32:16 +01:00
1 parent 1b3e47ce83
commit cf723962af
5 files changed
+80 -45

No files matched your search

+8
View File
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import aiohttp
import socket
@@ -163,6 +164,13 @@ def is_interface_up(interface):
return True
def is_interface_bridge(interface):
"""
:returns: True if interface is a bridge
"""
return os.path.exists(os.path.join("/sys/class/net/", interface, "bridge"))
def _check_windows_service(service_name):
import pywintypes