Merge "Fix error in Booking cleanup task"
[pharos-tools.git] / dashboard / 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     """
13     Resources could not be provisioned
14     """
15     pass
16
17 class ModelValidationException(Exception):
18     """
19     Validation before saving model returned issues
20     """
21     pass
22
23 class ResourceAvailabilityException(ResourceProvisioningException):
24     """
25     Requested resources are not *currently* available
26     """
27     pass
28
29 class ResourceExistenceException(ResourceAvailabilityException):
30     """
31     Requested resources do not exist or do not match any known resources
32     """
33     pass
34
35
36 class NonUniqueHostnameException(Exception):
37     pass
38
39 class InvalidHostnameException(Exception):
40     pass
41
42 class InvalidVlanConfigurationException(Exception):
43     pass
44
45 class NetworkExistsException(Exception):
46     pass