Releases: aruba/pycentral
v2.0a19
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
MSPBaseclass — aNewCentralBasesubclass for Managed Service Provider workflows get_tenant_connection(tenant_name, tenant_workspace_id)performs an RFC 8693 token exchange and returns an isolatedTenantBaseconnection scoped to a specific tenant's Central environment- Tenant connections are cached internally; repeat calls with the same
tenant_workspace_idreturn the sameTenantBaseinstance without re-running the exchange close_tenant_connection(tenant_workspace_id)closes a single cached tenant connectionget_tenant_id(tenant_name)resolves a tenant display name to its GLP workspace ID- Added
TenantBaseclass that overrides_renew_token()to re-exchange the MSP parent token automatically when a tenant-scoped token expires
- Added
- Switches Monitoring Module
- Added
MonitoringSwitchesclass with the following methods:get_all_switches,get_switches— paginated switch retrieval with filter and sort supportget_switch_details— fetch details for a specific switch by serial numberget_stack_members— retrieve stack members for a stacked switchget_switch_hardware_categories— hardware category data for a switchget_switch_lag— LAG (Link Aggregation Group) informationget_switch_interfaces— interface list with optional filtering and paginationget_switch_vlans— VLAN membership data for a switchget_topn_interface_trends— top-N interface utilization trendsget_switch_interface_trends— per-interface trend data over a time rangeget_switch_hardware_trends— hardware utilization trends (CPU, memory, etc.)get_switch_interface_poe— PoE usage data per interfaceget_switch_vsx— VSX (Virtual Switching Extension) state for a switch
- Added
- Troubleshooting Event Enhancements
- Added
list_event_filtersmethod toTroubleshootingandDeviceclasses to retrieve available event filter options - Added
get_event_extra_attributesmethod to fetch additional metadata fields for a specific event type list_eventsnow accepts an optionaldurationparameter for time-range based filtering
- Added
- ISO Location Validation for Site Creation
Site.create_site()now validatescountry,state, andcityinputs against ISO 3166 standards via the newvalidate_iso_locationutility before submitting the API request- Added
pycountrydependency (26.2.16) to support ISO validation
Improvements
- Extracted
validate_device_serial,validate_central_conn_and_serial,generate_timestamp_str, andclean_switch_trend_datafrom per-module private helpers into sharedmonitoring_utilsso APs, Gateways, and Switches all use the same validation path - Added
_renew_token()hook toNewCentralBase— subclasses can now override token renewal behavior without patchingcommand() LoginErrorandValueErrorare now re-raised directly fromcommand()instead of being wrapped inResponseError, 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
ERRORlevel instead ofDEBUG - Updated Switches monitoring documentation in
docs/modules/new_monitoring.md - Added full MSP module documentation in
docs/modules/msp.md
v2.0a18
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
unifiedcredential 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, andworkspace_idto generate a single token and reuse it across supported platform requests - Supports GLP-only usage when no Central
base_urlorcluster_nameis provided - When
unifiedcredentials are present, standaloneglpandnew_centralentries are ignored in favor of the unified configuration
- Added a new
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 pinnedrequestsdependency to patch security vulnerability
v2.0a17
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_urlnow 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, andTRANSIENT_TRANSPORT_ERRORSconstants tobase.py - All other exceptions are raised immediately as
ResponseErrorwithout retrying
- Unknown Base URL Warning
_resolve_base_urlnow validates the resolved URL against known cluster URLs- Issues a non-fatal
UserWarningif the URL is not a recognized Central cluster, expected for Central-On Prem & other non-production environments
Improvements
- Added explicit
self.materialized = Falseinitialization at the top ofDevice.__init__for clarity from_apibranch inDevice.__init__now raisesValueErrorifdevice_attributesisNone, preventing silent failures- Replaced manual key-rename loop and
setattrcalls inDevice.__init__with new_apply_api_attributes()helper method - Device inventory fetch in
Device.get()now usesfilter_str="serialNumber eq {serial}"instead of thesearch=parameter to match updated API behavior - Expanded
CLUSTER_BASE_URLSinconstants.pywith changes to API Gateway Base URLs - Removed unused
_return_client_credentialsmethod frombase.py - Updates to
Authentication&Quickstartguide
v2.0a16
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()andget_all_device_inventory()no longer acceptsearchparameter 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
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
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_profiledocstring 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_detailsmethod to fetch client-specific details. - Added
_validate_mac_addresshelper method to support input validation for MAC address fields.
Maintenance Release — Dependency Updates
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
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_wlansget_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.
- Added new methods under MonitoringAPIs:
- Troubleshooting Events Support
- Added support for troubleshooting events via the new
list_eventsmethod. This method enables retrieval of network events using query-based filtering. - Implemented method across
TroubleshootingandDeviceclasses to provide consistent access patterns.
- Added support for troubleshooting events via the new
- 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
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
Devicesclass 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
exitcalls with raised exceptions so error handling is consistent and easier for applications to manage.
Improvements
- Removed duplicate endpoint implementations in the
Devicesclass where equivalent functionality already exists in the Monitoring modules;Devicesnow reuses the Monitoring implementations instead of maintaining separate copies. - Improved overall error-handling to align with the new exception model.
v2.0a11
- Updated logic of device function to persona mapping to match API behaviour
- Updates to documentation for certain functions
- Resolved minor issues of GLP Subscriptions module