multi package

Submodules

multi.master module

With this module we create the master REST server to manage the distributed topologies

multi.master.detect_hosts()[source]

Broadcast the POST request to the ‘detect_hosts’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.generate_traffic()[source]

Broadcast the POST request to the ‘generate_traffic’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.get_flows()[source]

Broadcast the POST request to the ‘get_flows’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.get_switches()[source]

Broadcast the POST request to the ‘get_switches’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.init()[source]

Broadcast the POST request to the ‘init’ endpoint of the workers Aggregate the responses

Args:
controller_ip_address (str): The IP address of the controller controller_of_port (int): The OpenFlow port of the controller switch_type (str): The type of soft switch to use for the emulation topo_type (str): The type of the topology we want to build topo_size (int): The size of the topology we want to build group_size (int): The number of switches in a gorup for gradual bootup group_delay (int): The delay between the bootup of each group hosts_per_switch (int): The number of hosts connected to each switch
Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.ping_all()[source]

Broadcast the POST request to the ‘ping_all’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.rest_start()[source]

Parse the command line arguments and start the master server

multi.master.start()[source]

Broadcast the POST request to the ‘start’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests
multi.master.stop()[source]

Broadcast the POST request to the ‘stop’ endpoint of the workers Aggregate the responses

Returns:
requests.models.Response: An HTTP Response with the aggregated status codes and bodies of the broadcasted requests

multi.worker module

Module contents