Skip to main content

OpenStack Load Balancer Tree View

PyPI version License Python versions

A Python script that displays a tree view of all loadbalancers in an OpenStack project, showing pools and members in a hierarchical structure.

Features

  • Displays loadbalancers as root nodes
  • Shows pools as children of loadbalancers
  • Shows members as children of pools
  • Highlights members with provisioning_status != ACTIVE (yellow/bold)
  • Displays members with operating_status != ONLINE in red
  • Single LB: Show the tree for one load balancer by name or ID (--lb)
  • Filter mode: Show only problematic members (not ACTIVE/ONLINE) and pools with no members
  • Collapse mode: Show only pool names without querying/displaying members (faster execution)

Installation

Install globally via pip

Install directly from the source directory:

pip install /path/to/openstack-lb-treeview

Or if you've published to PyPI:

pip install openstack-lb-treeview

After installation, the openstack-lb-treeview command will be available globally.

Set up OpenStack credentials

Set up your OpenStack credentials. You can either:

  • Set environment variables (OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, etc.)
  • Use a clouds.yaml file in ~/.config/openstack/ or /etc/openstack/

Usage

After installation, use the openstack-lb-treeview command:

Basic usage (uses environment variables for authentication):

openstack-lb-treeview

Specify a cloud from clouds.yaml:

openstack-lb-treeview --cloud mycloud

Filter by project ID:

openstack-lb-treeview --project-id <project-id>

Single load balancer by name or ID:

openstack-lb-treeview --lb my-loadbalancer
openstack-lb-treeview --lb abc123-def456-...

Filter mode (only show problematic members and empty pools):

openstack-lb-treeview --filter
openstack-lb-treeview --lb my-loadbalancer --filter

Collapse mode (only show pool names, skip member queries):

openstack-lb-treeview --collapse

Combined filter and collapse mode (show only load balancers with operating_status != 'ONLINE'):

openstack-lb-treeview --filter --collapse

Development Usage

If running from source without installation:

python -m openstack_lb_treeview.lb_treeview

Or directly:

python openstack_lb_treeview/lb_treeview.py

Example Output

Normal mode:

📦 my-loadbalancer (ID: abc123...)
  ├─ 🏊 pool-1 (ID: def456...)
  │  ├─ 👤 member-1 (provisioning: ACTIVE | operating: ONLINE)
  │  └─ 👤 member-2 (provisioning: PENDING_CREATE | operating: OFFLINE)
  └─ 🏊 pool-2 (ID: ghi789...)
     └─ 👤 member-3 (provisioning: ACTIVE | operating: ONLINE)

Filter mode (--filter):

📦 my-loadbalancer (ID: abc123...)
  ├─ 🏊 pool-1 (ID: def456...)
  │  └─ 👤 member-2 (provisioning: PENDING_CREATE | operating: OFFLINE)
  └─ 🏊 pool-3 (ID: xyz789...)
     └─ No members

In filter mode, only pools with problematic members (not ACTIVE or not ONLINE) or pools with no members are shown.

Collapse mode (--collapse):

📦 my-loadbalancer (ID: abc123...)
  ├─ 🏊 pool-1 (ID: def456...)
  └─ 🏊 pool-2 (ID: ghi789...)

In collapse mode, only pool names are displayed without querying or showing members. This is useful for quickly viewing the structure and is faster when you don't need member details.

Combined filter and collapse mode (--filter --collapse):

📦 my-loadbalancer (ID: abc123...)
  ├─ 🏊 pool-1 (ID: def456...)
  └─ 🏊 pool-2 (ID: ghi789...)

When both --filter and --collapse are used together, only load balancers with operating_status != 'ONLINE' are displayed. This is useful for quickly identifying load balancers that are not in an ONLINE state.

Requirements

  • Python 3.6+
  • openstacksdk
  • OpenStack credentials with appropriate permissions

Metadata

Release files for openstack-lb-treeview 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openstack-lb-treeview 0.1.3
File Size Uploaded
openstack_lb_treeview-0.1.3.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openstack-lb-treeview 0.1.3
File Interpreter ABI Platform
openstack_lb_treeview-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / openstack_lb_treeview-0.1.3.tar.gz

Download URL openstack_lb_treeview-0.1.3.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78d681d6db66d0663dd2c9b9c2a5f9a44bf4161ea934e16b4e45839ff87b1d45
BLAKE2b-256 checksum
How to use checksums
1eebe76056d4541d04bf01c2319659ad0b166ce9ce3b4ef8a7c87e1dd823f118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / openstack_lb_treeview-0.1.3-py3-none-any.whl

Download URL openstack_lb_treeview-0.1.3-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48ba26ffd2f06d7f32a6e040a83c549866bc56a2c3d648cc9cec6f0192d5b96b
BLAKE2b-256 checksum
How to use checksums
987bb3e0ba91bbefda9fa3a58e207fec7ee9463b1c4e6389f8805d38db2bf077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page