class NotFound(SdsException): message = _("Resource could not be found.") code = 404 safe = True
class DeviceUnavailable(Invalid): message = _("The device in the path %(path)s is unavailable: %(reason)s")
class InvalidUUID(Invalid): message = _("Expected a uuid but received %(uuid)s.")
class AdminRequired(NotAuthorized): message = _("User does not have admin privileges")
class ServiceUnavailable(Invalid): message = _("Service is unavailable at this time.")
class HostBinaryNotFound(NotFound): message = _("Could not find binary %(binary)s on host %(host)s.")
class MalformedRequestBody(SdsException): message = _("Malformed message body: %(reason)s")
class InvalidContentType(Invalid): message = _("Invalid content type %(content_type)s.")
class InvalidHost(Invalid): message = _("Invalid host: %(reason)s")
class InvalidResults(Invalid): message = _("The results are invalid.")
class InvalidInput(Invalid): message = _("Invalid input received: %(reason)s")
class SfJsonEncodeFailure(SdsException): message = _("Failed to load data into json format")
class Invalid(SdsException): message = _("Unacceptable parameters.") code = 400
class PolicyNotAuthorized(NotAuthorized): message = _("Policy doesn't allow %(action)s to be performed.")
class ServiceNotFound(NotFound): message = _("Service %(service_id)s could not be found.")
class InvalidParameterValue(Invalid): message = _("%(err)s")
class HostNotFound(NotFound): message = _("Host %(host)s could not be found.")
class InvalidAuthKey(Invalid): message = _("Invalid auth key: %(reason)s")
class FileNotFound(NotFound): message = _("File %(file_path)s could not be found.")
class InvalidConfigurationValue(Invalid): message = _('Value "%(value)s" is not valid for ' 'configuration option "%(option)s"')
class ConfigNotFound(NotFound): message = _("Could not find config at %(path)s")
class NotAuthorized(SdsException): message = _("Not authorized.") code = 403