cinder.message.message_field
Module¶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'))¶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')¶SCHEDULE_ALLOCATE_VOLUME
= ('001', u'schedule allocate 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.'))¶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']}¶FAILED_TO_UPLOAD_VOLUME
= ('004', u'Failed to upload volume to image at backend.')¶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.')¶UNKNOWN_ERROR
= ('001', u'An unknown error occurred.')¶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.