# Path: os_vif/exception.py
# class ExceptionBase(Exception):
# class LibraryNotInitialized(ExceptionBase):
# class NoMatchingPlugin(ExceptionBase):
# class NoMatchingPortProfileClass(ExceptionBase):
# class NoSupportedPortProfileVersion(ExceptionBase):
# class NoMatchingVIFClass(ExceptionBase):
# class NoSupportedVIFVersion(ExceptionBase):
# class PlugException(ExceptionBase):
# class UnplugException(ExceptionBase):
# class NetworkMissingPhysicalNetwork(ExceptionBase):
# class NetworkInterfaceNotFound(ExceptionBase):
# class NetworkInterfaceTypeNotDefined(ExceptionBase):
# class ExternalImport(ExceptionBase):
# class NotImplementedForOS(ExceptionBase):
#     def __init__(self, message=None, **kwargs):
#     def format_message(self):
# 
# Path: os_vif/internal/ip/linux/impl_pyroute2.py
# LOG = logging.getLogger(__name__)
# class PyRoute2(ip_command.IpCommand):
#     def _ip_link(self, ip, command, check_exit_code, **kwargs):
#     def set(self, device, check_exit_code=None, state=None, mtu=None,
#             address=None, promisc=None, master=None):
#     def lookup_interface(self, ip, link):
#     def add(self, device, dev_type, check_exit_code=None, peer=None, link=None,
#             vlan_id=None, ageing=None):
#     def delete(self, device, check_exit_code=None):
#     def exists(self, device):
# 
# Path: os_vif/tests/unit/base.py
# class TestCase(testtools.TestCase):


from unittest import mock
from pyroute2 import iproute
from pyroute2.netlink import exceptions as ipexc
from pyroute2.netlink.rtnl import ifinfmsg
from os_vif import exception
from os_vif.internal.ip.linux import impl_pyroute2
from os_vif.tests.unit import base
# 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.





class TestIpCommand(base.TestCase):

    ERROR_CODE = 40
    OTHER_ERROR_CODE = 50
    DEVICE = 'device'
    MTU = 1500
    MAC = 'ca:fe:ca:fe:ca:fe'
    UP = 'up'
    TYPE_VETH = 'veth'
    TYPE_VLAN = 'vlan'
    TYPE_BRIDGE = 'bridge'
    LINK = 'device2'

# Path: os_vif/exception.py
# class ExceptionBase(Exception):
# class LibraryNotInitialized(ExceptionBase):
# class NoMatchingPlugin(ExceptionBase):
# class NoMatchingPortProfileClass(ExceptionBase):
# class NoSupportedPortProfileVersion(ExceptionBase):
# class NoMatchingVIFClass(ExceptionBase):
# class NoSupportedVIFVersion(ExceptionBase):
# class PlugException(ExceptionBase):
# class UnplugException(ExceptionBase):
# class NetworkMissingPhysicalNetwork(ExceptionBase):
# class NetworkInterfaceNotFound(ExceptionBase):
# class NetworkInterfaceTypeNotDefined(ExceptionBase):
# class ExternalImport(ExceptionBase):
# class NotImplementedForOS(ExceptionBase):
#     def __init__(self, message=None, **kwargs):
#     def format_message(self):
# 
# Path: os_vif/internal/ip/linux/impl_pyroute2.py
# LOG = logging.getLogger(__name__)
# class PyRoute2(ip_command.IpCommand):
#     def _ip_link(self, ip, command, check_exit_code, **kwargs):
#     def set(self, device, check_exit_code=None, state=None, mtu=None,
#             address=None, promisc=None, master=None):
#     def lookup_interface(self, ip, link):
#     def add(self, device, dev_type, check_exit_code=None, peer=None, link=None,
#             vlan_id=None, ageing=None):
#     def delete(self, device, check_exit_code=None):
#     def exists(self, device):
# 
# Path: os_vif/tests/unit/base.py
# class TestCase(testtools.TestCase):


# Path: os_vif/tests/unit/internal/ip/linux/test_impl_pyroute2.py
from unittest import mock
from pyroute2 import iproute
from pyroute2.netlink import exceptions as ipexc
from pyroute2.netlink.rtnl import ifinfmsg
from os_vif import exception
from os_vif.internal.ip.linux import impl_pyroute2
from os_vif.tests.unit import base

# 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.





class TestIpCommand(base.TestCase):

    ERROR_CODE = 40
    OTHER_ERROR_CODE = 50
    DEVICE = 'device'
    MTU = 1500
    MAC = 'ca:fe:ca:fe:ca:fe'
    UP = 'up'
    TYPE_VETH = 'veth'
    TYPE_VLAN = 'vlan'
    TYPE_BRIDGE = 'bridge'
    LINK = 'device2'

    VLAN_ID = 14