'Returns wwns of online fc ports.
wwn of a certain port will not be included in the return list when it
is not present or down.'

def get_wwn_of_online_fc_ports(self, ports):

    wwns = set()
    ports_with_all_info = self.vnx.get_fc_port()
    for po in ports:
        online_list = [p for p in ports_with_all_info if ((p == po) and (p.link_status == 'Up') and (p.port_status == 'Online'))]
        wwns.update([p.wwn for p in online_list])
    return list(wwns)
