How aruba/pyaoscx works
pyaoscx is a Python client library for managing AOS-CX switches through their REST API. The principal workflow is: an application or workflow establishes a session, obtains resource objects, reads or changes switch configuration, and applies those changes to the device. Resource modules cover interfaces, VLANs, VRFs, routing, ACLs, and other network features; workflows combine these lower-level operations into larger configuration tasks. The README documents the layering, while several subsystem relationships below are based on the source index rather than inspected implementations.
Main entry points: interface.py Interfaces · vrf.py Virtual routing · workflow.py Workflow operations · api.py API selection
Components 26
Connection and REST
- Device session
pyaoscx/session.py - API selection
pyaoscx/api.py - REST v1
pyaoscx/rest/v1/api.py - REST v10.04
pyaoscx/rest/v10_04/api.py - REST v10.08
pyaoscx/rest/v10_08/api.py - REST v10.09
pyaoscx/rest/v10_09/api.py
Switch Resources
- Resource factory
pyaoscx/pyaoscx_factory.py - Resource base behavior
pyaoscx/pyaoscx_module.py - Device operations
pyaoscx/device.py - Interfaces
pyaoscx/interface.py - VLANs
pyaoscx/vlan.py - IPv6 addresses
pyaoscx/ipv6.py - Configuration operations
pyaoscx/configuration.py - Shared utilities
pyaoscx/utils/util.py - List references
pyaoscx/utils/list_attributes.py
Routing and Policy
- Access control lists
pyaoscx/acl.py - Virtual routing
pyaoscx/vrf.py - BGP routers
pyaoscx/bgp_router.py - BGP neighbors
pyaoscx/bgp_neighbor.py - BGP aggregates
pyaoscx/aggregate_address.py - OSPF routers
pyaoscx/ospf_router.py - OSPF areas
pyaoscx/ospf_area.py - Static routes
pyaoscx/static_route.py
Configuration Workflows
- Workflow operations
workflows/workflow.py
Other components
- Application or operator
- AOS-CX switch
Connections 27
- Application or operator → Workflow operations: runs
- Workflow operations → Device session: opens session
workflows/workflow.py - Workflow operations → Resource factory: obtains resources
workflows/workflow.py - Workflow operations → VLANs: configures
workflows/workflow.py - Workflow operations → Interfaces: configures
workflows/workflow.py - Device session → API selection: uses API
pyaoscx/session.py - REST v1 → API selection: implements API
pyaoscx/rest/v1/api.py - REST v10.04 → API selection: implements API
pyaoscx/rest/v10_04/api.py - REST v10.08 → API selection: implements API
pyaoscx/rest/v10_08/api.py - REST v10.09 → API selection: implements API
pyaoscx/rest/v10_09/api.py - Device session → AOS-CX switch: communicates with
pyaoscx/session.py - Resource factory → Configuration operations: uses
pyaoscx/pyaoscx_factory.py - Resource factory → Device operations: constructs
pyaoscx/device.py - Interfaces → IPv6 addresses: loads
pyaoscx/interface.py - Interfaces → VLANs: references
pyaoscx/interface.py - Interfaces → Virtual routing: references
pyaoscx/interface.py - Interfaces → Access control lists: loads
pyaoscx/interface.py - Virtual routing → BGP routers: loads
pyaoscx/vrf.py - Virtual routing → OSPF routers: loads
pyaoscx/vrf.py - Virtual routing → Static routes: loads
pyaoscx/vrf.py - BGP routers → BGP neighbors: loads
pyaoscx/bgp_router.py - BGP routers → BGP aggregates: loads
pyaoscx/bgp_router.py - OSPF routers → OSPF areas: loads
pyaoscx/ospf_router.py - Interfaces → Resource base behavior: inherits behavior
pyaoscx/interface.py - Virtual routing → Resource base behavior: inherits behavior
pyaoscx/vrf.py - Resource base behavior → Shared utilities: uses
pyaoscx/pyaoscx_module.py - VLANs → List references: uses
pyaoscx/vlan.py