61df145033eca85d421abaae0edb3ede37e104fc
[laas.git] / src / dashboard / exceptions.py
1 ##############################################################################
2 # Copyright (c) 2018 Parker Berberian, Sawyer Bergeron, and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 class ResourceProvisioningException(Exception):
12     """Resources could not be provisioned."""
13
14     pass
15
16
17 class ModelValidationException(Exception):
18     """Validation before saving model returned issues."""
19
20     pass
21
22
23 class ResourceAvailabilityException(ResourceProvisioningException):
24     """Requested resources are not *currently* available."""
25
26     pass
27
28
29 class ResourceExistenceException(ResourceAvailabilityException):
30     """Requested resources do not exist or do not match any known resources."""
31
32     pass
33
34
35 class NonUniqueHostnameException(Exception):
36     pass
37
38
39 class InvalidHostnameException(Exception):
40     pass
41
42
43 class InvalidVlanConfigurationException(Exception):
44     pass
45
46
47 class NetworkExistsException(Exception):
48     pass
49
50
51 class BookingLengthException(Exception):
52     pass