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
Refactor Graphviz graph generation to use shared graph data
* Implements ideas from #2535 and #2547 for Graphviz graphs
* Adds generic 'object style' mechanism that replaces old 'colors'
and 'margins' settings
* Corrects #2534 for Graphviz
Copy file name to clipboardExpand all lines: docs/outputs/graph.md
+77-17Lines changed: 77 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,30 +13,90 @@ A single formatting modifier can be used to specify the graph type:
13
13
14
14
## Modifying Graph Attributes
15
15
16
-
Graphing routines use **[default](topo-defaults)** topology settings to modify the generated DOT file's node- or link parameters. You can change these defaults.
16
+
Graphing routines use **[default](topo-defaults)** topology settings to modify the generated DOT file's node- or link parameters. These defaults influence how your graphs look:
17
17
18
+
***outputs.graph.as_clusters** (default: *True*) -- use BGP AS numbers to create graph clusters
19
+
***outputs.graph.groups** -- use the specified list of groups (or all groups when set to *True*) to create graph clusters
18
20
***outputs.graph.interface_labels** -- Add IP addresses to links in **topology** graph. Results in a cluttered image (but feel free to fix that and submit a pull request).
21
+
***outputs.graphs.node_address_label** (default: *True*) -- add node loopback IP addresses or IP addresses of the first interface (for hosts) to node labels.
22
+
***outputs.graph.rr_sessions** (default: *False*) -- draw IBGP sessions between BGP route reflectors and clients as directional connections.
23
+
24
+
You can also change the formatting of individual graph objects with the **outputs.styles._object_** defaults:
25
+
26
+
| Object | Description |
27
+
|--------|-------------|
28
+
| graph | Generic graph formatting |
29
+
| node | Device formatting |
30
+
| edge | Link formatting |
31
+
| as | Autonomous system/group container formatting |
32
+
| stub | Subnet formatting
33
+
| ibgp | IBGP session formatting |
34
+
| ebgp | IBGP session formatting |
35
+
36
+
Each **styles** parameter is a dictionary of *Graphviz* attributes and their values (see the following printout for an example).
37
+
38
+
You can also change graph colors and margins with old-style defaults:
39
+
19
40
***outputs.graph.colors._object_** -- Specify background color for *as*, *node*, *stub* subnet, *ibgp* or *ebgp* session.
20
41
***outputs.graph.margins.as** -- Inner margin for graph clusters (BGP autonomous system or groups).
21
-
***outputs.graph.groups** -- use the specified list of groups (or all groups when set to *True*) to create graph clusters
22
-
***outputs.graphs.node_address_labels** -- add node loopback IP addresses or IP addresses of the first interface (for hosts) to node labels.
23
42
24
-
You could specify these attributes in your [topology file](defaults-topology) (where you would have to prefix them with **defaults**), in [per-user topology defaults](defaults-user-file), or with [environment variables](defaults-env) (even [more details](../defaults.md)). You could also specify them with the `-s` parameter of the **[netlab create](netlab-create)** command, yet again prefixed with **defaults** ([more details](netlab-create-set)).
43
+
You could specify the graph defaults in your [topology file](defaults-topology) (where you would have to prefix them with **defaults**), in [per-user topology defaults](defaults-user-file), or with [environment variables](defaults-env) (even [more details](../defaults.md)). You could also specify them with the `-s` parameter of the **[netlab create](netlab-create)** command, yet again prefixed with **defaults** ([more details](netlab-create-set)).
25
44
26
-
The system defaults in *netlab* release 1.9.1 are included below; you can always inspect them with **netlab show defaults outputs.graph**
45
+
The system defaults in *netlab* release 25.09 are included below; you can always inspect them with **netlab show defaults outputs.graph**
27
46
28
47
```
29
-
outputs:
48
+
% netlab show defaults outputs.graph
49
+
50
+
netlab default settings within the outputs.graph subtree
0 commit comments