'Find the host_lun_id for a volume in a masking view.
:param array: the array serial number
:param maskingview: the masking view name
:param device_id: the device ID
:returns: host_lun_id -- int'

def find_mv_connections_for_vol(self, array, maskingview, device_id):

    host_lun_id = None
    resource_name = ('%(maskingview)s/connections' % {'maskingview': maskingview})
    params = {'volume_id': device_id}
    connection_info = self.get_resource(array, SLOPROVISIONING, 'maskingview', resource_name=resource_name, params=params)
    if (not connection_info):
        LOG.error('Cannot    retrive    masking    view    connection    information    for    %(mv)s.', {'mv': maskingview})
    else:
        try:
            host_lun_id = connection_info['maskingViewConnection'][0]['host_lun_address']
            host_lun_id = int(host_lun_id, 16)
        except Exception as e:
            LOG.error('Unable    to    retrieve    connection    information    for    volume    %(vol)s    in    masking    view    %(mv)sException    received:    %(e)s.', {'vol': device_id, 'mv': maskingview, 'e': e})
    return host_lun_id
