You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/dsl.md
+35-20Lines changed: 35 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The main sections of a scenario YAML file work together to define a complete net
15
15
-`components`: **[Optional]** A library of hardware and optics definitions with attributes like power consumption.
16
16
-`risk_groups`: **[Optional]** Defines groups of components that might fail together (e.g., all components in a rack or multiple parallel links sharing the same DWDM transmission).
17
17
-`traffic_matrix_set`: **[Optional]** Defines traffic demand matrices between network nodes with various placement policies.
18
-
-`failure_policy`: **[Optional]** Specifies availability parameters and rules for simulating network failures.
18
+
-`failure_policy_set`: **[Optional]** Specifies named failure policies and rules for simulating network failures.
19
19
-`workflow`: **[Optional]** A list of steps to be executed, such as building graphs, running simulations, or performing analyses.
20
20
21
21
## `network` - Core Foundation
@@ -398,30 +398,45 @@ traffic_matrix_set:
398
398
399
399
- **`full_mesh`**: Creates individual demands for each (source_node, sink_node) pair, excluding self-pairs (where source equals sink). The total demand volume is split evenly among all valid pairs. This is useful for modeling distributed traffic patterns where every source communicates with every sink.
400
400
401
-
## `failure_policy` - Failure Simulation
401
+
## `failure_policy_set` - Failure Simulation
402
402
403
-
Defines how network failures are simulated to test resilience and analyze failure scenarios.
403
+
Defines named failure policies for simulating network failures to test resilience and analyze failure scenarios. Each policy contains rules and configuration for how failures are applied.
404
404
405
405
```yaml
406
-
failure_policy:
407
-
name: "PolicyName" # Optional
408
-
fail_shared_risk_groups: true | false
409
-
fail_risk_group_children: true | false
410
-
use_cache: true | false
411
-
attrs: # Optional custom attributes for the policy
412
-
custom_key: value
413
-
rules:
414
-
- entity_scope: "node" | "link" | "risk_group"
415
-
conditions: # Optional: list of conditions to select entities
logic: "and" | "or" | "any" # How to combine conditions
421
+
rule_type: "all" | "choice" | "random" # How to select entities matching conditions
422
+
count: N # For 'choice' rule_type
423
+
probability: P # For 'random' rule_type (0.0 to 1.0)
424
+
policy_name_2:
425
+
# Another failure policy...
426
+
default:
427
+
# Default failure policy (used when no specific policy is selected)
428
+
rules:
429
+
- entity_scope: "link"
430
+
rule_type: "choice"
431
+
count: 1
423
432
```
424
433
434
+
**Policy Selection:**
435
+
436
+
- If a `default` policy exists, it will be used when no specific policy is selected
437
+
- If only one policy exists and no `default` is specified, that policy becomes the default
438
+
- Multiple policies allow testing different failure scenarios in the same network
439
+
425
440
## `workflow` - Execution Steps
426
441
427
442
A list of operations to perform on the network. Each step has a `step_type` and specific arguments. This section defines the analysis workflow to be executed.
0 commit comments