'Delete the given metadata item from a volume.'

@wrap_check_policy
def delete_volume_metadata(self, context, volume, key, meta_type=common.METADATA_TYPES.user):

    if (volume.status in ('maintenance', 'uploading')):
        msg = (_('Deleting    volume    metadata    is    not    allowed    for    volumes    in    %s    status.') % volume.status)
        LOG.info(msg, resource=volume)
        raise exception.InvalidVolume(reason=msg)
    self.db.volume_metadata_delete(context, volume.id, key, meta_type)
    LOG.info('Delete    volume    metadata    completed    successfully.', resource=volume)
