import logging


def get_mac_from_port(port, neutronclient):
    """Get mac address from port, with tenacity due to openstack async.

    :param port: neutron port
    :type port: neutron port
    :param neutronclient: Authenticated neutronclient
    :type neutronclient: neutronclient.Client object
    :returns: mac address
    :rtype: string
    """
    logging.info("Trying to get mac address from port:"
                 "{}".format(port['port']['id']))
    refresh_port = neutronclient.show_port(port['port']['id'])
    return refresh_port['port']['mac_address']