コード例 #1
0
ファイル: webserver_exp.py プロジェクト: SeattleTestbed/attic
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)
コード例 #2
0
ファイル: sample_client.py プロジェクト: Ashmita89/attic
# check the ns file for errors
(passed,message) = remote_emulab.checkNS(mynsfilestr)




# 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))