tests.networkx
This MC provides a complex example of how to convert a NetworkX graph into a FIREWHEEL experiment.
Specifically, it leverages the networkx.random_internet_as_graph()
topology which creates a random undirected graph resembling the Internet AS network.
In this graph, each node models an autonomous system, with an attribute type
specifying its kind; tier-1 (T), mid-level (M), customer (C) or content-provider (CP).
The associated plugin.py
converts each AS (i.e. T
and M
) into a BGP router and each customer (i.e., C
and CP
) into a Ubuntu server.
This topology takes users though how to decorate the nodes, add the appropriate BGP information, and insert Switches
between links so that it will function correctly.
Users can specify the number of nodes in the topology and can also choose to remove the NxEdges
to better visualize the graph with the misc.print_graph Model Component.
- Attribute Depends:
graph
- Attribute Provides:
topology
- Model Component Dependencies:
Plugin
- class tests.networkx_plugin.Plugin(graph, log)[source]
Bases:
AbstractPlugin
This plugin provides an example of how to convert a NetworkX based graph into a FIREWHEEL experiment. Specifically, it leverages the
nx.random_internet_as_graph()
topology which creates a random undirected graph resembling the Internet AS network.- __annotations__ = {}
- run(num_nodes='100', del_edges='False')[source]
Run method documentation which takes the NetworkX graph and converts it to FIREWHEEL.
- Parameters:
- Raises:
RuntimeError – If the input parameters are improperly formatted.