nycmesh-tool

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 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
  • 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.

Releases

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

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

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