Initial commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
"""
|
||||
Service exceptions for resource allocation
|
||||
"""
|
||||
|
||||
|
||||
class ResourceAllocationError(Exception):
|
||||
"""Base exception for resource allocation errors"""
|
||||
pass
|
||||
|
||||
|
||||
class ResourceNotFoundError(ResourceAllocationError):
|
||||
"""Resource not found"""
|
||||
pass
|
||||
|
||||
|
||||
class SystemNotFoundError(ResourceAllocationError):
|
||||
"""System not found"""
|
||||
pass
|
||||
|
||||
|
||||
class GuardianNotFoundError(ResourceAllocationError):
|
||||
"""Guardian not found"""
|
||||
pass
|
||||
|
||||
|
||||
class AllocationError(ResourceAllocationError):
|
||||
"""Allocation failed"""
|
||||
pass
|
||||
|
||||
|
||||
class ValidationError(ResourceAllocationError):
|
||||
"""Validation failed"""
|
||||
pass
|
||||
|
||||
|
||||
class InsufficientBalanceError(ResourceAllocationError):
|
||||
"""Not enough remaining balance"""
|
||||
pass
|
||||
|
||||
|
||||
class CoreInCommonError(ResourceAllocationError):
|
||||
"""Cannot allocate Core to Common part"""
|
||||
pass
|
||||
|
||||
|
||||
class InvalidGuardianError(ResourceAllocationError):
|
||||
"""Guardian doesn't belong to specified System"""
|
||||
pass
|
||||
|
||||
|
||||
class ProjectMismatchError(ResourceAllocationError):
|
||||
"""Resource and System belong to different Projects"""
|
||||
pass
|
||||
|
||||
|
||||
class CoreAlreadyExistsError(ResourceAllocationError):
|
||||
"""Cannot create second Core for same Guardian"""
|
||||
pass
|
||||
Reference in New Issue
Block a user