Skip to main content

Spec-driven network API CLI for operators, with first-class ClearPass support

Project description

 _   _      _   _
| \ | | ___| |_| | ___   ___  _ __ ___
|  \| |/ _ \ __| |/ _ \ / _ \| '_ ` _ \
| |\  |  __/ |_| | (_) | (_) | | | | | |
|_| \_|\___|\__|_|\___/ \___/|_| |_| |_|

A CLI for working with network APIs — easy, consistent, safe, and fast.

Version Python Platform

About

netloom is a plugin-backed network API CLI for operators and automation engineers. It lets you interact with network APIs through a consistent CLI with a shared command model, context-aware help and tab completion. It keeps server profiles and discovery data organized locally, and supports day-to-day tasks such as list, create, update or delete objects as well as compare and copy configuration between servers.

HPE Aruba ClearPass is a bundled plugin with netloom.

Installation

Install from PyPI:

pip install netloom-tool

Install directly from GitHub:

pip install git+https://github.com/mathias-granlund/netloom

Install the bundled man pages:

netloom-install-manpage
man netloom
man netloom-clearpass

Configuration

Example templates are included as defaults.env.example, profiles.env.example, and credentials.env.example.

For ClearPass, the minimal layout is:

~/.config/netloom/config.env
~/.config/netloom/plugins/clearpass/defaults.env
~/.config/netloom/plugins/clearpass/profiles/<profile>.env
~/.config/netloom/plugins/clearpass/credentials/<profile>.env

Required profile connection settings in profiles/<profile>.env:

NETLOOM_SERVER="server.example.com:443"

Required credentials in credentials/<profile>.env:

NETLOOM_CLIENT_ID="your-client-id"
NETLOOM_CLIENT_SECRET_REF="<profile>/client-secret"
# Optional plaintext fallback:
# NETLOOM_CLIENT_SECRET="your-client-secret"

If you use an OS keychain, store the referenced secret with:

python -m keyring set netloom/clearpass <profile>/client-secret

First Run / Quick Start

netloom load clearpass
netloom server use <profile>
netloom cache update
netloom identities endpoint list --limit=10

That initial cache update is what enables richer help, completion, and live module/service discovery for the active server.

CLI Examples

List a few endpoints from the active profile:

netloom identities endpoint list --limit=10

Filter a list request with shorthand syntax:

netloom identities endpoint list --filter=name:contains:guest

Fetch one object and print it to the terminal:

netloom policyelements network-device get --id=1001 --console

Compare the same service between two profiles:

netloom policyelements network-device diff --from=dev --to=prod --all --max-items=25

Preview a cross-profile copy without writing changes:

netloom policyelements network-device copy --from=dev --to=prod --all --dry-run

Feature Roadmap

  • Multi-service copy workflows
  • Extended validation and dry-run features
  • Version tracking for configs changes
  • GUI on top of CLI

Deeper Docs

For full command reference and plugin-specific details:

  • Shared CLI reference: man netloom or man/netloom.md
  • ClearPass plugin reference: man netloom-clearpass or man/netloom-clearpass.md
  • Shell completion setup and generic --filter= syntax: man netloom
  • ClearPass-oriented filter and workflow examples: man netloom-clearpass
  • Live action help from your current cache: netloom <module> <service> ?

Detailed release history is in CHANGELOG.md.

Development

pip install -e .[dev]
pytest -q
ruff check .
ruff format .
python -m build
python -m twine check dist/*

License

Proprietary / Internal Use
See LICENSE.

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

netloom_tool-1.9.5.tar.gz (106.2 kB view details)

Uploaded Source

Built Distribution

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

netloom_tool-1.9.5-py3-none-any.whl (77.4 kB view details)

Uploaded Python 3

File details

Details for the file netloom_tool-1.9.5.tar.gz.

File metadata

  • Download URL: netloom_tool-1.9.5.tar.gz
  • Upload date:
  • Size: 106.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netloom_tool-1.9.5.tar.gz
Algorithm Hash digest
SHA256 de28b400d2c30f517840f22762f5cec1c83e75fbcbcba36eb686aecd676ece80
MD5 2fd50cdd3399bfd4fe0370b76a130bd3
BLAKE2b-256 a1617e5278bb88020c0420f4c160769cd47cbdea7c328a1c2b981993851dbb7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netloom_tool-1.9.5.tar.gz:

Publisher: package.yml on mathias-granlund/netloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netloom_tool-1.9.5-py3-none-any.whl.

File metadata

  • Download URL: netloom_tool-1.9.5-py3-none-any.whl
  • Upload date:
  • Size: 77.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netloom_tool-1.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1a2778eed90eea55c93449b47393e4fdfa7520b58fddce3d612a60b37670e822
MD5 85b50c5785ee80c0591b6b0e659c9c3d
BLAKE2b-256 f320d2e9a9342d03265af4aa27dda421fe7611148871add392944ea92acc671f

See more details on using hashes here.

Provenance

The following attestation bundles were made for netloom_tool-1.9.5-py3-none-any.whl:

Publisher: package.yml on mathias-granlund/netloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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