class MasterNGResizeNotSupported(NotSupported): message = _("Resizing a master nodegroup is not supported.")
class NotAuthorized(MagnumException): message = _("Not authorized.") code = 403
class InvalidMAC(Invalid): message = _("Expected a MAC address but received %(mac)s.")
class Conflict(MagnumException): message = _('Conflict.') code = 409
class InvalidParameterValue(Invalid): message = _("%(err)s")
class GetClusterSizeFailed(MagnumException): message = _("Failed to get the size of cluster from '%(discovery_url)s'.")
class InvalidCsr(Invalid): message = _("Received invalid csr %(csr)s.")
class ObjectNotFound(MagnumException): message = _("The %(name)s %(id)s could not be found.") code = 404
class ProjectNotFound(ObjectNotFound): message = _("The %(name)s %(id)s could not be found.")
class CreateMasterNodeGroup(NotSupported): message = _("Creating master nodegroups is currently not supported.")
class NgOperationInProgress(Invalid): message = _("Nodegroup %(nodegroup)s already has an operation in " "progress.")
class NodeGroupInvalidInput(Conflict): message = _("%(attr)s for %(nodegroup)s is invalid (%(expl)s).")
class DeletingDefaultNGNotSupported(NotSupported): message = _("Deleting a default nodegroup is not supported.")
class NGResizeOutBounds(Invalid): message = _("Resizing %(nodegroup)s outside the allowed range: " "min_node_count = %(min_nc)s, " "max_node_count = %(max_nc)s")
class InvalidClusterDiscoveryURL(Invalid): message = _("Invalid discovery URL '%(discovery_url)s'.")
class ResourceNotFound(ObjectNotFound): message = _("The %(name)s resource %(id)s could not be found.")
class InvalidClusterSize(Invalid): message = _("Expected cluster size %(expect_size)d but get cluster " "size %(size)d from '%(discovery_url)s'.")
class AuthorizationFailure(MagnumException): message = _("%(client)s connection failed. %(message)s") code = 403
class InvalidIdentity(Invalid): message = _("Expected an uuid or int but received %(identity)s.")
class Invalid(MagnumException): message = _("Unacceptable parameters.") code = 400
class InvalidSubnet(Invalid): message = _("Received invalid subnet %(subnet)s.")
class InvalidUUID(Invalid): message = _("Expected a uuid but received %(uuid)s.")
class ApiVersionsIntersect(Invalid): message = _("Version of %(name)s %(min_ver)s %(max_ver)s intersects " "with another versions.")
class InvalidName(Invalid): message = _("Expected a name but received %(name)s.")
class PatchError(Invalid): message = _("Couldn't apply patch '%(patch)s'. Reason: %(reason)s")
class InvalidDiscoveryURL(Invalid): message = _("Received invalid discovery URL '%(discovery_url)s' for " "discovery endpoint '%(discovery_endpoint)s'.")
class PolicyNotAuthorized(NotAuthorized): message = _("Policy doesn't allow %(action)s to be performed.")
class GetDiscoveryUrlFailed(MagnumException): message = _("Failed to get discovery url from '%(discovery_endpoint)s'.")
class ConfigInvalid(Invalid): message = _("Invalid configuration file. %(error_msg)s")
class NodeGroupNotFound(ResourceNotFound): message = _("Nodegroup %(nodegroup)s could not be found.")