'Return details about the volume
:param:
name : Name of the volume
:return: Details about the volume. None if not found.
:rtype: dict'

def get_volume(self):

    volume_info = netapp_utils.zapi.NaElement('volume-get-iter')
    volume_attributes = netapp_utils.zapi.NaElement('volume-attributes')
    volume_id_attributes = netapp_utils.zapi.NaElement('volume-id-attributes')
    volume_id_attributes.add_new_child('name', self.name)
    volume_attributes.add_child_elem(volume_id_attributes)
    query = netapp_utils.zapi.NaElement('query')
    query.add_child_elem(volume_attributes)
    volume_info.add_child_elem(query)
    result = self.server.invoke_successfully(volume_info, True)
    return_value = None
    if (result.get_child_by_name('num-records') and (int(result.get_child_content('num-records')) >= 1)):
        volume_attributes = result.get_child_by_name('attributes-list').get_child_by_name('volume-attributes')
        volume_space_attributes = volume_attributes.get_child_by_name('volume-space-attributes')
        current_size = volume_space_attributes.get_child_content('size')
        volume_state_attributes = volume_attributes.get_child_by_name('volume-state-attributes')
        current_state = volume_state_attributes.get_child_content('state')
        is_online = None
        if (current_state == 'online'):
            is_online = True
        elif (current_state == 'offline'):
            is_online = False
        return_value = {'name': self.name, 'size': current_size, 'is_online': is_online}
    return return_value
