config.py
The NOS-T manager configuration file contains a few parameters important for test case execution. First, the PREFIX, currently configured as "template" sets which topic the manager will publish its command messages to. You must ensure that any managed applications in your test case are using the same PREFIX otherwise they will never start up.
The four commented-out lines at the bottom of the following script allow for scheduled mid-test time scaling updates. These updates can also work dynamically, if users send a properly formatted update method.
import os
from datetime import datetime, timezone
from nost_tools.manager import TimeScaleUpdate
PREFIX = os.getenv("PREFIX", "template")
NAME = os.getenv("NAME", "Manager")
LOG = f"\x1b[1m[\x1b[32m{NAME}\x1b[37m]\x1b[0m"
HEADER = {
"name": NAME,
"description": f'Synchronizes a test case on the testbed on the "{PREFIX}/#" topic.',
}
SCALE = 60.0
UPDATE = []
# UPDATE = [
# TimeScaleUpdate(120.0, datetime(2020, 1, 1, 8, 20, 0, tzinfo=timezone.utc)),
# TimeScaleUpdate(300.0, datetime(2020, 1, 1, 9, 20, 0, tzinfo=timezone.utc)),
# ]