Beispiel #1
0
def test_start_task_on_instances(cluster, task):
    instance_ids = ['fe1502b3-9fc1-4f7e-bd4d-c5dc45f20125']
    env_vars = [{'name': 'hey', 'value': 'brendan'}]
    resp = ecs.start_task_on_instances(cluster, task, instance_ids, env_vars)
    tasks = resp['tasks']
    for task in tasks:
        resp = ecs.stop_task(cluster, ecs.get_id_from_arn(task['taskArn']))
        print "STOPPED:\n" + str(resp)
Beispiel #2
0
def test_start_task_on_instances(cluster, task):
	instance_ids = ['fe1502b3-9fc1-4f7e-bd4d-c5dc45f20125']
	env_vars = [
		{
			'name': 'hey',
			'value': 'brendan'
		}
	] 
	resp = ecs.start_task_on_instances(cluster, 
		task, 
		instance_ids,
		env_vars)
	tasks = resp['tasks']
	for task in tasks:
		resp = ecs.stop_task(cluster, ecs.get_id_from_arn(task['taskArn']))
		print "STOPPED:\n" + str(resp)
Beispiel #3
0
def test_run_task_on_any_instance(cluster, task):
    resp = ecs.run_task_on_any_instance(cluster, task, 1)
    task_arn = resp['tasks'][0]['taskArn']
    resp = ecs.stop_task(cluster, ecs.get_id_from_arn(task_arn))
Beispiel #4
0
def test_run_task_on_any_instance(cluster, task):
	resp = ecs.run_task_on_any_instance(cluster, task, 1)
	task_arn = resp['tasks'][0]['taskArn']
	resp = ecs.stop_task(cluster, ecs.get_id_from_arn(task_arn))