def nic_name_to_host(nic_name):
    """ helper function to translate the name of a network card into a valid host name"""
    from netifaces import ifaddresses, AF_INET
    host = ifaddresses(nic_name).setdefault(AF_INET, [{'addr': 'No IP addr'}])[
        0]['addr']
    return host
