labctl

command module
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

Labctl command line utility

For information on ho to use Labctl, see the user documentation at https://labctl.net.

This README file contains info on the labctl internals and should be the starting point if you want to contribute to the project. The following repositories form part of the labctl project:

Config Engine

Labctl uses the Config Engine from containerlab to process magic variables and render templates

The go text/template library is extended with user defined functions from:

Config Engine Issues

Feel free to open any Config Engine related issue on labctl. You can also view open issues on containerlab here

labctl serve Web API

The server paths are defined in cmd_serve.go and used by the labctl-frontend

path Description
/ws Websocket for commands, updates, rendering, etc
/wspty PTY via Websocket, for SSH/terminal sessions
/topo The Topology file for the graph
/vars
/templates
/files
/error
Websocket messages

The websocket messages used on the /ws API endpoint are defined in ws_message.go

code sent by description
error, warn server Display messages in the frontend
template both Render a template on the server as&when requested by the frontend
uidata both The frontend uses this msg to save persistent data in the local labctl yml file file
config both Execute a config command on the server and return the results to the frontend
fschange server Notify the frontend of file updates (README, topology, etc.)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
discovery
The discovery package allows test processing of router CLI output It leverages TextFSMto parse the output and apply a golang template to the output
The discovery package allows test processing of router CLI output It leverages TextFSMto parse the output and apply a golang template to the output
tx

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL