Skip to main content

Silverpeak SD-WAN Command Line Interface

Project description

https://img.shields.io/badge/License-Apache_2.0-blue.svg https://img.shields.io/github/issues/ipHeaders/spcli https://img.shields.io/github/v/tag/ipHeaders/spcli https://github.com/ipHeaders/spcli/actions/workflows/publish-to-pypi.yml/badge.svg

Silverpeak/Aruba SD-WAN Command Line Interface This CLI tool is to query the Silverpeal/Aruba SD-WAN orchestrator and output the information in your terminal.

Getting Started

Requierements

  • Python >=3.7

  • User with API KEY

To get started, install the CLI tool from Pypi

pip3 install pyspcli

or download it directly from github:

pip3 install git+https://github.com/NetDevLazg/spcli.git

Once the installation is successful, you will need to create a file with your api credentials.

  • Create a folder in the following directory mkdir ~/.spcli

  • Create a yml file with your credentials in .spcli directory

  • Using vim
    • vim ~/.spcli/creds.yml

  • Using nano
    • nano ~/.spcli/creds.yml

The yml file needs to have the following variables. Example:

url: silverpeak-orch-use1.silverpeak.cloud
token: a38b3360bb4d06fed7e53f77c8752d74bb4faeb4295385a25e02ebc2594d9074a16bb115fce4d4dc9826d824950504b6d23373

After the file is created and saved, please verify the cli tool version using the following command:

sp -v
version...installed: 0.0.6

Possible Errors

If you receive an error saying “Command not found” make sure to add the location where the package is installed to your $PATH

Possible error:

WARNING: The script sp is installed in '/Users/John/Library/Python/3.8/bin' which is not on PATH.

Fix:

export PATH='$PATH:/Users/John/Library/Python/3.8/bin'

Help Function

To check possible commands, use the -h flag after a command. for example:

sp -h
usage: sp [-h] [-d] [-v] {orch,appliance,bgp} ...

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           debug the cli
  -v, --version         shows cli tool version

Silvperpeak Commands:
  {orch,appliance,bgp,flows}
    orch                orchesrator commands
    appliance           edge connect appliance commands
    bgp                 edge connect bgp commands
    flows               flows statistics on edge connect
    ospf                edge connect ospf commands

Examples

Check devices:

sp appliance

+-------+---------------+----------------+-------------------+--------+------------------------+-----------------+-----------------+--------+
|  id   |     site      |       IP       |      serial       |  mode  |       hostName         | softwareVersion | systemBandwidth | haPeer |
+-------+---------------+----------------+-------------------+--------+------------------------+-----------------+-----------------+--------+
| 18.NE | aws-east-2    |  100.100.11.4  | 00-FF-BC-FF-3A-A6 | router | silverpeak-edge-01     |  9.0.6.2_90185  |     1000000     |        |
| 17.NE | aws-east-2    | 100.100.20.241 | 00-FF-BC-FF-3A-A7 | router | silverpeak-edge-02     |  9.0.6.2_90185  |     1000000     |        |
| 14.NE | aws-east-2    | 100.100.0.241  | 00-FF-BC-FF-38-52 | router | silverpeak-edge-03     |  9.0.6.2_90185  |     1000000     |        |
| 13.NE | aws-east-1    | 100.100.0.206  | 00-FF-BC-FF-38-54 | router | silverpeak-edge-04     |  9.0.6.2_90185  |     1000000     |        |
| 15.NE | aws-east-1    |  100.100.4.18  | 00-FF-BC-FF-38-53 | router | silverpeak-edge-05     |  9.0.6.2_90185  |     1000000     |        |
| 16.NE | aws-east-1    | 100.100.12.212 | 00-FF-BC-FF-3A-A5 | router | silverpeak-edge-06     |  9.0.6.2_90185  |     1000000     |        |
+-------+---------------+----------------+-------------------+--------+------------------------+-----------------+-----------------+--------+

Check bgp summary, must pass the appliance ID:

sp bgp -summary 18

+----------------+----------------+-------+----------------+----------+------------------+------------------+-----------+-----------+
|    local_ip    |    peer_ip     |  asn  | peer_state_str | last_err | last_err_subcode | time_established | rcvd_pfxs | sent_pfxs |
+----------------+----------------+-------+----------------+----------+------------------+------------------+-----------+-----------+
| 169.254.240.31 | 169.254.240.32 | 64535 |  Established   |    4     |        0         |      900685      |     1     |     2     |
| 169.254.240.31 | 169.254.240.33 | 64535 |  Established   |    4     |        0         |      900777      |     1     |     2     |
| 169.254.241.31 | 169.254.241.34 | 64534 |  Established   |    4     |        0         |      787280      |     1     |     2     |
| 169.254.241.31 | 169.254.241.35 | 64534 |  Established   |    4     |        0         |      782741      |     1     |     2     |
+----------------+----------------+-------+----------------+----------+------------------+------------------+-----------+-----------+

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

pyspcli-0.1.3.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

pyspcli-0.1.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pyspcli-0.1.3.tar.gz.

File metadata

  • Download URL: pyspcli-0.1.3.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyspcli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a413cf3023f692d927300256510f20e8da20d76046c14129c495f885ed6371ce
MD5 dab8368249f2026cc3c89246eeecdf7b
BLAKE2b-256 af98a3e0c0b9b4d0d729bdc1a34fdba4cdcf1c5be4c7702df7b552b5948a68bb

See more details on using hashes here.

File details

Details for the file pyspcli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyspcli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyspcli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 82e92f674eee871192c8ebcf076e8e883bb01a5ddccf32647462987f23711cab
MD5 2f818de675b825149686a3f2ea27d0c5
BLAKE2b-256 203ed12fa4bf2a53e9c0d13c53bc1f4c78249f5deda84e029a779eb447ac616f

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