Message Resource, Action, Detail and user visible message.
Use Resource, Action and Detail’s combination to indicate the Event in the format of:
EVENT: VOLUME_RESOURCE_ACTION_DETAIL
Also, use exception-to-detail mapping to decrease the workload of classifying event in cinder’s task code.
Action
¶Bases: object
ALL
= (('001', u'schedule allocate volume'), ('002', u'attach volume'), ('003', u'copy volume to image'), ('004', u'update attachment'), ('005', u'copy image to volume'), ('006', u'unmanage volume'), ('007', u'extend volume'), ('008', u'create volume from backend storage'))¶ATTACH_VOLUME
= ('002', u'attach volume')¶COPY_IMAGE_TO_VOLUME
= ('005', u'copy image to volume')¶COPY_VOLUME_TO_IMAGE
= ('003', u'copy volume to image')¶CREATE_VOLUME_FROM_BACKEND
= ('008', u'create volume from backend storage')¶EXTEND_VOLUME
= ('007', u'extend volume')¶SCHEDULE_ALLOCATE_VOLUME
= ('001', u'schedule allocate volume')¶UNMANAGE_VOLUME
= ('006', u'unmanage volume')¶UPDATE_ATTACHMENT
= ('004', u'update attachment')¶Detail
¶Bases: object
ALL
= (('001', u'An unknown error occurred.'), ('002', u'Driver is not initialized at present.'), ('003', u'Could not find any available weighted backend.'), ('004', u'Failed to upload volume to image at backend.'), ('005', u"Volume's attach mode is invalid."), ('006', u'Not enough quota resource for operation.'), ('007', u'Image used for creating volume exceeds available space.'), ('008', u'Unmanaging encrypted volumes is not supported.'), ('009', u'Compute service failed to extend volume.'), ('010', u'Volume Driver failed to extend volume.'), ('011', u'Image signature verification failed.'), ('012', u'Driver failed to create the volume.'))¶DRIVER_FAILED_CREATE
= ('012', u'Driver failed to create the volume.')¶DRIVER_FAILED_EXTEND
= ('010', u'Volume Driver failed to extend volume.')¶DRIVER_NOT_INITIALIZED
= ('002', u'Driver is not initialized at present.')¶EXCEPTION_DETAIL_MAPPINGS
= {('002', u'Driver is not initialized at present.'): ['DriverNotInitialized'], ('003', u'Could not find any available weighted backend.'): ['NoValidBackend'], ('005', u"Volume's attach mode is invalid."): ['InvalidVolumeAttachMode'], ('006', u'Not enough quota resource for operation.'): ['ImageLimitExceeded', 'BackupLimitExceeded', 'SnapshotLimitExceeded'], ('007', u'Image used for creating volume exceeds available space.'): ['ImageTooBig'], ('008', u'Unmanaging encrypted volumes is not supported.'): ['UnmanageEncVolNotSupported']}¶FAILED_TO_UPLOAD_VOLUME
= ('004', u'Failed to upload volume to image at backend.')¶NOTIFY_COMPUTE_SERVICE_FAILED
= ('009', u'Compute service failed to extend volume.')¶NOT_ENOUGH_SPACE_FOR_IMAGE
= ('007', u'Image used for creating volume exceeds available space.')¶NO_BACKEND_AVAILABLE
= ('003', u'Could not find any available weighted backend.')¶QUOTA_EXCEED
= ('006', u'Not enough quota resource for operation.')¶SIGNATURE_VERIFICATION_FAILED
= ('011', u'Image signature verification failed.')¶UNKNOWN_ERROR
= ('001', u'An unknown error occurred.')¶UNMANAGE_ENC_NOT_SUPPORTED
= ('008', u'Unmanaging encrypted volumes is not supported.')¶VOLUME_ATTACH_MODE_INVALID
= ('005', u"Volume's attach mode is invalid.")¶translate_action
(action_id)¶translate_detail
(detail_id)¶translate_detail_id
(exception, detail)¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.