Skip to main content

Display a tree view of OpenStack loadbalancers, pools, and members

Project description

OpenStack Load Balancer Tree View

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
  • 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>

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

openstack-lb-treeview --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

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

openstack_lb_treeview-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

openstack_lb_treeview-0.1.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file openstack_lb_treeview-0.1.2.tar.gz.

File metadata

  • Download URL: openstack_lb_treeview-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for openstack_lb_treeview-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4d65b08a94b5f7f2003a8cb6c8bac8342f8e02da580edad90253d8d668a55671
MD5 c8f34fd06260aad5739acbe4ae44a1d5
BLAKE2b-256 177c10b8473ab491e923afe7c352b43d46adfcf29aed254febabe85e19769a6a

See more details on using hashes here.

File details

Details for the file openstack_lb_treeview-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for openstack_lb_treeview-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 389d1805d7b15c2c2a1f0653494f46120920baa845535416ac99cc0d07431289
MD5 eab03543a9883c91911c925aa20bcf27
BLAKE2b-256 38847fe857f49f848b48fcc6f1ec4c591dfb537cfb90218ae02a2990b37b862e

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