def find_guest_agent(base_dir):
    if CONF.xenserver.disable_agent:
        return False

    agent_rel_path = CONF.xenserver.agent_path
    agent_path = os.path.join(base_dir, agent_rel_path)
    if os.path.isfile(agent_path):
        # The presence of the guest agent
        # file indicates that this instance can
        # reconfigure the network from xenstore data,
        # so manipulation of files in /etc is not
        # required
        LOG.info(_LI('XenServer tools installed in this '
                     'image are capable of network injection.  '
                     'Networking files will not be'
                     'manipulated'))
        return True
    xe_daemon_filename = os.path.join(base_dir,
        'usr', 'sbin', 'xe-daemon')
    if os.path.isfile(xe_daemon_filename):
        LOG.info(_LI('XenServer tools are present '
                     'in this image but are not capable '
                     'of network injection'))
    else:
        LOG.info(_LI('XenServer tools are not '
                     'installed in this image'))
    return False
tries to locate a guest agent at the path
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/xenapi/agent.py/find_guest_agent