# Path: os_vif/internal/ip/api.py
# LOG = logging.getLogger(__name__)
# 
# Path: vif_plug_linux_bridge/linux_net.py
# LOG = logging.getLogger(__name__)
# _IPTABLES_MANAGER = None
#     _IPTABLES_MANAGER = iptables_mgr
# def _set_device_mtu(dev, mtu):
# def _ip_bridge_cmd(action, params, device):
# def ensure_vlan_bridge(vlan_num, bridge, bridge_interface,
#                        net_attrs=None, mac_address=None,
#                        mtu=None):
# def _ensure_vlan_privileged(vlan_num, bridge_interface, mac_address, mtu):
# def ensure_bridge(bridge, interface, net_attrs=None, gateway=True,
#                   filtering=True, mtu=None):
# def _disable_ipv6(bridge):
# def _arp_filtering(bridge):
# def _update_bridge_routes(interface, bridge):
# def _ensure_bridge_privileged(bridge, interface, net_attrs, gateway,
#                               filtering=True, mtu=None):
# def _ensure_bridge_filtering(bridge, gateway):
# def configure(iptables_mgr):
# 
# Path: vif_plug_linux_bridge/privsep.py



from unittest import mock
from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
from oslo_log.fixture import logging_error as log_fixture
from os_vif.internal.ip.api import ip as ip_lib
from vif_plug_linux_bridge import linux_net
from vif_plug_linux_bridge import privsep
import fixtures
import testtools
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.






CONF = cfg.CONF


class LinuxNetTest(testtools.TestCase):

    def setUp(self):
        super(LinuxNetTest, self).setUp()

        privsep.vif_plug.set_client_mode(False)
        lock_path = self.useFixture(fixtures.TempDir()).path
        self.fixture = self.useFixture(
            config_fixture.Config(lockutils.CONF))

# Path: os_vif/internal/ip/api.py
# LOG = logging.getLogger(__name__)
# 
# Path: vif_plug_linux_bridge/linux_net.py
# LOG = logging.getLogger(__name__)
# _IPTABLES_MANAGER = None
#     _IPTABLES_MANAGER = iptables_mgr
# def _set_device_mtu(dev, mtu):
# def _ip_bridge_cmd(action, params, device):
# def ensure_vlan_bridge(vlan_num, bridge, bridge_interface,
#                        net_attrs=None, mac_address=None,
#                        mtu=None):
# def _ensure_vlan_privileged(vlan_num, bridge_interface, mac_address, mtu):
# def ensure_bridge(bridge, interface, net_attrs=None, gateway=True,
#                   filtering=True, mtu=None):
# def _disable_ipv6(bridge):
# def _arp_filtering(bridge):
# def _update_bridge_routes(interface, bridge):
# def _ensure_bridge_privileged(bridge, interface, net_attrs, gateway,
#                               filtering=True, mtu=None):
# def _ensure_bridge_filtering(bridge, gateway):
# def configure(iptables_mgr):
# 
# Path: vif_plug_linux_bridge/privsep.py



# Path: vif_plug_linux_bridge/tests/unit/test_linux_net.py
from unittest import mock
from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
from oslo_log.fixture import logging_error as log_fixture
from os_vif.internal.ip.api import ip as ip_lib
from vif_plug_linux_bridge import linux_net
from vif_plug_linux_bridge import privsep
import fixtures
import testtools

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.






CONF = cfg.CONF


class LinuxNetTest(testtools.TestCase):

    def setUp(self):
        super(LinuxNetTest, self).setUp()

        privsep.vif_plug.set_client_mode(False)
        lock_path = self.useFixture(fixtures.TempDir()).path
        self.fixture = self.useFixture(
            config_fixture.Config(lockutils.CONF))

        self.fixture.config(lock_path=lock_path,