| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 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') |