Skip to content

Releases: aruba/pycentral

v2.0a19

27 Apr 14:56
b92c24f

Choose a tag to compare

This release introduces MSP tenant connection management, a new Switches monitoring module, expanded troubleshooting event capabilities, ISO location validation for site creation, and refactored shared monitoring utilities.

New Features

  • MSP Tenant Connection Support
    • Added MSPBase class — a NewCentralBase subclass for Managed Service Provider workflows
    • get_tenant_connection(tenant_name, tenant_workspace_id) performs an RFC 8693 token exchange and returns an isolated TenantBase connection scoped to a specific tenant's Central environment
    • Tenant connections are cached internally; repeat calls with the same tenant_workspace_id return the same TenantBase instance without re-running the exchange
    • close_tenant_connection(tenant_workspace_id) closes a single cached tenant connection
    • get_tenant_id(tenant_name) resolves a tenant display name to its GLP workspace ID
    • Added TenantBase class that overrides _renew_token() to re-exchange the MSP parent token automatically when a tenant-scoped token expires
  • Switches Monitoring Module
    • Added MonitoringSwitches class with the following methods:
      • get_all_switches, get_switches — paginated switch retrieval with filter and sort support
      • get_switch_details — fetch details for a specific switch by serial number
      • get_stack_members — retrieve stack members for a stacked switch
      • get_switch_hardware_categories — hardware category data for a switch
      • get_switch_lag — LAG (Link Aggregation Group) information
      • get_switch_interfaces — interface list with optional filtering and pagination
      • get_switch_vlans — VLAN membership data for a switch
      • get_topn_interface_trends — top-N interface utilization trends
      • get_switch_interface_trends — per-interface trend data over a time range
      • get_switch_hardware_trends — hardware utilization trends (CPU, memory, etc.)
      • get_switch_interface_poe — PoE usage data per interface
      • get_switch_vsx — VSX (Virtual Switching Extension) state for a switch
  • Troubleshooting Event Enhancements
    • Added list_event_filters method to Troubleshooting and Device classes to retrieve available event filter options
    • Added get_event_extra_attributes method to fetch additional metadata fields for a specific event type
    • list_events now accepts an optional duration parameter for time-range based filtering
  • ISO Location Validation for Site Creation
    • Site.create_site() now validates country, state, and city inputs against ISO 3166 standards via the new validate_iso_location utility before submitting the API request
    • Added pycountry dependency (26.2.16) to support ISO validation

Improvements

  • Extracted validate_device_serial, validate_central_conn_and_serial, generate_timestamp_str, and clean_switch_trend_data from per-module private helpers into shared monitoring_utils so APs, Gateways, and Switches all use the same validation path
  • Added _renew_token() hook to NewCentralBase — subclasses can now override token renewal behavior without patching command()
  • LoginError and ValueError are now re-raised directly from command() instead of being wrapped in ResponseError, making authentication failures easier to catch programmatically
  • Improved error message when token creation does not return an access_token, providing clearer guidance on verifying client credentials and token URL
  • HTTP client close failures are now logged at ERROR level instead of DEBUG
  • Updated Switches monitoring documentation in docs/modules/new_monitoring.md
  • Added full MSP module documentation in docs/modules/msp.md

v2.0a18

15 Apr 16:04
9785476

Choose a tag to compare

This release introduces unified credential support for GLP and New Central API calls, refines token initialization and refresh behavior, updates authentication guidance, and refreshes package requirements for the 2.0a18 release.

New Features

  • Unified Credential Support
    • Added a new unified credential model that allows one GLP credential set to be used for both GLP and New Central API calls
    • Unified mode uses GLP client_id, client_secret, and workspace_id to generate a single token and reuse it across supported platform requests
    • Supports GLP-only usage when no Central base_url or cluster_name is provided
    • When unified credentials are present, standalone glp and new_central entries are ignored in favor of the unified configuration

Improvements

  • Added support for the global OAuth token issuer flow used by unified credential management
  • Refactored token parsing and route initialization to better support shared-token behavior across GLP and New Central
  • Improved token creation and refresh error handling with clearer validation and more actionable failures for invalid credentials or incomplete configuration
  • Updated authentication documentation with unified credential guidance, required fields, and example configurations
  • Updated package requirements in pyproject.toml, including Python version support and the pinned requests dependency to patch security vulnerability

v2.0a17

24 Mar 20:27
3f63012

Choose a tag to compare

This release introduces transient error retry with exponential backoff in the HTTP layer, refactors device attribute initialization, expands the known cluster URL registry, and updates getting-started documentation to clarify authentication prerequisites.

New Features

  • Retry with Exponential Backoff
    • request_url now automatically retries on transient transport failures (DNS errors, connection failures, timeouts, proxy errors) with exponential backoff up to 3 attempts
    • Added RETRY_MAX_RETRIES, RETRY_INITIAL_BACKOFF, RETRY_BACKOFF_MULTIPLIER, and TRANSIENT_TRANSPORT_ERRORS constants to base.py
    • All other exceptions are raised immediately as ResponseError without retrying
  • Unknown Base URL Warning
    • _resolve_base_url now validates the resolved URL against known cluster URLs
    • Issues a non-fatal UserWarning if the URL is not a recognized Central cluster, expected for Central-On Prem & other non-production environments

Improvements

  • Added explicit self.materialized = False initialization at the top of Device.__init__ for clarity
  • from_api branch in Device.__init__ now raises ValueError if device_attributes is None, preventing silent failures
  • Replaced manual key-rename loop and setattr calls in Device.__init__ with new _apply_api_attributes() helper method
  • Device inventory fetch in Device.get() now uses filter_str="serialNumber eq {serial}" instead of the search= parameter to match updated API behavior
  • Expanded CLUSTER_BASE_URLS in constants.py with changes to API Gateway Base URLs
  • Removed unused _return_client_credentials method from base.py
  • Updates to Authentication & Quickstart guide

v2.0a16

20 Mar 20:28
997b8e9

Choose a tag to compare

This release removes the deprecated search parameter from monitoring functions and updates the httpx dependency to the latest patch version.

Improvements

  • Removed search parameter from monitoring functions
    • get_device_inventory() and get_all_device_inventory() no longer accept search parameter as the underlying Central API no longer supports this filter
  • Updated httpx dependency
    • Bumped httpx[http2] from 0.28.0 to 0.28.1 in pyproject.toml
  • Changed default log_level from "DEBUG" to "INFO" in NewCentralBase
    • Reduces noise for users who don’t explicitly configure logging
  • README updated
    • Quickstart example now uses the context manager pattern (with NewCentralBase(...) as conn) to reflect current best practices
    • Updated Documentation URLs

v2.0a15

12 Mar 16:28
5ff8d5e

Choose a tag to compare

This release migrates core monitoring modules to stable v1 APIs, replaces the HTTP client with HTTPX for persistent connection reuse, and introduces several bug fixes, stability improvements, and developer experience enhancements across the SDK.

New Features

  • HTTPX Migration

    • Replaced requests.Session with httpx for persistent connection reuse across API calls for base.py
    • Eliminates per-call connection overhead, significantly improving SDK performance
    • Supporting helper functions added to base to modularize command function internals
  • v1 API Migration

    • Migrated modules of MonitoringAPs, Clients, MonitoringDevices, and MonitoringSites from Alpha/Beta APIs to stable v1 endpoints
    • Higher rate limits and expanded capabilities available for all migrated modules due to v1 API support
  • Context Manager Support

    • with syntax now supported for SDK client instantiation
  • Streaming: Ping-Pong Support

    • Added ping-pong capability to the streaming module to sustain longer-lived WebSocket connections
  • Project Modernization

    • Migrated project initialization from setup.py to pyproject.toml

Improvements

  • Fixed duplicate requests.Session instantiation in Classic Central’s base.py; session is now initialized once at startup and reused across API calls (Closes #65)
  • Resolved bugs in log statements and return values within util modules - scope_utils.py & monitoring_utils.py
  • Abstracted valid personas into a dedicated structure for easier maintenance in constants.py
  • Added extra validation checks across scope-related helper functions in scope_base.py & scopemaps.py
  • Updated URL utils to default to v1 endpoints unless explicitly overridden
  • Documentation updates for all above changes

v2.0a14

26 Feb 23:00
8c40d73

Choose a tag to compare

This release improves profile retrieval reliability, refines the show commands interface to support increased input handling, and extends client management functionality with new helper utilities and dependency updates.

Improvements

  • Updated get_profile docstring and added handling for invalid URL responses to improve robustness during profile lookups.
  • Updated show command methods across Troubleshooting & Device classes to reflect API changes. Related functions now accept either a string or a list of strings representing the set of show commands to be run on the devices.
  • Updated dependencies: requests==2.32.5, PyYAML==6.0.3, protobuf==6.33.5 to ensure compatibility and stability.
  • Added get_client_details method to fetch client-specific details.
  • Added _validate_mac_address helper method to support input validation for MAC address fields.

Maintenance Release — Dependency Updates

03 Feb 15:25
6f94596

Choose a tag to compare

This minor release includes routine dependency updates as part of ongoing maintenance and security hardening. There are no functional changes and no breaking API updates in this release.

The following core dependencies have been updated to their latest stable versions to address security advisories, bug fixes, and long-term compatibility:

  • requests: 2.31.0 → 2.32.5
  • PyYAML: 6.0.1 → 6.0.3
  • urllib3: 2.2.2 → 2.6.3
  • certifi: 2024.7.4 → 2026.1.4

v2.0a13

20 Jan 20:56
2e4a774

Choose a tag to compare

This release expands monitoring and troubleshooting capabilities and introduces SDK-level support for Streaming APIs, enabling developers to consume supported WebSocket-based event streams using a native client and decoders.

New Features

  • Monitoring Enhancements
    • Added new methods under MonitoringAPIs:
      • get_wlans
      • get_ap_wlans
    • These methods allow users to retrieve WLAN data associated with a specific AP or across all APs, aligning with the underlying monitoring API implementations.
  • Troubleshooting Events Support
    • Added support for troubleshooting events via the new list_events method. This method enables retrieval of network events using query-based filtering.
    • Implemented method across Troubleshooting and Device classes to provide consistent access patterns.
  • Streaming APIs Support
    • Added SDK support for consuming Streaming APIs with a built-in streaming client that handles connection management and event decoding.
    • Introduced streaming topic decoders with support for the following event types:
      • Audit Trail
      • Location
      • Location Analytics
      • Geofence
    • Added accompanying documentation to guide users on streaming setup, topic usage, and event decoding.

Improvements

  • Fixed minor bugs and applied cleanup across methods in scope_utils.py.
  • Improved stability and consistency of scope-related helper functions, including get_all_scope_elements

v2.0a12

10 Dec 16:34
3893c55

Choose a tag to compare

This release focuses on expanding troubleshooting capabilities and improving how the SDK documents and exposes its public methods.

New Features

  • Added new troubleshooting modules that expose additional troubleshooting methods - list_show_commands, list_active_tasks, run_show_command, initiate_show_command, get_show_command_result
  • Introduced troubleshooting helpers in the Devices class to support new methods mentioned above.

Updates

  • Migrated docstrings from Sphinx style to Google style across core modules (e.g. Devices, Monitoring, Troubleshooting, Sites, Profiles, and related utilities).
    • Standardized parameter/return/exception sections for better readability and IDE support.
    • Added missing docstrings for existing public methods to keep behavior and usage clearly documented.
  • Removed legacy Sphinx documentation files that are no longer used by the current docs pipeline.
  • Removed unused custom exceptions such as UnsupportedCapabilityError & GenericOperationError
  • Replaced direct exit calls with raised exceptions so error handling is consistent and easier for applications to manage.

Improvements

  • Removed duplicate endpoint implementations in the Devices class where equivalent functionality already exists in the Monitoring modules; Devices now reuses the Monitoring implementations instead of maintaining separate copies.
  • Improved overall error-handling to align with the new exception model.

v2.0a11

19 Nov 22:48
0e84849

Choose a tag to compare

  1. Updated logic of device function to persona mapping to match API behaviour
  2. Updates to documentation for certain functions
  3. Resolved minor issues of GLP Subscriptions module