def add_routing(app, port):
 logging.info('Waiting for application {} on port {} to be active.'.format(str(app), str(port)))
 if (not wait_on_app(port)):
  logging.warning('AppServer did not come up in time, for {}:{}.'.format(str(app), str(port)))
  return
 acc = appscale_info.get_appcontroller_client()
 appserver_ip = appscale_info.get_private_ip()
 while True:
  result = acc.add_routing_for_appserver(app, appserver_ip, port)
  if (result == AppControllerClient.NOT_READY):
   logging.info('AppController not yet ready to add routing.')
   time.sleep(ROUTING_RETRY_INTERVAL)
  else:
   break
 logging.info('Successfully established routing for {} on port {}'.format(app, port))

def add_routing ( app , port ) : logging . info ( 'Waiting for application {} on port {} to be active.' . format ( str ( app ) , str ( port ) ) ) if ( not wait_on_app ( port ) ) : logging . warning ( 'AppServer did not come up in time, for {}:{}.' . format ( str ( app ) , str ( port ) ) ) return acc = appscale_info . get_appcontroller_client ( ) appserver_ip = appscale_info . get_private_ip ( ) while True : result = acc . add_routing_for_appserver ( app , appserver_ip , port ) if ( result == AppControllerClient . NOT_READY ) : logging . info ( 'AppController not yet ready to add routing.' ) time . sleep ( ROUTING_RETRY_INTERVAL ) else : break logging . info ( 'Successfully established routing for {} on port {}' . format ( app , port ) )
tells the appcontroller to begin routing traffic to an appserver .