miniworld.model.network.backends package

Subpackages

Submodules

miniworld.model.network.backends.AbstractConnection module

miniworld.model.network.backends.AbstractSwitch module

miniworld.model.network.backends.EmulationNodeNetworkBackend module

miniworld.model.network.backends.InterfaceFilter module

class miniworld.model.network.backends.InterfaceFilter.AllInterfaces(*args, **kwargs)[source]

Bases: miniworld.model.network.backends.InterfaceFilter.InterfaceFilter

get_interfaces(emulation_node_x, emulation_node_y)[source]
class miniworld.model.network.backends.InterfaceFilter.CoreInterfaces(*args, **kwargs)[source]

Bases: miniworld.model.network.backends.InterfaceFilter.InterfaceFilter

class miniworld.model.network.backends.InterfaceFilter.EqualInterfaceNumbers(*args, **kwargs)[source]

Bases: miniworld.model.network.backends.InterfaceFilter.InterfaceFilter

Assumes each node has the same number of interfaces. And that the interfaces are sorted!

get_interfaces(emulation_node_x, emulation_node_y)[source]
class miniworld.model.network.backends.InterfaceFilter.InterfaceFilter(*args, **kwargs)[source]
get_interfaces(emulation_node_x, emulation_node_y)[source]

emulation_node_x: EmulationNode emulation_node_y: EmulationNode

generator<(Interface, Interface)>

miniworld.model.network.backends.NetworkBackend module

miniworld.model.network.backends.NetworkBackendBootStrapper module

class miniworld.model.network.backends.NetworkBackendBootStrapper.NetworkBackendBootStrapper(network_backend_type, emulation_node_network_backend_type, emulation_node_type, virtualization_layer_type, connection_type, switch_type, network_configurator_type, virtual_node_network_backend_type=None, central_node_type=None, management_node_type=None, tunnel_type=None)[source]

Bases: object

Bundles the components a NetworkBackend needs to operate.

network_backend_type : type emulation_node_type : type virtualization_layer_type : type connection_type : type switch_type : type network_configurator_type : type central_node_type : type

Only use the central mode if the backend provides a class for it.
management_node_type : type
Only use the management mode if the backend provides a class for it.

virtual_node_network_backend_type : type tunnel_type : type

miniworld.model.network.backends.NetworkBackendDynamic module

miniworld.model.network.backends.NetworkBackendNotifications module

class miniworld.model.network.backends.NetworkBackendNotifications.ConnectionInfo(is_remote_conn=False, is_central=False, is_mgmt=False)[source]

is_remote_conn : bool, optional (default is False) is_central : bool, optional (default is False) is_mgmt : bool, optional (default is False)

class miniworld.model.network.backends.NetworkBackendNotifications.NetworkBackendNotifications[source]

This interface describes the interaction between the SimulationManager, the NetworkManager and the NetworkBackend.

after_distance_matrix_changed(simulation_manager, network_backend, changed_distance_matrix, full_distance_matrix, **kwargs)[source]

Called only if the distance matrix changed.

changed_distance_matrix simulation_manager network_backend full_distance_matrix kwargs

switch network_backend_connected : Bool

Return value from before_link_initial_start()
connection : AbstractConnection
Return value from before_link_initial_start()

network_backend emulation_node_x emulation_node_y interface_x interface_y connection_info : ConnectionInfo start_activated

Called only for connected nodes. There the LinkQualityModel and the NetworkBackend agreed on a connection.

connection link_quality_still_connected link_quality_dict network_backend emulation_node_x emulation_node_y interface_x interface_y connection_info : ConnectionInfo kwargs

after_simulation_step(simulation_manager, step_cnt, network_backend, emulation_nodes, **kwargs)[source]

Called after a simulation step is over. Called every step.

simulation_manager emulation_nodes network_backend step_cnt

before_distance_matrix_changed(simulation_manager, network_backend, changed_distance_matrix, full_distance_matrix, **kwargs)[source]

Called only if the distance matrix changed.

changed_distance_matrix simulation_manager network_backend full_distance_matrix kwargs

Called before a link between the two nodes on the supplied interfaces is going to be created.

Let the NetworkBackend decide whether the links really shall be connected. 1) SimulationManager->NetworkManager->NetworkBackend-|

SimulationManager<-NetworkManager-| <- connected, connection

...

  1. after_link_initial_start() -> ...

network_backend emulation_node_x emulation_node_y interface_x interface_y connection_info : ConnectionInfo start_activated

Bool, AbstractSwitch, AbstractConnection
Whether the nodes are connected and the appropriate connection

Called only for connected nodes. There the LinkQualityModel and the NetworkBackend agreed on a connection.

connection link_quality_still_connected link_quality_dict network_backend emulation_node_x emulation_node_y interface_x interface_y connection_info : ConnectionInfo kwargs

before_simulation_step(simulation_manager, step_cnt, network_backend, emulation_nodes, **kwargs)[source]

Called before the next simulation step is about to be performed. Called every step.

simulation_manager : SimulationManager step_cnt : int network_backend : NetworkBackend emulation_nodes : EmulationNodes

connection_across_servers(network_backend, emulation_node_x, emulation_node_y, remote_ip)[source]

network_backend emulation_node_x emulation_node_y remote_ip

miniworld.model.network.backends.NetworkBackendSingleDeviceConnectivity module

miniworld.model.network.backends.NetworkBackendStatic module

miniworld.model.network.backends.NetworkBackends module

miniworld.model.network.backends.NetworkMixin module

miniworld.model.network.backends.SwitchMixin module

class miniworld.model.network.backends.SwitchMixin.SwitchMixin[source]
create_switches()[source]
start_switches(*args, **kwargs)[source]

miniworld.model.network.backends.VirtualNodeNetworkBackend module

Module contents