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
* Add 'pickle' output module and use it as one of default outputs
* Refactor output file selection into 'select_output_file'. This
function can be used by all output modules (future improvement)
* Add 'load_pickled_data' to 'utils.read'
* Read pickled or YAML data in 'load_snapshot' function
Minor changes:
* Change the default value of the 'args.snapshot' parameter
* Change the parser default value of '--snapshot' parameter
* Change the help message in 'netlab create' command
* Add 'snapshot' argument to 'netlab down' to be able to shut down
a lab from the YAML snapshot file
* Add 'netlab.snapshot.pickle' as another file to clean up when the
lab is shut down
* Fix exception reporting to use 'str(ex)' (just to be on the safe
side)
Off-topic:
* Create a large topology in platform-integration tests to test the
performance improvements
Finally:
* Updated the documentation to refer to the pickle snapshot file
Implements #2635
|`topology:`| Directory containing the current lab topology |
195
195
196
-
The directory search patterns are evaluated during the [data transformation process](../transform.md), and the absolute paths are stored in the Ansible inventory (in the **all** group) and the `netlab.snapshot.yml` file. You can use the **netlab inspect defaults.paths** command to display the transformed values (**netlab inspect** command is available after starting the lab or executing the **netlab create** command).
196
+
The directory search patterns are evaluated during the [data transformation process](../transform.md), and the absolute paths are stored in the Ansible inventory (in the **all** group) and the `netlab.snapshot.pickle` file. You can use the **netlab inspect defaults.paths** command to display the transformed values (**netlab inspect** command is available after starting the lab or executing the **netlab create** command).
197
197
198
198
For example, the default custom configuration template directory search path (**defaults.paths.custom.dirs**) contains these entries:
The evaluated search path that is stored in `netlab.snapshot.yml` might contain these values (the topology directory is equal to the current directory, **netlab** is executed from local Git directory):
209
+
The evaluated search path that is stored in `netlab.snapshot.pickle` might contain these values (the topology directory is equal to the current directory, **netlab** is executed from local Git directory):
Copy file name to clipboardExpand all lines: docs/netlab/connect.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The rest of the arguments are passed to SSH or docker exec command
35
35
36
36
## Collecting Device Data
37
37
38
-
**netlab connect** uses the lab snapshot file (default: `netlab.snapshot.yml`) to read device- and node information. You can overwrite the default snapshot file with the `--snapshot` command line parameter.
38
+
**netlab connect** uses the lab snapshot file (default: `netlab.snapshot.pickle`) to read device- and node information. You can overwrite the default snapshot file with the `--snapshot` command line parameter.
39
39
40
40
**netlab connect** command uses the following device data. Most of that data is derived from the device **group_vars**, although you can override it on [node-](node-ansible-data) or [custom group](groups-object-data) level; use the **[`netlab inspect --node _name_`](inspect.md)** command to inspect it.
Copy file name to clipboardExpand all lines: docs/netlab/create.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,17 @@ You can influence the data model transformation with optional [configuration mod
22
22
23
23
**netlab create** uses transformed node- and link-level data structures to create:
24
24
25
-
* Snapshot of the transformed topology in the **netlab.snapshot.yml** file. This file is used by **netlab down** command to find the virtualization provider and link (bridge) names.
25
+
* Pickled transformed topology data in the **netlab.snapshot.pickle** file. This file is used by many other **netlab** commands to get the information about the currently running lab topology.
26
+
* Snapshot of the transformed topology in the **netlab.snapshot.yml** file. You can use this file to get the information about the current lab topology in your own scripts.
* Ansible inventory[^1], either as a single-file data structure, or as a minimal inventory file with data stored primarily in **host_vars** and **group_vars**
29
30
* Various graphs in *graphviz* DOT format
30
31
* YAML or JSON representation of transformed lab topology or parts of the transformed data model
31
-
* Configuration file for *graphite* visualization tool
32
+
* Configuration files for [external tools](extools.md)
32
33
33
34
```{warning}
34
-
**netlab create** command refuses to create provider configuration files, Ansible inventory, or `netlab.snapshot.yml` file if it finds `netlab.lock` file in the current directory.
35
+
**netlab create** command refuses to create provider configuration files, Ansible inventory, or `netlab.snapshot.pickle` file if it finds `netlab.lock` file in the current directory.
35
36
36
37
`netlab.lock` file is created by the **netlab up** command to ensure subsequent **netlab create** commands don't overwrite the provider configuration files. It is automatically removed after a successful completion of **netlab down** command.
37
38
```
@@ -71,6 +72,7 @@ optional arguments:
71
72
72
73
output files created when no output is specified:
73
74
75
+
* Pickled transformed data in netlab.snapshot.pickle
74
76
* Transformed topology snapshot in netlab.snapshot.yml
75
77
* Virtualization provider file with provider-specific filename
Copy file name to clipboardExpand all lines: docs/netlab/down.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ options:
27
27
Notes:
28
28
29
29
***netlab down** needs transformed topology data to find the virtualization provider and link (bridge) names.
30
-
***netlab down** reads the transformed topology from `netlab.snapshot.yml` file created by **netlab up** or **netlab create**.
30
+
***netlab down** reads the transformed topology from `netlab.snapshot.pickle` file created by **netlab up** or **netlab create**.
31
31
* With the `--instance` flag, you can shut down a lab instance running in a different directory. Use the `netlab status --all` command to display all running instances.
32
32
* Use the `--cleanup` flag to delete all Ansible-, Vagrant- or containerlab-related configuration files.
33
33
* Use the `--force` flag with the `--cleanup` flag if you want to clean up the directory even when the virtualization provider fails during the shutdown process.
Copy file name to clipboardExpand all lines: docs/netlab/graph.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
(netlab-graph)=
2
2
# Creating Physical or BGP Topology Graphs
3
3
4
-
**netlab graph** command creates a graph description in [Graphviz](https://graphviz.org/) or [D2](https://d2lang.com/) format from the transformed lab topology data (usually stored in `netlab.snapshot.yml`) created by **netlab create** command. It's replicating the functionality of **netlab create -o graph:_name_** command with a more convenient user interface.
4
+
**netlab graph** command creates a graph description in [Graphviz](https://graphviz.org/) or [D2](https://d2lang.com/) format from the transformed lab topology data (usually stored in `netlab.snapshot.pickle`) created by **netlab create** command. It's replicating the functionality of **netlab create -o graph:_name_** command with a more convenient user interface.
5
5
6
6
```{note}
7
7
You will have to install [Graphviz](https://graphviz.org/download/) or [D2](https://d2lang.com/tour/install) and use them to create the actual graphs in PNG/JPEG/PDF format.
Copy file name to clipboardExpand all lines: docs/netlab/inspect.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
(netlab-inspect)=
2
2
# Inspect Data Structures in Transformed Lab Topology
3
3
4
-
**netlab inspect** prints data structures in transformed lab topology (usually stored in `netlab.snapshot.yml`) created by the **netlab create** command. You can display data in YAML or JSON format and select a subset of data from the transformed topology or an individual node.
4
+
**netlab inspect** prints data structures in transformed lab topology (usually stored in `netlab.snapshot.pickle`) created by the **netlab create** command. You can display data in YAML or JSON format and select a subset of data from the transformed topology or an individual node.
5
5
6
6
When selecting data from an individual node, _netlab_ adds group variables to node data, effectively displaying what you would see in the Ansible inventory.
Copy file name to clipboardExpand all lines: docs/netlab/report.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
(netlab-report)=
2
2
# Creating a Report
3
3
4
-
The **netlab report** command creates a report from the transformed lab topology data (usually stored in `netlab.snapshot.yml`) created by the **netlab create** command. It replicates the functionality of the **netlab create -o report:_name_** command with a more convenient user interface.
4
+
The **netlab report** command creates a report from the transformed lab topology data (usually stored in `netlab.snapshot.pickle`) created by the **netlab create**or **netlab up**command. It replicates the functionality of the **netlab create -o report:*name*** command with a more convenient user interface.
Copy file name to clipboardExpand all lines: docs/netlab/restart.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Restart Virtual Lab
2
2
3
-
**netlab restart** executes **[netlab down](down.md)** followed by **[netlab up](up.md)** to restart your lab from the transformed lab topology stored in `netlab.snapshot.yml` snapshot file.
3
+
**netlab restart** executes **[netlab down](down.md)** followed by **[netlab up](up.md)** to restart your lab from the transformed lab topology stored in `netlab.snapshot.pickle` snapshot file.
4
4
5
5
You can use **netlab restart** to restart the existing lab (use `--snapshot` keyword) or recreate the lab configuration files if you changed the lab topology.
0 commit comments