'Get the director ports\' wwns.
:param array: the array serial number
:param portgroup: portgroup
:returns: target_wwns -- the list of target wwns for the masking view'

def get_target_wwns(self, array, portgroup):

    target_wwns = []
    port_ids = self.get_port_ids(array, portgroup)
    for port in port_ids:
        port_info = self.get_port(array, port)
        if port_info:
            wwn = port_info['symmetrixPort']['identifier']
            target_wwns.append(wwn)
        else:
            LOG.error('Error    retrieving    port    %(port)s    from    portgroup    %(portgroup)s.', {'port': port, 'portgroup': portgroup})
    return target_wwns
