continue
    		try:
    			if get.find('completed')!=-1:
				print '7-2.  ' + i + 'warm up completed'
				break
    		except:
			time.sleep(30)
        		continue
time.sleep(10)
#8.Start test
url_st = 'http://' + dns_lg +'/begin-phase-2?dns='+ elb_name + '&testId=Baiyangw'
while True:
    try:
    	urllib2.urlopen(url_st)
	print '7-3.test started'
        break
    except:
    	print 'Again!'
        continue
url_final ='http://' + dns_lg + '/view-logs?name=result_baiyangw_Baiyangw.txt'
print url_final
#9.Sleep
time.sleep(6060)
#10.Shutdown
asg.shutdown_instances()
time.sleep(10)
asg.delete()
time.sleep(10)
lc.delete()
time.sleep(10)