'Find allocations for specified host'

def find_allocations(self, hostname):

    alloc_cnt = 0
    url = ('/storage/arrays/%s/allocations' % self._get_ise_globalid())
    resp = self._send_cmd('GET', url, {'hostname': hostname})
    status = resp['status']
    if (status != 200):
        LOG.error('Failed    to    get    allocation    information:    %(host)s    (%(status)d)!', {'host': hostname, 'status': status})
        RaiseXIODriverException()
    allocation_tree = etree.fromstring(resp['content'])
    for allocation in allocation_tree.iter():
        if (allocation.tag != 'allocation'):
            continue
        alloc_cnt += 1
    return alloc_cnt
