minimega.testbed_available
This model component is responsible for ensuring that experiments do not collide with each other.
Currently, it uses the minimegaAPI
to check if any VMs are running and the firewheel.vm_resource_manager.api
to check if an experiment launch time has been set.
If either is true, then it is assumed that an experiment is running, and an ExistingExperimentError
is thrown.
Otherwise, it uses the firewheel.vm_resource_manager.api
to set the experiment experiment launch time and proceeds launching the experiment.
Note that the launch time (i.e. the time the experiment was kicked off) differs from the Start Time (i.e. when the experiment reaches time=0
).
- Attribute Provides:
testbed_available
Plugin
- exception minimega.testbed_available_plugin.ExistingExperimentError(msg=None)[source]
Bases:
Exception
This exception is thrown when the minimega.testbed_available plugin detects that an experiment is running, but a user has requested to launch another experiment. It provides a helpful error message to the user indicating how to clear the testbed.
- class minimega.testbed_available_plugin.Plugin(graph, log)[source]
Bases:
AbstractPlugin
This plugin is responsible for carrying out the main functionality of this model component (i.e. identifying whether a current experiment is running).
- __annotations__ = {}
- run()[source]
This run method checks to see if any VMs exist in minimega and throws an exception if they do. Additionally, it will ensure that the experiment launch time is not set. If it is, then we assume an experiment is running and throw an error. If it is not set, then we can set the launch time.
- Raises:
ExistingExperimentError – If an existing experiment is running.