Esempio n. 1
0
def main(nstext, exp):
  # check the ns file for errors
  (passed,message) = remote_emulab.checkNS(nstext)

  if (not passed):
    print message
    print "checkNS failed, please fix the ns file and try again"
    return

  
  # start a new exp in non-batchmode
  print "starting a new exp..."
  remote_emulab.startexp(proj,exp,nstext)

  # wait for the exp to go active
  # by default times out in 10 minutes
  print "exp started, waiting for active..."
  remote_emulab.wait_for_active(proj,exp)

  #print "now active... getting links"
  links = remote_emulab.get_links(proj,exp)
  simple_links = remote_emulab.simplify_links(proj,exp,links)
Esempio n. 2
0

# did the parsing fail?
if (not passed):
  print message
  print "checkNS failed, please fix the ns file and try again"

else: 
  # start a new exp in non-batchmode
  print "starting a new exp..."
  remote_emulab.startexp(proj,exp,mynsfilestr)

  # wait for the exp to go active
  # by default times out in 10 minutes
  print "exp started, waiting for active..."
  remote_emulab.wait_for_active(proj,exp)

  print "now active... getting mapping"
  mapping = remote_emulab.get_mapping(proj,exp)
  print "mapping:  "+str(mapping)
  simple_mapping = get_ips(mapping)
  

  print " got mapping, getting links"
  print "links:  "+str(remote_emulab.get_links(proj,exp))

  # exit this code, go and do your expirament
  # when the exp is done we'll swap it out

  print "finished exp, swapping out"
  #remote_emulab.swapOUT(proj,exp)