tutorials.simple_server
This is a tutorial Model Component which is an implementation of the Simple Server Tutorials. Generally, this MC creates a Python web server and a number of clients which pull the files. Each of the clients have a random delay on their network link.
- Attribute Provides:
topology
- Attribute Depends:
graph
- Model Component Dependencies:
Plugin
- class tutorials.simple_server_plugin.Plugin(graph, log)[source]
Bases:
AbstractPlugin
tutorials.simple_server plugin documentation.
This Plugin creates a basic topology with a Server and several clients. The clients all have a random delay on their outbound connection.
- __annotations__ = {}
- create_client(name, server_ip)[source]
Create a single client.
- Parameters:
- Returns:
The newly created client.
- Return type:
- run(num_clients='1')[source]
Run method documentation.
This method contains the primary logic for the Plugin.
- Parameters:
num_clients (str) – The number of clients in the topology. This should be convertible to an integer.
- Raises:
TypeError – If the number of clients is not a valid integer.
ValueError – If the number of clients is not a valid integer.
Available Objects
This module contains all necessary Model Component Objects for tutorials.simple_server.
- class tutorials.simple_server.SimpleClient(*args, **kwargs)[source]
Bases:
object
SimpleClient Class documentation.
- __init__(*args, **kwargs)