예제 #1
0
def experiment(bw, module):
	pairs = [('h1','h8')]
	flows = {
		15: [(i,j,bw) for i,j in pairs]
	}

	net = fat_tree.create_net()

	scenario = {
		'net': net,
		'flows': flows
	}

	controller = {
		'objective': module.objective
	}

	logs = start(scenario, controller)
	return results(logs)
예제 #2
0
def experiment():

    hosts = ['h{0}'.format(i+1) for i in range(8)]
    pairs = itertools.combinations(hosts, 2)
    flows = {
	15: [(i,j,'4m') for i,j in pairs]
    }

    for module in [shortest_path]:
	net = fat_tree.create_net()

	scenario = {
	    'net': net,
	    'flows': flows
	}

	controller = {
	    'objective': module.objective
	}

	logs = start(scenario, controller)
	print module.__name__
	results(logs)