Skip to main content

CLI tool to connect to devices via SpectroServer (DX Spectrum)

Project description

spectro-connect

A CLI tool to connect to devices via a SpectroServer instance (DX Spectrum)

Installation

pip install spectro-connect

Usage

$ spectro-connect --help
usage: spectro-connect [-h] [-s SPECTRO_IP] [-p PORT] [-t] [-v] host

SpectroServer Connect Tool

positional arguments:
  host                  IP address or name of remote device to connect to

optional arguments:
  -h, --help            show this help message and exit
  -s SPECTRO_IP, --spectro_ip SPECTRO_IP
                        IP address of SpectroServer
  -p PORT, --port PORT  Port to connect to on remote device
  -t, --telnet          Connect using Telnet
  -v, --verbose         Verbose output

Environment Variables

To specify the SpectroServer IP (rather than using the -s flag each time):

  • SPECTROSERVER_HOST

To enable Spectrum OneClick integration for device name lookups (recommended):

  • SPECTRUM_URL - URL of Spectrum OneClick
  • SPECTRUM_USERNAME - Username to access Spectrum OneClick
  • SPECTRUM_PASSWORD - Password to access Spectrum OneClick

Example Usage

This tool provides an SSH or Telnet session to a device managed in Spectrum. The connection is relayed through SpectroServer, using the same mechanism as the Spectrum Client Console.

In Windows, a PuTTY connection will be launched. In Linux, it will use the built-in SSH client.

If just an IP address is provided, it will attempt to estabish an SSH connection:

spectro-connect 172.31.100.20

If there environment variable SPECTROSERVER_HOST is not defined, the IP address of the SpectroServer must be provided after the -s flag:

spectro-connect -s 10.30.40.100 172.31.100.20

You can force a Telnet connection by including the --telnet flag:

spectro-connect 172.31.100.20 --telnet

If a hostname is provided (i.e. anything other than an IPv4 address), a lookup of the name will be done via the Spectrum API. If a single match is found, the script will connect using the appropriate protocol, based on the NCM family of that particular device:

spectro-connect CORE_RTR01

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectro-connect-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectro_connect-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file spectro-connect-0.1.1.tar.gz.

File metadata

  • Download URL: spectro-connect-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for spectro-connect-0.1.1.tar.gz
Algorithm Hash digest
SHA256 154e1f3417974039ad451845fb5f2cc7e8e8423ddea7eba5c5d73b47a0d29a01
MD5 220ea6c680ed20cd554e1104613d8f21
BLAKE2b-256 bb7d11f2b0986ec9b37a9e98b8d02324ba3e0e17382941636c45190c03ad5584

See more details on using hashes here.

File details

Details for the file spectro_connect-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spectro_connect-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for spectro_connect-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6306ea73265e30485a5a522a85e77f08264c1db933dce276558e3479637c00e1
MD5 c4a7ffdf28f35f4c72f04f6c67e719c8
BLAKE2b-256 77f7bd72da58e89b16f54a1987ec5560316f368c8e0040797dcb4d12d63bd76c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page