blob: 25518e522d1fb7504211a9474cdf9a0c73e92b51 [file] [log] [blame]
Steve McIntyre94ef65e2015-09-25 01:08:14 +01001# Copyright 2014-2015 Linaro Limited
2# Authors: Dave Pigott <dave.pigot@linaro.org>,
3# Steve McIntyre <steve.mcintyre@linaro.org>
Dave Pigott9b73f3a2014-09-18 22:55:42 +01004#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18# MA 02110-1301, USA.
19
20class VlandError(Exception):
21 """
22 Base exception and error class for the vlan daemon
23 """
24
25
26class CriticalError(VlandError):
27 """
28 The critical error
29 """
Steve McIntyre4afdb9b2014-12-02 12:34:49 +000030
Steve McIntyreb01959f2016-03-22 17:02:39 +000031class NotFoundError(VlandError):
32 """
33 Couldn't find object
34 """
35
Steve McIntyre4afdb9b2014-12-02 12:34:49 +000036class InputError(VlandError):
37 """
38 Invalid input
39 """
40
Steve McIntyreaf0a71a2014-12-10 14:19:00 +000041class ConfigError(VlandError):
42 """
43 Invalid configuration
44 """
45
Steve McIntyre1427c142014-12-12 18:24:40 +000046class SocketError(VlandError):
47 """
48 Socket connection failure
49 """
50
Steve McIntyre26eaff32015-02-12 03:14:56 +000051class PExpectError(VlandError):
52 """
53 CLI communication failure
54 """
55
Steve McIntyreb01959f2016-03-22 17:02:39 +000056class Error:
57 OK = 0
58 FAILED = 1
59 NOTFOUND = 2