nycmesh-tool

command module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

nycmesh-tool

nycmesh-tool CLI

Features

At the moment, the tool is pretty sparse. It provides the top level nycmesh-tool command, with subcommands for:

  • uisp - Full UISP API CLI
  • meshapi - Interact with https://github.com/meshcenter/mesh-api
  • map - Open up nodes on a map from the command line
  • cache - manipulate a simple on-disk cache for things like API responses, for offline access to inventory
  • daemon - launch a daemon to do stuff (current features include:)
    • --dfs-event-detection: monitor sectors for DFS events, and notify relevant channels
  • experiment - Experimental commands. Here be dragons!
    • devices - display fused device data, created by joining UISP data with mesh-api data. Useful for further jq processing.
  • watch
    • logs - easy interface to watch UISP logs in real(ish) time

Releases

See releases for binary downloads, and ./RELEASE.md for more information.

Builds of Docker images are created for each release, and pushed to byxorna/nycmesh-tool. byxorna/nycmesh-tool on Docker Hub

Hacking

See ./HACKING.md

Config

By default (--config) we read .nycmesh-tool.yaml for global flags for the tool. You could pass these parameters on the CLI, or store them in ~/.nycmesh-tool.yaml (or .):

---
uisp:
  x-auth-token: xxx # get this from https://uisp.mesh/nms/user/login or scripts/uisp-user-token.sh
  hostname: uisp.mesh
  scheme: https
  skip-verify-tls: false # true needed for self-signed certs
  debug: true

# note: the slack key is optional, and only useful if you are running `daemon`
# slack:
#   token: "put your bot token here"

UISP API Commands

To test your connection to UISP works:

$ ./bin/nycmesh-tool uisp authorization getUser
{"userId":null,"username":"gabeconradi"}

Or, see how many devices are in the API:

$ ./bin/nycmesh-tool uisp devices getDevices --hostname=uisp.mesh --scheme=https  --debug --skip-verify-tls |jq length
1293

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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