Merge "Search in /sys/class/net for network devices" into stable/juno
This commit is contained in:
commit
d343b68196
@ -51,7 +51,9 @@ from neutron.plugins.linuxbridge.common import constants as lconst
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
BRIDGE_NAME_PREFIX = "brq"
|
||||
BRIDGE_FS = "/sys/devices/virtual/net/"
|
||||
# NOTE(toabctl): Don't use /sys/devices/virtual/net here because not all tap
|
||||
# devices are listed here (i.e. when using Xen)
|
||||
BRIDGE_FS = "/sys/class/net/"
|
||||
BRIDGE_NAME_PLACEHOLDER = "bridge_name"
|
||||
BRIDGE_INTERFACES_FS = BRIDGE_FS + BRIDGE_NAME_PLACEHOLDER + "/brif/"
|
||||
DEVICE_NAME_PLACEHOLDER = "device_name"
|
||||
|
@ -446,7 +446,7 @@ class TestLinuxBridgeManager(base.BaseTestCase):
|
||||
exists_fn.return_value = True
|
||||
self.assertTrue(self.lbm.is_device_on_bridge("tap1"))
|
||||
exists_fn.assert_called_with(
|
||||
"/sys/devices/virtual/net/tap1/brport"
|
||||
"/sys/class/net/tap1/brport"
|
||||
)
|
||||
|
||||
def test_get_interface_details(self):
|
||||
|
Loading…
Reference in New Issue
Block a user