def _compute_topic(topic, ctxt, host, instance):
 if (not host):
  if (not instance):
   raise exception.NovaException(_('No compute host specified'))
  host = instance['host']
  if (not host):
   raise exception.NovaException((_('Unable to find host for Instance %s') % instance['uuid']))
 return rpc.queue_get_for(ctxt, topic, host)

def _compute_topic ( topic , ctxt , host , instance ) : if ( not host ) : if ( not instance ) : raise exception . NovaException ( _ ( 'No compute host specified' ) ) host = instance [ 'host' ] if ( not host ) : raise exception . NovaException ( ( _ ( 'Unable to find host for Instance %s' ) % instance [ 'uuid' ] ) ) return rpc . queue_get_for ( ctxt , topic , host )
get the topic to use for a message .