'Find target WWNs via the masking view.
:param volume: volume to be attached
:param connector: the connector dict
:returns: list -- the target WWN list'

def get_target_wwns_from_masking_view(self, volume, connector):

    target_wwns = []
    host = connector['host']
    short_host_name = self.utils.get_host_short_name(host)
    extra_specs = self._initial_setup(volume)
    if self.utils.is_volume_failed_over(volume):
        extra_specs = self._get_replication_extra_specs(extra_specs, self.rep_config)
    array = extra_specs[utils.ARRAY]
    device_id = self._find_device_on_array(volume, extra_specs)
    masking_view_list = self.get_masking_views_from_volume(array, device_id, short_host_name)
    if (masking_view_list is not None):
        portgroup = self.get_port_group_from_masking_view(array, masking_view_list[0])
        target_wwns = self.rest.get_target_wwns(array, portgroup)
        LOG.info('Target    wwns    in    masking    view    %(maskingView)s:    %(targetWwns)s.', {'maskingView': masking_view_list[0], 'targetWwns': target_wwns})
    return target_wwns
