SDL Reference Guide
Stories
The story represents the fictive conditions and events of the scenario, that will take place during the exercise. A story can be divided into various scripts that include a series of events, that constitute a narrative. A script tells a part of the story through a timeline, taking the perspective of one (or more) entity, i.e., it represents the story from the entity’s perspective. Story has an internal speed, which is used to control the overall speed at which the exercise is taking place. An optional description can be added.
stories:
story-1:
speed: 1
scripts:
- script-1
- script-2
description: 'story description'
| Variable | Mandatory | Type | Rules |
|---|---|---|---|
speed | yes | float | Speed value must be at least 1.0 |
scripts | yes | array of Scripts | Story must have at least one Script Script must be defined under Scripts |
description | no | string |
Scripts
Scripts are the main elements of a story. Scripts define their start-time and end-time which parsed from string into u64 seconds and accept a mix of types specified below (or a 0 value for start-time). The speed field specifies how fast the script runs. They also contain the events map, that are happening in the scope of that script with the event start time specified as the value of the event in accepted format. So for the example below event-1 starts right when the deployment starts, event-2 starts 5 minutes after the start etc. An optional description can be added.
scripts:
script-1:
start-time: 0
end-time: 3 hour 30 min
speed: 1
events:
event-1: 0
event-2: 5 min
event-3: 15 min
description: "script description"
| Variable | Mandatory | Type | Rules |
|---|---|---|---|
start-time | yes | time | |
end-time | yes | time | End-time must be greater than start-time |
speed | yes | float | Speed must have a positive value |
events | yes | hashmap of Event:time | Script must have at least one Event Event must be defined under Events |
description | no | string |
Accepted formats for time specification
| Unit | Description | Unit list option(one of) | Example |
|---|---|---|---|
| y | Year | ["y" , "year" , "Y" , "YEAR" , "Year"] | 1y |
| mon | Month | ["mon" , "MON" , "Month" , "month" , "MONTH"] | 1mon |
| w | Week | ["w" , "W" , "Week" ,"WEEK" , "week"] | 1w |
| d | Day | ["d" , "D" , "Day" , "DAY" , "day"] | 1d |
| h | Hour | ["h" , "H" , "Hour" , "HOUR" , "hour"] | 1h |
| m | Minute | ["m" , "M" , "Minute" , "MINUTE" , "minute" , "min" , "MIN"] | 1m |
| s | Second | ["s" , "S" , "Second" , "SECOND" , "second" , "sec" , "SEC"] | 1s |
Millisecond (ms), microsecond (µs) and nanosecond (ns) are also accepted as a valid input, but the values are rounded up to the nearest second.
Events
Events are rules, that are used to trigger injects and show additional information to the participant. Events can either be triggered by condition or time. If an event contains a condition and that condition becomes true, the event will be triggered during the event time window. The time when the event can be triggered is specified in scripts. Also if event contains multiple conditions, all those conditions have to be true for the event to trigger. If the event does not contain conditions, it will be triggered when the event window opens.
Source specifies the package of an Event markdown file in Deputy, which will then be converted into HTML and shown to the participant once the event has been triggered. For a longer explanation, please see Source under Node. An optional description can be added.
events:
event-1:
source: 'event-package'
conditions:
- condition-1
- condition-2
- condition-3
injects:
- inject-1
- inject-2
description: 'event description'
| Variable | Mandatory | Type | Rules |
|---|---|---|---|
source | no | string or object with fields: name, version | Time must have a float value between 0 and 1 |
conditions | no | array of Conditions | Condition must be defined under Conditions |
injects | no | array of Injects | Event must have at least one Inject Inject must be defined under Injects |
description | no | string |