From edbb1ef5e4bf822d6f58b8221c06ffef1420b6cd Mon Sep 17 00:00:00 2001 From: Ivan Pepelnjak Date: Mon, 22 Aug 2022 20:14:51 +0200 Subject: [PATCH] Step #1 --- docs/caveats.md | 13 +++++++------ docs/outputs/devices.md | 6 +++--- docs/outputs/graph.md | 2 +- docs/outputs/graphite.md | 2 +- docs/outputs/index.md | 2 +- netsim/__init__.py | 2 +- netsim/cli/version.py | 2 +- netsim/outputs/devices.py | 6 +++--- setup.py | 2 +- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/caveats.md b/docs/caveats.md index 9d91a1ad1..a95e96f66 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -7,7 +7,7 @@ ## Cisco Nexus OS -* Nexus OS release 9.3 runs in 6 GB of RAM (*netsim-tools* system default). +* Nexus OS release 9.3 runs in 6 GB of RAM (*netlab* system default). * Nexus OS release 10.1 requires 8 GB of RAM and will fail with a cryptic message claiming it's running on unsupported hardware when it doesn't have enough memory. * Nexus OS release 10.2 requires at least 10 GB of RAM and crashes when ran as an 8 GB VM. * To change the default amount of memory used by a **nxos** device, set the **defaults.devices.nxos.memory** parameter (in MB) @@ -15,8 +15,8 @@ ## Cumulus Linux in ContainerLab * *containerlab* could run Cumulus Linux as a container or as a micro-VM with *firecracker* (default, requires KVM). To run Cumulus VX as a pure container, add **runtime: docker** parameter to node data. -* *netsim-tools* uses Cumulus VX containers created by Michael Kashin and downloaded from his Docker Hub account. Once Nvidia releases an official container image, change the container name with **defaults.devices.cumulus.clab.image** parameter (or by editing the `topology-defaults.yml` file included with *netsim-tools*). -* The Cumulus VX 4.4.0 Vagrant box for VirtualBox is broken. *netsim-tools* is using Cumulus VX 4.3.0 with *virtualbox* virtualization provider. +* *netlab* uses Cumulus VX containers created by Michael Kashin and downloaded from his Docker Hub account. Once Nvidia releases an official container image, change the container name with **defaults.devices.cumulus.clab.image** parameter (or by editing the `topology-defaults.yml` file included with *netlab*). +* The Cumulus VX 4.4.0 Vagrant box for VirtualBox is broken. *netlab* is using Cumulus VX 4.3.0 with *virtualbox* virtualization provider. ## Fortinet FortiOS @@ -26,7 +26,7 @@ ## FRR * *containerlab* FRR containers run FRR release 7.5.0 -- the latest release that survives FRR daemon restart during the initial configuration process. -* *netsim-tools* don't support FRR running in a Linux VM. Use Cumulus Linux instead. +* *netlab* does not support FRR running in a Linux VM. Use Cumulus Linux instead. ## Generic Linux @@ -70,10 +70,11 @@ python3 -m pip install grpcio protobuf * OpenConfig support depends on a [pending PR](https://github.com/nokia/ansible-networking-collections/pull/21) ## VyOS -**netsim-tools** uses VyOS 1.4, which for now is a *rolling release* with daily builds (or custom builds). + +**netlab** uses VyOS 1.4, which for now is a *rolling release* with daily builds (or custom builds). This is because the stable release (*1.3*) lacks (or has limitations on) some of the nice features we are using such as MPLS, VRF/L3VPN, EVPN, ... The use of a *rolling release* means potentially any build is broken or with regressions, even if the VyOS team is smart enough to perform some [automated smoke tests](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) and load [arbitrary configurations](https://github.com/vyos/vyos-1x/tree/current/smoketest/configs) to ensure there are no errors during config migration and system bootup. -Additionally, using always the latest build published on [Vagrant Hub](https://app.vagrantup.com/vyos/boxes/current), should allow to easily track and react to any configuration syntax change (which anyway is a very rare event). In any case, if you find a mis-alignment between the VyOS config and the **netsim-tools** templates, feel free to *Open an Issue* or *Submit a PR*. +Additionally, using always the latest build published on [Vagrant Hub](https://app.vagrantup.com/vyos/boxes/current), should allow to easily track and react to any configuration syntax change (which anyway is a very rare event). In any case, if you find a mis-alignment between the VyOS config and the **netlab** templates, feel free to *Open an Issue* or *Submit a PR*. diff --git a/docs/outputs/devices.md b/docs/outputs/devices.md index e2eb6f47a..7303f3484 100644 --- a/docs/outputs/devices.md +++ b/docs/outputs/devices.md @@ -1,6 +1,6 @@ # Simple Device Inventory Output Module -*devices* output module creates lab devices inventory as a dictionary of hosts in YAML format (default name: *netsim-devices.yml*). +*devices* output module creates lab devices inventory as a dictionary of hosts in YAML format (default name: *netlab-devices.yml*). For every lab device, the *devices* output module: @@ -32,10 +32,10 @@ links: - s1-s2 ``` -Resulting *netsim-devices.yml* inventory (created with **[netlab create --devices](../netlab/create.md)**: +Resulting *netlab-devices.yml* inventory (created with **[netlab create --devices](../netlab/create.md)**: ``` -# Netsim Devices inventory created from ['topology.yml', 'package:topology-defaults.yml'] +# Netlab Devices inventory created from ['topology.yml', 'package:topology-defaults.yml'] # --- s1: diff --git a/docs/outputs/graph.md b/docs/outputs/graph.md index 5ccd317a1..3f04b0fb6 100644 --- a/docs/outputs/graph.md +++ b/docs/outputs/graph.md @@ -21,7 +21,7 @@ Graphing routines use **default** topology settings to modify the node- or link * **outputs.graph.groups** -- use the specified list of groups (or all groups when set to *True*) to create graph clusters * **outputs.graphs.node_address_labels** -- add node loopback IP addresses or IP addresses of the first interface (for hosts) to node labels. -You could specify these attributes in your topology file, in per-user topology defaults, or in system defaults ([more details](../defaults.md)). You could also specify them with `-s` parameter of **netlab create** command ([more details](../netlab/create.md)). The system defaults in *netsim-tools* release 1.2.4 are included below: +You could specify these attributes in your topology file, in per-user topology defaults, or in system defaults ([more details](../defaults.md)). You could also specify them with `-s` parameter of **netlab create** command ([more details](../netlab/create.md)). The system defaults in *netlab* release 1.2.4 are included below: ``` outputs: diff --git a/docs/outputs/graphite.md b/docs/outputs/graphite.md index aa8b5c79e..8479b4a36 100644 --- a/docs/outputs/graphite.md +++ b/docs/outputs/graphite.md @@ -1,6 +1,6 @@ # Graphite Topology Output Module -*graphite* output module creates a JSON file that can be used to display the *netsim-tools* lab topology within [Graphite](https://github.com/netreplica/graphite). +*graphite* output module creates a JSON file that can be used to display the *netlab* lab topology within [Graphite](https://github.com/netreplica/graphite). By default, the output is created as *graphite-default.json* file, which can be used directly from the Graphite container. When using the *graphite:webssh2* container, you can open SSH sessions with lab devices running in *libvirt* environment directly from the browser, making your lab accessible from an external IP network without routing or port-mapping tricks. diff --git a/docs/outputs/index.md b/docs/outputs/index.md index 95e0d161f..4f71dc7f6 100644 --- a/docs/outputs/index.md +++ b/docs/outputs/index.md @@ -8,7 +8,7 @@ Each `-o` parameter specifies an output module, formatting modifiers, and output * Some output modules use optional formatting modifiers -- you can specify Ansible inventory format, graph type, or parts of the transformed data structure that you want to see in YAML or JSON format * All output formats support optional destination file name. Default file name is either hard-coded in the module or specified in **defaults.outputs** part of lab topology. -The following output modules are included in **netsim-tools** distribution; you can create your own by adding modules to `netsim/outputs` directory: +The following output modules are included in **netlab** distribution; you can create your own by adding modules to `netsim/outputs` directory: ```eval_rst .. toctree:: diff --git a/netsim/__init__.py b/netsim/__init__.py index 1581f7a4b..ff30f0426 100755 --- a/netsim/__init__.py +++ b/netsim/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 -__version__ = "1.2.5-dev1" +__version__ = "1.3-dev1" diff --git a/netsim/cli/version.py b/netsim/cli/version.py index 9e3dfaa03..2d686c8d2 100644 --- a/netsim/cli/version.py +++ b/netsim/cli/version.py @@ -8,4 +8,4 @@ import netsim def run(args: typing.List[str]) -> None: - print("netsim-tools version %s" % netsim.__version__) + print("netlab version %s" % netsim.__version__) diff --git a/netsim/outputs/devices.py b/netsim/outputs/devices.py index 0067aed94..595c9290c 100644 --- a/netsim/outputs/devices.py +++ b/netsim/outputs/devices.py @@ -52,13 +52,13 @@ def write_devices(data: Box, fname: str, fmt: typing.Optional[str]) -> None: inventory = create(data.nodes,data.get('defaults',{}),addressing) - header = "# Netsim Devices inventory created from %s\n#\n---\n" % data.get('input','') + header = "# Netlab Devices inventory created from %s\n#\n---\n" % data.get('input','') write_yaml(inventory,fname,header) print("Created Netsim Devices inventory %s" % fname) def read_inventory(host: str, filename: typing.Optional[str] = None) -> typing.Optional[dict]: - filename = filename or os.getenv('NETSIM_DEVICES') or 'netsim-devices.yml' + filename = filename or os.getenv('NETLAB_DEVICES') or 'netlab-devices.yml' if not os.path.isfile(filename): common.fatal('Cannot read netsim device inventory: %s does not exist') return None @@ -75,7 +75,7 @@ def read_inventory(host: str, filename: typing.Optional[str] = None) -> typing.O class DeviceInventory(_TopologyOutput): def write(self, topology: Box) -> None: - hostfile = self.settings.hostfile or 'netsim-devices.yml' + hostfile = self.settings.hostfile or 'netlab-devices.yml' output_format = None if hasattr(self,'filenames'): diff --git a/setup.py b/setup.py index 0885e6fe7..5f4bde4e3 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ raise RuntimeError("This package requires Python 3.7+") setup( - name="netsim-tools", + name="netlab", version=netsim.__version__, packages=find_packages(), author="Ivan Pepelnjak",