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):
  LOG.info(_LI('XenServer tools installed in this image are capable of network injection.  Networking files will not bemanipulated'))
  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

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 ) : LOG . info ( _LI ( 'XenServer tools installed in this image are capable of network injection.  Networking files will not bemanipulated' ) ) 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 specificed by agent_rel_path .