Debian Codegraph @

vif_plug_ovs/exception.py

raw symbols SCIP
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13 from os_vif.i18n import _
14
15 from os_vif import exception as osv_exception
16
17
18 class AgentError(osv_exception.ExceptionBase):
19 msg_fmt = _('Error during following call to agent: %(method)s')
20
21
22 class MissingPortProfile(osv_exception.ExceptionBase):
23 msg_fmt = _('A port profile is mandatory for the OpenVSwitch plugin')
24
25
26 class WrongPortProfile(osv_exception.ExceptionBase):
27 msg_fmt = _('Port profile %(profile)s is not a subclass '
28 'of VIFPortProfileOpenVSwitch')
29
30
31 class RepresentorNotFound(osv_exception.ExceptionBase):
32 msg_fmt = _('Failed getting representor port for PF %(ifname)s with '
33 '%(vf_num)s')
34
35
36 class PciDeviceNotFoundById(osv_exception.ExceptionBase):
37 msg_fmt = _("PCI device %(id)s not found")
38
39
40 class TapCreationNotSupported(osv_exception.ExceptionBase):
41 msg_fmt = _('Tap device creation requested for unsupported VIF type. '
42 'create_tap is only supported for VIFOpenVSwitch, got '
43 '%(vif_type)s')