'Retrieve masking view list for a volume.
:param array: array serial number
:param device_id: the volume device id
:param host: the host
:param storage_group_list: the storage group list to use
:returns: masking view list'

def get_masking_views_from_volume(self, array, device_id, host, storage_group_list=None):

    LOG.debug('Getting    masking    views    from    volume')
    maskingview_list = []
    host_compare = False
    if (not storage_group_list):
        storage_group_list = self.rest.get_storage_groups_from_volume(array, device_id)
        host_compare = (True if host else False)
    for sg in storage_group_list:
        mvs = self.rest.get_masking_views_from_storage_group(array, sg)
        for mv in mvs:
            if host_compare:
                if (host.lower() in mv.lower()):
                    maskingview_list.append(mv)
            else:
                maskingview_list.append(mv)
    return maskingview_list
