'Return a Volume object from the JSON-response dictionary.
:param  volume: The dictionary describing the volume.
:type   volume: ``dict``
:return: Volume object
:rtype: :class:`StorageVolume`'

def _to_storage_volume(self, volume):

    extra = {}
    extra['selfLink'] = volume.get('selfLink')
    extra['zone'] = self.ex_get_zone(volume['zone'])
    extra['status'] = volume.get('status')
    extra['creationTimestamp'] = volume.get('creationTimestamp')
    extra['description'] = volume.get('description')
    extra['sourceImage'] = volume.get('sourceImage')
    extra['sourceImageId'] = volume.get('sourceImageId')
    extra['sourceSnapshot'] = volume.get('sourceSnapshot')
    extra['sourceSnapshotId'] = volume.get('sourceSnapshotId')
    extra['options'] = volume.get('options')
    if ('licenses' in volume):
        lic_objs = self._licenses_from_urls(licenses=volume['licenses'])
        extra['licenses'] = lic_objs
    extra['type'] = volume.get('type', 'pd-standard').split('/')[(-1)]
    return StorageVolume(id=volume['id'], name=volume['name'], size=volume['sizeGb'], driver=self, extra=extra)
