Hides expired bookings in the "My Bookings" Page
[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
18 class ModelValidationException(Exception):
19     """
20     Validation before saving model returned issues
21     """
22     pass
23
24
25 class ResourceAvailabilityException(ResourceProvisioningException):
26     """
27     Requested resources are not *currently* available
28     """
29     pass
30
31
32 class ResourceExistenceException(ResourceAvailabilityException):
33     """
34     Requested resources do not exist or do not match any known resources
35     """
36     pass
37
38
39 class NonUniqueHostnameException(Exception):
40     pass
41
42
43 class InvalidHostnameException(Exception):
44     pass
45
46
47 class InvalidVlanConfigurationException(Exception):
48     pass
49
50
51 class NetworkExistsException(Exception):
52     pass