tests.ping_all

Intended for use with functionality tests, this MC performs a layer-3 connectivity test via ping.

It adds the ping_all.py VMR at time=30 to ping every IP address in the experiment from every node within the experiment. This essentially tests full layer-3 connectivity.

It assumes the presence of a topology with a fully-connected network. Therefore, there is no handling of unusual or unexpected conditions in the graph, such as disjoint subgraphs. Additionally, this assumes that Python is installed on the VMs and that a Windows or Unix-based ping program are installed. This will work with either IPv4 or IPv6 addresses.

If the include_routers parameter is "False" (the current default), then routers will be excluded from the test; they will not be pinged or pinging.

Attribute Provides:
  • ping_all

Attribute Depends:
  • topology

Model Component Dependencies:

Plugin

class tests.ping_all_plugin.PingAll(graph, log)[source]

Bases: AbstractPlugin

Intended for use with functionality tests. Assumes the presence of a topology with a fully-connected network.

Populates a schedule where all nodes in the experiment will run the ping_all.py VMR at time 30. The VMR will attempt to ping every IP address in the experiment from every node within the experiment. If include_routers is "False", then routers will be excluded from the test; they will not be pinged or pinging.

There is no handling of unusual or unexpected conditions in the graph, such as disjoint subgraphs, unsupported (by ping_all.py) OSes, etc.

__annotations__ = {}
_build_ip_list()[source]

Build a list of the IP address(es) for all hosts in the experiment.

Returns:

A list of strings, where each string is an IP address.

Return type:

list

_populate_schedule(ip_list)[source]

Add the ping_all.py VM Resource to the schedule of every VM in the experiment. Ignore OS and other potential conflicts.

Parameters:

ip_list (list) – A list of IP addresses as strings. This is sent as a string and passed into ping_all.py.

run(include_routers='false')[source]

Executes the plugin. Calls the function to build the list of IPs and then build the schedule for all nodes.

Parameters:

include_routers (str) – Whether to include routers in the test.