glance.common.exception module

Glance exception subclasses

exception glance.common.exception.AuthBadRequest(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Connect error/bad request to Auth service at URL %(url)s.'
exception glance.common.exception.AuthUrlNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Auth service at URL %(url)s not found.'
exception glance.common.exception.AuthorizationFailure(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Authorization failed.'
exception glance.common.exception.AuthorizationRedirect(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Redirecting to %(uri)s for authorization.'
exception glance.common.exception.BadAuthStrategy(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Incorrect auth strategy, expected "%(expected)s" but received "%(received)s"'
exception glance.common.exception.BadDriverConfiguration(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Driver %(driver_name)s could not be configured correctly. Reason: %(reason)s'
exception glance.common.exception.BadRegistryConnectionConfiguration(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Registry was not configured correctly on API server. Reason: %(reason)s'
exception glance.common.exception.BadStoreUri(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The Store URI was malformed.'
exception glance.common.exception.BadTaskConfiguration(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Task was not configured properly'
exception glance.common.exception.ClientConfigurationError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'There was an error configuring the client.'
exception glance.common.exception.ClientConnectionError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'There was an error connecting to a server'
exception glance.common.exception.Conflict(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'An object with the same identifier is currently being operated on.'
exception glance.common.exception.Duplicate(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'An object with the same identifier already exists.'
exception glance.common.exception.DuplicateLocation(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'The location %(location)s already exists'
exception glance.common.exception.FailedToGetScrubberJobs(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Scrubber encountered an error while trying to fetch scrub jobs.'
exception glance.common.exception.Forbidden(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'You are not authorized to complete %(action)s action.'
exception glance.common.exception.ForbiddenPublicImage(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'You are not authorized to complete this action.'
exception glance.common.exception.GlanceException(message=None, *args, **kwargs)[source]

Bases: Exception

Base Glance Exception

To correctly use this class, inherit from it and define a ‘message’ property. That message will get printf’d with the keyword arguments provided to the constructor.

message = 'An unknown exception occurred'
exception glance.common.exception.ImageLocationLimitExceeded(*args, **kwargs)[source]

Bases: glance.common.exception.LimitExceeded

message = 'The limit has been exceeded on the number of allowed image locations. Attempted: %(attempted)s, Maximum: %(maximum)s'
exception glance.common.exception.ImageMemberLimitExceeded(*args, **kwargs)[source]

Bases: glance.common.exception.LimitExceeded

message = 'The limit has been exceeded on the number of allowed image members for this image. Attempted: %(attempted)s, Maximum: %(maximum)s'
exception glance.common.exception.ImageNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'Image with the given id %(image_id)s was not found'
exception glance.common.exception.ImagePropertyLimitExceeded(*args, **kwargs)[source]

Bases: glance.common.exception.LimitExceeded

message = 'The limit has been exceeded on the number of allowed image properties. Attempted: %(attempted)s, Maximum: %(maximum)s'
exception glance.common.exception.ImageSizeLimitExceeded(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The provided image is too large.'
exception glance.common.exception.ImageTagLimitExceeded(*args, **kwargs)[source]

Bases: glance.common.exception.LimitExceeded

message = 'The limit has been exceeded on the number of allowed image tags. Attempted: %(attempted)s, Maximum: %(maximum)s'
exception glance.common.exception.ImportTaskError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.TaskException, glance.common.exception.Invalid

message = 'An import task exception occurred'
exception glance.common.exception.Invalid(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Data supplied was not valid.'
exception glance.common.exception.InvalidContentType(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Invalid content type %(content_type)s'
exception glance.common.exception.InvalidDataMigrationScript(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = "Invalid data migration script '%(script)s'. A valid data migration script must implement functions 'has_migrations' and 'migrate'."
exception glance.common.exception.InvalidFilterOperatorValue(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Unable to filter using the specified operator.'
exception glance.common.exception.InvalidFilterRangeValue(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Unable to filter using the specified range.'
exception glance.common.exception.InvalidImageStatusTransition(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Image status transition from %(cur_status)s to %(new_status)s is not allowed'
exception glance.common.exception.InvalidObject(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = "Provided object does not match schema '%(schema)s': %(reason)s"
exception glance.common.exception.InvalidOptionValue(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Invalid value for option %(option)s: %(value)s'
exception glance.common.exception.InvalidParameterValue(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = "Invalid value '%(value)s' for parameter '%(param)s': %(extra_msg)s"
exception glance.common.exception.InvalidPropertyProtectionConfiguration(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Invalid configuration in property protection file.'
exception glance.common.exception.InvalidRedirect(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Received invalid HTTP redirect.'
exception glance.common.exception.InvalidSortDir(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Sort direction supplied was not valid.'
exception glance.common.exception.InvalidSortKey(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Sort key supplied was not valid.'
exception glance.common.exception.InvalidSwiftStoreConfiguration(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Invalid

message = 'Invalid configuration in glance-swift conf file.'
exception glance.common.exception.InvalidTaskStatus(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.TaskException, glance.common.exception.Invalid

message = 'Provided status of task is unsupported: %(status)s'
exception glance.common.exception.InvalidTaskStatusTransition(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.TaskException, glance.common.exception.Invalid

message = 'Status transition from %(cur_status)s to %(new_status)s is not allowed'
exception glance.common.exception.InvalidTaskType(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.TaskException, glance.common.exception.Invalid

message = 'Provided type of task is unsupported: %(type)s'
exception glance.common.exception.LimitExceeded(*args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The request returned a 413 Request Entity Too Large. This generally means that rate limiting or a quota threshold was breached.\n\nThe response body:\n%(body)s'
exception glance.common.exception.MaxRedirectsExceeded(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Maximum redirects (%(redirects)s) was exceeded.'
exception glance.common.exception.MetadefDuplicateNamespace(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'The metadata definition namespace=%(namespace_name)s already exists.'
exception glance.common.exception.MetadefDuplicateObject(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'A metadata definition object with name=%(object_name)s already exists in namespace=%(namespace_name)s.'
exception glance.common.exception.MetadefDuplicateProperty(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'A metadata definition property with name=%(property_name)s already exists in namespace=%(namespace_name)s.'
exception glance.common.exception.MetadefDuplicateResourceType(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'A metadata definition resource-type with name=%(resource_type_name)s already exists.'
exception glance.common.exception.MetadefDuplicateResourceTypeAssociation(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'The metadata definition resource-type association of resource-type=%(resource_type_name)s to namespace=%(namespace_name)s already exists.'
exception glance.common.exception.MetadefDuplicateTag(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Duplicate

message = 'A metadata tag with name=%(name)s already exists in namespace=%(namespace_name)s. (Please note that metadata tag names are case insensitive).'
exception glance.common.exception.MetadefForbidden(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'You are not authorized to complete this action.'
exception glance.common.exception.MetadefIntegrityError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'The metadata definition %(record_type)s with name=%(record_name)s not deleted. Other records still refer to it.'
exception glance.common.exception.MetadefNamespaceNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'Metadata definition namespace=%(namespace_name)s was not found.'
exception glance.common.exception.MetadefObjectNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'The metadata definition object with name=%(object_name)s was not found in namespace=%(namespace_name)s.'
exception glance.common.exception.MetadefPropertyNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'The metadata definition property with name=%(property_name)s was not found in namespace=%(namespace_name)s.'
exception glance.common.exception.MetadefResourceTypeAssociationNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'The metadata definition resource-type association of resource-type=%(resource_type_name)s to namespace=%(namespace_name)s, was not found.'
exception glance.common.exception.MetadefResourceTypeNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'The metadata definition resource-type with name=%(resource_type_name)s, was not found.'
exception glance.common.exception.MetadefTagNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.NotFound

message = 'The metadata definition tag with name=%(name)s was not found in namespace=%(namespace_name)s.'
exception glance.common.exception.MissingCredentialError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Missing required credential: %(required)s'
exception glance.common.exception.MultipleChoices(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The request returned a 302 Multiple Choices. This generally means that you have not included a version indicator in a request URI.\n\nThe body of response returned:\n%(body)s'
exception glance.common.exception.NoServiceEndpoint(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Response from Keystone does not contain a Glance endpoint.'
exception glance.common.exception.NotAuthenticated(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'You are not authenticated.'
exception glance.common.exception.NotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'An object with the specified identifier was not found.'
exception glance.common.exception.ProtectedImageDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Image %(image_id)s is protected and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefNamespaceDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition namespace %(namespace)s is protected and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefNamespacePropDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition property %(property_name)s is protected and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefObjectDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition object %(object_name)s is protected and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefResourceTypeAssociationDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition resource-type-association %(resource_type)s is protected and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefResourceTypeSystemDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition resource-type %(resource_type_name)s is a seeded-system type and cannot be deleted.'
exception glance.common.exception.ProtectedMetadefTagDelete(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = 'Metadata definition tag %(tag_name)s is protected and cannot be deleted.'
exception glance.common.exception.RPCError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = '%(cls)s exception was raised in the last rpc call: %(val)s'
exception glance.common.exception.ReadonlyProperty(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = "Attribute '%(property)s' is read-only."
exception glance.common.exception.RedirectException(url)[source]

Bases: Exception

exception glance.common.exception.RegionAmbiguity(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = "Multiple 'image' service matches for region %(region)s. This generally means that a region is required and you have not supplied one."
exception glance.common.exception.ReservedProperty(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.Forbidden

message = "Attribute '%(property)s' is reserved."
exception glance.common.exception.SIGHUPInterrupt(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'System SIGHUP signal received.'
exception glance.common.exception.SchemaLoadError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Unable to load schema: %(reason)s'
exception glance.common.exception.ServerError(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The request returned 500 Internal Server Error.'
exception glance.common.exception.ServiceUnavailable(*args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The request returned 503 Service Unavailable. This generally occurs on service overload or other transient outage.'
exception glance.common.exception.StorageQuotaFull(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The size of the data %(image_size)s will exceed the limit. %(remaining)s bytes remaining.'
exception glance.common.exception.TaskException(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'An unknown task exception occurred'
exception glance.common.exception.TaskNotFound(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.TaskException, glance.common.exception.NotFound

message = 'Task with the given id %(task_id)s was not found'
exception glance.common.exception.UnexpectedStatus(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'The request returned an unexpected status: %(status)s.\n\nThe response body:\n%(body)s'
exception glance.common.exception.UploadException(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Image upload problem: %s'
exception glance.common.exception.WorkerCreationFailure(message=None, *args, **kwargs)[source]

Bases: glance.common.exception.GlanceException

message = 'Server worker creation failed: %(reason)s.'