# Aruba Central API CLI
[![Latest Version](https://img.shields.io/pypi/v/centralcli.svg)](https://pypi.org/project/centralcli)
[![Documentation Status](https://readthedocs.org/projects/central-api-cli/badge/?version=latest)](https://central-api-cli.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://static.pepy.tech/badge/centralcli)](https://pepy.tech/project/centralcli)
[![PyPI - Installs](https://img.shields.io/pypi/dm/centralcli.svg?color=blue&label=Installs&logo=pypi&logoColor=gold)](https://pypi.org/project/centralcli/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)
A CLI app for interacting with Aruba Central Cloud Management Platform. With cross-platform shell support. Auto Completion, easy device/site/group/template identification (fuzzy match), support for batch import, and a lot more.
> As commands are built out the CLI hierarchy may evolve. Refer to the [documentation](https://central-api-cli.readthedocs.org) or help text for CLI structure/syntax.
![centralcli Animated Demo](https://raw.githubusercontent.com/Pack3tL0ss/central-api-cli/master/docs/img/cencli-demo.gif)
## Known Issues
When running with Python 3.12 it's possible to see a number of SyntaxWarning messages regarding "invaslid escape sequence". This is due to a change in behavior in 3.12. This will be resolved in an upcoming release. The warnings do not impact functionality.
## Features
- Cross Platform Support
- Auto/TAB Completion
- Specify device, site, etc. by fuzzy match of multiple fields (i.e. name, mac, serial#, ip address)
- Multiple output formats
- Output to file
- Numerous import formats (csv, yaml, json, etc.)
- Multiple account support (easily switch between different central accounts `--account myotheraccount`)
- Batch Operation based on data from input file. i.e. Add sites in batch based on data from a csv.
- Automatic Token refresh. With prompt to paste in a new token if it becomes invalid.
> If using Tokens, dedicate the token to the CLI alone, using it in swagger or on another system, will eventually lead to a refresh that invalidates the tokens on the other systems using it.
- You can also use username/Password Auth. which will facilitate automatic retrieval of new Tokens even if they do become invalid.
## Installation
The recommended method is to use uv, which is a single Rust binary that you can use to install Python apps. It's significantly faster than alternative tools, and will get you up and running with Posting in seconds. `uv` will install `centralcli` in an isolated environment and expose the `cencli` command in PATH.
You don't even need to worry about installing Python yourself - uv will manage everything for you.
### uv
#### Install `uv` on Linx/Mac:
```bash
# quick install on MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
```
#### Install `uv` on Windows:
```bash
# quick install on Windows via PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
> Changing the execution policy allows running a script from the internet.
`uv` can also be installed via Homebrew, Cargo, Winget, pipx, and more. See the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) for more information.
#### Install `centralcli` via `uv`
```bash
# install centralcli (will also quickly install Python 3.11 if needed)
uv tool install --python 3.11 centralcli
```
Then to Upgrade `centralcli`
```bash
uv tool upgrade centralcli
```
### pipx
`centralcli` can also be installed via pipx, similar to `uv` pipx will install `centralcli` in an isolated environment, and expose the `cencli` command in PATH.
> The first section below is for Debian based systems refer to [pipx documentation](https://pipx.pypa.io/stable/installation/) for instructions on other OSs.
```bash
# install pipx (Debian)
sudo apt update
sudo apt install pipx
pipx ensurepath
# install central CLI
pipx install centralcli --include-deps
# optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.
pipx install centralcli[speedups] --force # force if centralcli was already installed and you are just adding speedups
```
Then to Upgrade `centralcli`
```bash
pip upgrade centralcli
```
### pip (manually install in virtual environment)
> The example below is for Debian based systems, where `apt` is referenced but should be easy to translate to other OSs given you have some familiarity with the package management commands (i.e. `dnf`). On Windows python should install with pip. The pip commands are still valid.
```shell
# (Debian) If you don't have pip
sudo apt update
sudo apt install python3-pip
sudo apt install python3-virtualenv
# create a directory to store the venv in
cd ~ # ensure you are in your home dir
mkdir .venvs # creates hidden .venvs dir to store venv in
cd .venvs # change to that directory
export DEB_PYTHON_INSTALL_LAYOUT='deb' # Just ensures the directory structure for simpler instructions (Ubuntu 22.04 changed the dir layout of venvs without it)
python3 -m virtualenv centralcli --prompt cencli # prompt is optional
source centralcli/bin/activate # activates the venv
# Install centralcli
pip install centralcli
# optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.
pip install centralcli[speedups]
which centralcli # Should return ~/.venvs/centralcli/bin/centralcli
# for BASH shell Update .bashrc to update PATH on login (keep the single quotes)
echo 'export PATH="$PATH:$HOME/.venvs/centralcli/bin"' >> ~/.bashrc
# for zsh or others, do the equivalent... i.e. update .zshrc in a similar manner
```
Then to upgrade:
```bash
~/.venvs/centralcli/bin/pip install -U centralcli
```
### pip (in system python environment)
[Requires python3.9 or above and pip.](#if-you-dont-have-python)
It's recommended to use the `uv` install method above, however if you don't use a lot of python apps (meaning a dependency conflict with other apps is not a concern). Then simply installing via pip is possible (*albeit not recommended*).
> This method is primarily feasible on Windows, as current versions of many Linux distributions do not allow installing apps in the system python environment.
```bash
pip install centralcli
# optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.
pip install centralcli[speedups]
```
Then to upgrade:
```bash
pip install -U centralcli
```
### if you don't have python
- You can get it for any platform @ [https://www.python.org](https://www.python.org)
- On Windows 10 it's also available in the Windows store, and via winget.
## Configuration
✨ pre-populating the config as described below is optional. Central CLI will prompt for the information it needs on first run if no config exists.
> It's still a good idea to look over the example config to see the optional config items.
Refer to [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example) to guide in the creation of config.yaml and place in the config directory.
Central CLI will look in \<Users home dir\>/.config/centralcli, and \<Users home dir\>\\.centralcli.
i.e. on Windows `c:\Users\wade\.centralcli` or on Linux `/home/wade/.config/centralcli`
Once `config.yaml` is populated per [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example), run some test commands to validate the config.
For Example `cencli show all`
```bash
wade@wellswa6:~ $ cencli show all
All Devices
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
name type model ip mac serial group site labels version status
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
6100F-48-LAB cx 6100 48G CL4 4SFP+ Swch 10.0.40.11 --redacted-- --redacted-- WadeLab8x 10.08.1010 Down
(JL675A)
SDBranch1:7008 gw A7008 192.168.240.101 --redacted-- --redacted-- Branch1 Antigua Branch View 10.3.0.0_82528 Up
br1-2930F-sw sw Aruba2930F-8G-PoE+-2SFP+ 10.101.5.4 --redacted-- --redacted-- Branch1 Antigua Branch View 16.11.0002 Up
Switch(JL258A)
br1-315.0c88-ap ap 315 10.101.6.200 --redacted-- --redacted-- Branch1 Antigua Branch View 10.3.0.0_82528 Up
MB1-505h ap 505H 10.10.1.101 --redacted-- --redacted-- MicroBranch1 Champions Hill 10.3.0.0_82528 Up
6200F-Bot cx 6200F 48G CL4 4SFP+740W Swch 10.0.40.16 --redacted-- --redacted-- WadeLab8x Pommore 10.08.1010 Down
(JL728A)
6200F-Top cx 6200F 48G CL4 4SFP+740W Swch 10.0.40.6 --redacted-- --redacted-- WadeLab8x Pommore 10.08.1010 Down
(JL728A)
APGW1 gw A9004-LTE 10.0.35.10 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up
APGW2 gw A9004 10.0.35.20 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up
VPNC1 gw A7005 172.30.0.242 --redacted-- --redacted-- VPNC WadeLab Branch View 10.3.0.0_82528 Up
VPNC2 gw A7005 172.30.0.243 --redacted-- --redacted-- VPNC WadeLab Branch View 10.3.0.0_82528 Up
av-555.11b8-ap ap 555 10.0.31.155 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
barn-303p.2c30-ap ap 303P 10.1.30.151 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up
barn-4100i cx 4100i 12G CL4/6 POE 2SFP+ DIN 10.1.30.152 --redacted-- --redacted-- WadeLab WadeLab 10.08.1010 Up
Sw (JL817A)
barn-518.2816-ap ap 518 10.1.30.101 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up
bsmt-515.51s9-ap ap 515 10.0.30.233 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
craft-2930F sw Aruba2930F-8G-PoE+-2SFP+ 10.0.30.5 --redacted-- --redacted-- WadeLab WadeLab 16.11.0002 Up
Switch(JL258A)
garage-345.5136-ap ap 345 10.0.31.148 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
ktcn-505H.206c-ap ap 505H 10.0.30.212 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
lwrptio-575.0824-ap ap 575 10.0.30.219 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
zrm-535.70be-ap ap 535 10.0.31.101 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Show all displays fields common to all device types. To see all columns for a given device type use show <DEVICE TYPE>
API Rate Limit: 925 of 1000 remaining.
```
Use `cencli ?` to become familiar with the command options.
### Auto Completion
The CLI supports auto-completion. To configure auto-completion run `cencli --install-completion`. This will auto-detect the type of shell you are running in, and install the necessary completion into your profile. You'll need to exit the shell and start a new session for it to take effect.
> Note for OSX 11: Additional step, edit .zshrc and add "autoload -Uz compinit && compinit -i" then exit and start new session.
## Usage Notes
### Caching & Friendly identifiers
- Caching: The CLI caches information on all devices, sites, groups and templates along with some other items. It's a minimal amount per device, and is done to allow human friendly identifiers. The API typically accepts serial #, site id, etc. This function allows you to specify a device by name, IP, mac (any format), and serial.
The lookup sequence for a device:
1. Exact Match of any of the identifier fields (name, ip, mac, serial)
2. case insensitive match
3. case insensitive match disregarding all hyphens and underscores (in case you type 6200f_bot and the device name is 6200F-Bot)
4. Case insensitive Fuzzy match with implied wild-card, otherwise match any devices that start with the identifier provided. `cencli show switches 6200F` will result in a match of `6200F-Bot`.
5. If a typo was made, and an item is a close match, you will be prompted to confirm that's what you meant.
> If there is no match found, a cache update is triggered, and the match rules are re-tried.
- Caching works in a similar manner for groups, templates, and sites. Sites can match on name and nearly any address field. So if you only had one site in San Antonio you could specify that site with `show sites 'San Antonio'` \<-- Note the use of quotes because there is a space in the name.
- **Multiple Matches**: If a provided identifier is ambiguous, meaning there are multiple matches. You will be prompted to select the intended device from a list of the matches.
### Output Formats
There are a number of output formats available. Most commands default to what is likely the easiest to view given the number of fields. Otherwise longer outputs are typically displayed vertically by default. If the output can reasonably fit, it's displayed in tabular format horizontally.
You can specify the output format with command line flags `--json`, `--yaml`, `--csv`, `--table` rich is tabular format with folding (multi line within the same row) and truncating.
> Most outputs will evolve to support an output with the most commonly desired fields by default and expanded vertical output via the `-v` option (not implemented yet.). Currently the output is tabular horizontally if the amount of data is likely to fit most displays, and vertical otherwise.
### File Output
Just use `--out \<filename\>` (or \<path\\filename\>), and specify the desired format.
## CLI Tree
Use `?` or `--help` from the cli, which you can do at any level. `ccenli ?`, `cencli bounce --help` etc.
You can also see the entire supported tree via the [CLI Reference Guide](https://central-api-cli.readthedocs.io/en/latest/cli.html).
*NOTE: The Reference Guide documents a few commands that are hidden in the CLI*
Raw data
{
"_id": null,
"home_page": "https://github.com/Pack3tL0ss/central-api-cli",
"name": "centralcli",
"maintainer": "Wade Wells (Pack3tL0ss)",
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": "wade@consolepi.org",
"keywords": "cli, Aruba, Aruba Networks, Aruba Central, HPE, API, RESTFUL, REST",
"author": "Wade Wells (Pack3tL0ss)",
"author_email": "wade@consolepi.org",
"download_url": "https://files.pythonhosted.org/packages/1d/4e/082424e9d9f5bfb22b2f02c212ec4282991c38d8393b4f633d8325af902e/centralcli-8.0.1.tar.gz",
"platform": null,
"description": "# Aruba Central API CLI\n\n[![Latest Version](https://img.shields.io/pypi/v/centralcli.svg)](https://pypi.org/project/centralcli)\n[![Documentation Status](https://readthedocs.org/projects/central-api-cli/badge/?version=latest)](https://central-api-cli.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://static.pepy.tech/badge/centralcli)](https://pepy.tech/project/centralcli)\n[![PyPI - Installs](https://img.shields.io/pypi/dm/centralcli.svg?color=blue&label=Installs&logo=pypi&logoColor=gold)](https://pypi.org/project/centralcli/)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n\nA CLI app for interacting with Aruba Central Cloud Management Platform. With cross-platform shell support. Auto Completion, easy device/site/group/template identification (fuzzy match), support for batch import, and a lot more.\n\n > As commands are built out the CLI hierarchy may evolve. Refer to the [documentation](https://central-api-cli.readthedocs.org) or help text for CLI structure/syntax.\n\n![centralcli Animated Demo](https://raw.githubusercontent.com/Pack3tL0ss/central-api-cli/master/docs/img/cencli-demo.gif)\n\n## Known Issues\nWhen running with Python 3.12 it's possible to see a number of SyntaxWarning messages regarding \"invaslid escape sequence\". This is due to a change in behavior in 3.12. This will be resolved in an upcoming release. The warnings do not impact functionality.\n\n## Features\n\n- Cross Platform Support\n- Auto/TAB Completion\n- Specify device, site, etc. by fuzzy match of multiple fields (i.e. name, mac, serial#, ip address)\n- Multiple output formats\n- Output to file\n- Numerous import formats (csv, yaml, json, etc.)\n- Multiple account support (easily switch between different central accounts `--account myotheraccount`)\n- Batch Operation based on data from input file. i.e. Add sites in batch based on data from a csv.\n- Automatic Token refresh. With prompt to paste in a new token if it becomes invalid.\n > If using Tokens, dedicate the token to the CLI alone, using it in swagger or on another system, will eventually lead to a refresh that invalidates the tokens on the other systems using it.\n- You can also use username/Password Auth. which will facilitate automatic retrieval of new Tokens even if they do become invalid.\n\n## Installation\n\nThe recommended method is to use uv, which is a single Rust binary that you can use to install Python apps. It's significantly faster than alternative tools, and will get you up and running with Posting in seconds. `uv` will install `centralcli` in an isolated environment and expose the `cencli` command in PATH.\n\nYou don't even need to worry about installing Python yourself - uv will manage everything for you.\n\n### uv\n#### Install `uv` on Linx/Mac:\n```bash\n# quick install on MacOS/Linux\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n#### Install `uv` on Windows:\n```bash\n# quick install on Windows via PowerShell\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n> Changing the execution policy allows running a script from the internet.\n\n`uv` can also be installed via Homebrew, Cargo, Winget, pipx, and more. See the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) for more information.\n\n\n#### Install `centralcli` via `uv`\n```bash\n# install centralcli (will also quickly install Python 3.11 if needed)\nuv tool install --python 3.11 centralcli\n```\n\nThen to Upgrade `centralcli`\n```bash\nuv tool upgrade centralcli\n```\n\n### pipx\n`centralcli` can also be installed via pipx, similar to `uv` pipx will install `centralcli` in an isolated environment, and expose the `cencli` command in PATH.\n\n> The first section below is for Debian based systems refer to [pipx documentation](https://pipx.pypa.io/stable/installation/) for instructions on other OSs.\n ```bash\n # install pipx (Debian)\n sudo apt update\n sudo apt install pipx\n pipx ensurepath\n\n # install central CLI\n pipx install centralcli --include-deps\n\n # optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.\n pipx install centralcli[speedups] --force # force if centralcli was already installed and you are just adding speedups\n ```\n\nThen to Upgrade `centralcli`\n```bash\npip upgrade centralcli\n```\n\n### pip (manually install in virtual environment)\n\n> The example below is for Debian based systems, where `apt` is referenced but should be easy to translate to other OSs given you have some familiarity with the package management commands (i.e. `dnf`). On Windows python should install with pip. The pip commands are still valid.\n ```shell\n # (Debian) If you don't have pip\n sudo apt update\n sudo apt install python3-pip\n sudo apt install python3-virtualenv\n\n # create a directory to store the venv in\n cd ~ # ensure you are in your home dir\n mkdir .venvs # creates hidden .venvs dir to store venv in\n cd .venvs # change to that directory\n export DEB_PYTHON_INSTALL_LAYOUT='deb' # Just ensures the directory structure for simpler instructions (Ubuntu 22.04 changed the dir layout of venvs without it)\n python3 -m virtualenv centralcli --prompt cencli # prompt is optional\n source centralcli/bin/activate # activates the venv\n\n # Install centralcli\n pip install centralcli\n\n # optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.\n pip install centralcli[speedups]\n\n which centralcli # Should return ~/.venvs/centralcli/bin/centralcli\n\n # for BASH shell Update .bashrc to update PATH on login (keep the single quotes)\n echo 'export PATH=\"$PATH:$HOME/.venvs/centralcli/bin\"' >> ~/.bashrc\n\n # for zsh or others, do the equivalent... i.e. update .zshrc in a similar manner\n ```\n\n Then to upgrade:\n```bash\n~/.venvs/centralcli/bin/pip install -U centralcli\n```\n\n### pip (in system python environment)\n[Requires python3.9 or above and pip.](#if-you-dont-have-python)\n\nIt's recommended to use the `uv` install method above, however if you don't use a lot of python apps (meaning a dependency conflict with other apps is not a concern). Then simply installing via pip is possible (*albeit not recommended*).\n> This method is primarily feasible on Windows, as current versions of many Linux distributions do not allow installing apps in the system python environment.\n\n\n```bash\npip install centralcli\n\n# optional install speedups for centralcli (this pulls in additional optional dependencies, that can improve performance.) Minimal impact in most scenarios.\npip install centralcli[speedups]\n```\n\nThen to upgrade:\n```bash\npip install -U centralcli\n```\n\n### if you don't have python\n\n- You can get it for any platform @ [https://www.python.org](https://www.python.org)\n- On Windows 10 it's also available in the Windows store, and via winget.\n\n## Configuration\n\u2728 pre-populating the config as described below is optional. Central CLI will prompt for the information it needs on first run if no config exists.\n> It's still a good idea to look over the example config to see the optional config items.\n\nRefer to [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example) to guide in the creation of config.yaml and place in the config directory.\n\nCentral CLI will look in \\<Users home dir\\>/.config/centralcli, and \\<Users home dir\\>\\\\.centralcli.\ni.e. on Windows `c:\\Users\\wade\\.centralcli` or on Linux `/home/wade/.config/centralcli`\n\nOnce `config.yaml` is populated per [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example), run some test commands to validate the config.\n\nFor Example `cencli show all`\n\n```bash\nwade@wellswa6:~ $ cencli show all\n All Devices\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n name type model ip mac serial group site labels version status\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n 6100F-48-LAB cx 6100 48G CL4 4SFP+ Swch 10.0.40.11 --redacted-- --redacted-- WadeLab8x 10.08.1010 Down\n (JL675A)\n SDBranch1:7008 gw A7008 192.168.240.101 --redacted-- --redacted-- Branch1 Antigua Branch View 10.3.0.0_82528 Up\n br1-2930F-sw sw Aruba2930F-8G-PoE+-2SFP+ 10.101.5.4 --redacted-- --redacted-- Branch1 Antigua Branch View 16.11.0002 Up\n Switch(JL258A)\n br1-315.0c88-ap ap 315 10.101.6.200 --redacted-- --redacted-- Branch1 Antigua Branch View 10.3.0.0_82528 Up\n MB1-505h ap 505H 10.10.1.101 --redacted-- --redacted-- MicroBranch1 Champions Hill 10.3.0.0_82528 Up\n 6200F-Bot cx 6200F 48G CL4 4SFP+740W Swch 10.0.40.16 --redacted-- --redacted-- WadeLab8x Pommore 10.08.1010 Down\n (JL728A)\n 6200F-Top cx 6200F 48G CL4 4SFP+740W Swch 10.0.40.6 --redacted-- --redacted-- WadeLab8x Pommore 10.08.1010 Down\n (JL728A)\n APGW1 gw A9004-LTE 10.0.35.10 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up\n APGW2 gw A9004 10.0.35.20 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up\n VPNC1 gw A7005 172.30.0.242 --redacted-- --redacted-- VPNC WadeLab Branch View 10.3.0.0_82528 Up\n VPNC2 gw A7005 172.30.0.243 --redacted-- --redacted-- VPNC WadeLab Branch View 10.3.0.0_82528 Up\n av-555.11b8-ap ap 555 10.0.31.155 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n barn-303p.2c30-ap ap 303P 10.1.30.151 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up\n barn-4100i cx 4100i 12G CL4/6 POE 2SFP+ DIN 10.1.30.152 --redacted-- --redacted-- WadeLab WadeLab 10.08.1010 Up\n Sw (JL817A)\n barn-518.2816-ap ap 518 10.1.30.101 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82528 Up\n bsmt-515.51s9-ap ap 515 10.0.30.233 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n craft-2930F sw Aruba2930F-8G-PoE+-2SFP+ 10.0.30.5 --redacted-- --redacted-- WadeLab WadeLab 16.11.0002 Up\n Switch(JL258A)\n garage-345.5136-ap ap 345 10.0.31.148 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n ktcn-505H.206c-ap ap 505H 10.0.30.212 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n lwrptio-575.0824-ap ap 575 10.0.30.219 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n zrm-535.70be-ap ap 535 10.0.31.101 --redacted-- --redacted-- WLNET WadeLab 10.3.0.0_82463 Down\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Show all displays fields common to all device types. To see all columns for a given device type use show <DEVICE TYPE>\n API Rate Limit: 925 of 1000 remaining.\n\n```\n\nUse `cencli ?` to become familiar with the command options.\n\n### Auto Completion\n\nThe CLI supports auto-completion. To configure auto-completion run `cencli --install-completion`. This will auto-detect the type of shell you are running in, and install the necessary completion into your profile. You'll need to exit the shell and start a new session for it to take effect.\n> Note for OSX 11: Additional step, edit .zshrc and add \"autoload -Uz compinit && compinit -i\" then exit and start new session.\n\n## Usage Notes\n\n### Caching & Friendly identifiers\n\n- Caching: The CLI caches information on all devices, sites, groups and templates along with some other items. It's a minimal amount per device, and is done to allow human friendly identifiers. The API typically accepts serial #, site id, etc. This function allows you to specify a device by name, IP, mac (any format), and serial.\n\nThe lookup sequence for a device:\n\n 1. Exact Match of any of the identifier fields (name, ip, mac, serial)\n 2. case insensitive match\n 3. case insensitive match disregarding all hyphens and underscores (in case you type 6200f_bot and the device name is 6200F-Bot)\n 4. Case insensitive Fuzzy match with implied wild-card, otherwise match any devices that start with the identifier provided. `cencli show switches 6200F` will result in a match of `6200F-Bot`.\n 5. If a typo was made, and an item is a close match, you will be prompted to confirm that's what you meant.\n\n> If there is no match found, a cache update is triggered, and the match rules are re-tried.\n\n- Caching works in a similar manner for groups, templates, and sites. Sites can match on name and nearly any address field. So if you only had one site in San Antonio you could specify that site with `show sites 'San Antonio'` \\<-- Note the use of quotes because there is a space in the name.\n\n- **Multiple Matches**: If a provided identifier is ambiguous, meaning there are multiple matches. You will be prompted to select the intended device from a list of the matches.\n\n### Output Formats\n\nThere are a number of output formats available. Most commands default to what is likely the easiest to view given the number of fields. Otherwise longer outputs are typically displayed vertically by default. If the output can reasonably fit, it's displayed in tabular format horizontally.\n\nYou can specify the output format with command line flags `--json`, `--yaml`, `--csv`, `--table` rich is tabular format with folding (multi line within the same row) and truncating.\n\n> Most outputs will evolve to support an output with the most commonly desired fields by default and expanded vertical output via the `-v` option (not implemented yet.). Currently the output is tabular horizontally if the amount of data is likely to fit most displays, and vertical otherwise.\n\n### File Output\n\nJust use `--out \\<filename\\>` (or \\<path\\\\filename\\>), and specify the desired format.\n\n## CLI Tree\n\nUse `?` or `--help` from the cli, which you can do at any level. `ccenli ?`, `cencli bounce --help` etc.\n\nYou can also see the entire supported tree via the [CLI Reference Guide](https://central-api-cli.readthedocs.io/en/latest/cli.html).\n*NOTE: The Reference Guide documents a few commands that are hidden in the CLI*\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI for interacting with Aruba Central (Cloud Management Platform). Facilitates bulk imports, exports, reporting. A handy tool if you have devices managed by Aruba Central.",
"version": "8.0.1",
"project_urls": {
"Documentation": "https://central-api-cli.readthedocs.org",
"Homepage": "https://github.com/Pack3tL0ss/central-api-cli",
"Repository": "https://github.com/Pack3tL0ss/central-api-cli"
},
"split_keywords": [
"cli",
" aruba",
" aruba networks",
" aruba central",
" hpe",
" api",
" restful",
" rest"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f020f101bcf281789ce1bda4d9e39d411b44f527c0368ce9b69988d014d00df",
"md5": "645e361da2647dae7679fab311a5a161",
"sha256": "b0f305606091c81ffee62e408f0f53f16a674a15cc32e4533df0f7c52d23ad19"
},
"downloads": -1,
"filename": "centralcli-8.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "645e361da2647dae7679fab311a5a161",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 550467,
"upload_time": "2024-12-15T18:40:31",
"upload_time_iso_8601": "2024-12-15T18:40:31.826628Z",
"url": "https://files.pythonhosted.org/packages/1f/02/0f101bcf281789ce1bda4d9e39d411b44f527c0368ce9b69988d014d00df/centralcli-8.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1d4e082424e9d9f5bfb22b2f02c212ec4282991c38d8393b4f633d8325af902e",
"md5": "dd81e33631867daeb86dfafbb65620e4",
"sha256": "9810f5cc9d05d0fc4259f87c54b0f2a676856dcd728bb45acebaa0ec3ad3f49b"
},
"downloads": -1,
"filename": "centralcli-8.0.1.tar.gz",
"has_sig": false,
"md5_digest": "dd81e33631867daeb86dfafbb65620e4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 513019,
"upload_time": "2024-12-15T18:40:33",
"upload_time_iso_8601": "2024-12-15T18:40:33.736616Z",
"url": "https://files.pythonhosted.org/packages/1d/4e/082424e9d9f5bfb22b2f02c212ec4282991c38d8393b4f633d8325af902e/centralcli-8.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-15 18:40:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Pack3tL0ss",
"github_project": "central-api-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "colorama",
"specs": []
},
{
"name": "click",
"specs": [
[
"<=",
"7.1.2"
]
]
},
{
"name": "pygments",
"specs": []
},
{
"name": "tabulate",
"specs": []
},
{
"name": "typer",
"specs": [
[
"==",
"0.10.0"
]
]
},
{
"name": "pylibyaml",
"specs": []
},
{
"name": "pyYAML",
"specs": []
},
{
"name": "tinydb",
"specs": []
},
{
"name": "shellingham",
"specs": []
},
{
"name": "pendulum",
"specs": []
},
{
"name": "pycentral",
"specs": [
[
">=",
"0.0.3"
]
]
},
{
"name": "aiohttp",
"specs": []
},
{
"name": "asyncio",
"specs": []
},
{
"name": "rich",
"specs": [
[
">=",
"10.0"
]
]
},
{
"name": "tablib",
"specs": []
},
{
"name": "jinja2",
"specs": []
},
{
"name": "fastapi",
"specs": []
},
{
"name": "uvicorn",
"specs": []
},
{
"name": "psutil",
"specs": []
},
{
"name": "pydantic",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "ipaddress",
"specs": []
},
{
"name": "fuzzywuzzy",
"specs": []
},
{
"name": "levenshtein",
"specs": []
},
{
"name": "uniplot",
"specs": []
},
{
"name": "eval_type_backport",
"specs": []
}
],
"lcname": "centralcli"
}