-
Notifications
You must be signed in to change notification settings - Fork 0
Demonstration 4
Demonstration 3 brought ETCE into the EMANE domain. We focused on the structure of an ETCE Test Directory and the way that file naming and placement interacts with test execution steps.
While the directory layout of Demonstration 3 is easy to digest, the large number of files and, especially, files with only minor text differences makes such a layout impractical. Small test changes may require manual edits to many files, which is error prone. Replicate this over many tests and things quickly become unmaintainable.
Demonstration 4 repeats demo 3 but reduces the number of Test
Directory files to a more manageable set by exploiting the
configuration redundancy. The new files are standalone template files
or are organized into entire template directories and use mako
in a very similar way to what we've seen previously in the
LXC Plan File. The new format requires an expanded test.xml
file that
indicates templates to ETCE and provides the template variable values
for publishing the Test Directory to its final form.
Here is our Demonstration 4 Test Directory:
[etceuser@host]$ tree 04.templates
04.templates
|__ doc
| |__ hostfile
| |__ lxcplan.xml
|__ helper
| |__ eelgenerator.xml
| |__ eventservice.xml
| |__ otestpoint-broker.xml
| |__ scenario.eel
|__ node.tpl
| |__ emaneshsnapshot.flag
| |__ eventdaemon.xml
| |__ gpsd.flag
| |__ gpsdlocationagent.xml
| |__ ieee80211abgmac.xml
| |__ ieee80211abgnem.xml
| |__ ieee80211pcr.xml
| |__ mgen.script
| |__ olsrd.conf
| |__ otestpointd.xml
| |__ otestpoint-recorder.xml
| |__ platform.xml
| |__ probe-emane-ieee80211abg.xml
| |__ probe-emane-physicallayer.xml
| |__ probe-emane-virtualtransport.xml
| |__ transvirtual.xml
|__ steps.xml
|__ test.xml
The main change we see from the previous demo is that the ten node
directories in 03.emane
are replaced by one directory node.tpl
.
The tpl
suffix indicates that node.tpl
is a Template
Directory. ETCE will treat every file in node.tpl
as a file
containing mako template strings that require values for publishing.
Let's also the list the test summary to look for changes:
[etceuser@host]$ etce-test list -v 04.templates
------------
04.templates
------------
location:
04.templates
description:
emane-tutorial demonstration 3 in ETCE Test Directory format
and using templates.
overlays:
etce_hostname
etce_index
etce_log_path
eventservicedevice
mgen_flow
rtsthreshold
The important difference from the last demo is the expanded overlays
section. In addition to the etce_log_path
variable we saw there, we
have five new ones: etce_hostname
, etce_index
,
eventservicedevice
, mgen_flow
and rtsthreshold
.
ETCE generates the overlays summary listing by searching through the
Test Directory files to find mako template strings. Recall these are
Python code snippets enclosed by a leading dollar sign and squiggly
braces - ${some Python code here}
. Each name requires a value to
publish the Test into usable form - to convert the mako templates into
text.
Copyright (c) 2019 - Adjacent Link LLC, Bridgewater, New Jersey
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 4.0 International License.