'Return the device path reported by the Cinder API.
:param volume: The Cinder ``Volume`` which is attached.
:returns: ``FilePath`` of the device created by the virtio_blk
driver.'

def _get_device_path_api(self, volume):

    if volume.attachments:
        attachment = volume.attachments[0]
        if (len(volume.attachments) > 1):
            Message.new(message_type=u'flocker:node:agents:blockdevice:openstack:get_device_path:unexpected_multiple_attachments', volume_id=unicode(volume.id), attachment_devices=u','.join((unicode(a['device']) for a in volume.attachments))).write()
    else:
        raise UnattachedVolume(volume.id)
    return FilePath(attachment['device'])
