Onboarding
Source Code
You can find the full source code and documentation for this workflow in our GitHub repository: central-python-workflows.
This script automates the complete onboarding journey of factory-default devices in HPE Aruba Networking Central. It takes devices from an unassigned state in GreenLake Platform (GLP) through both GLP onboarding and Central onboarding to make them ready for configuration via New Central.
This script does the following -
Phase 1: GLP (GreenLake Platform) Onboarding (Optional)
- Takes unassigned devices in GLP and assigns them to HPE Aruba Networking Central application instances
- Applies subscription licenses using subscription keys to enable Central management
Phase 2: Central Onboarding (Required)
- Site creation and device assignment
- Device persona configuration
- Device group management and assignment
- Provisioning verification
Important
For Central-only onboarding (when skipping GLP onboarding): Devices must already be assigned to your Central application with valid subscriptions. They will typically be in the "default" group and should not be assigned to any site.
Prerequisites
- Python 3.8+
- Factory-default devices added to your GreenLake Platform account
- API credentials for both New Central and Classic Central
- Network connectivity between devices and Central
Installation
- Clone the workflows repository and cd into the
device-onboarding
directory:
git clone -b "v2(pre-release)" https://github.com/aruba/central-python-workflows.git
cd central-python-workflows/device-onboarding
- Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate # Windows: env\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Configuration
Credentials Configuration
New Central & GLP Credentials (account_credentials.yaml)
For New Central APIs and GLP operations:
new_central:
cluster_name: <cluster-name> # or base_url: <central-api-base-url>
client_id: <new-central-client-id>
client_secret: <new-central-client-secret>
# Only include if you need GLP onboarding
glp:
client_id: <glp-client-id>
client_secret: <glp-client-secret>
Classic Central Credentials (classic_central_credentials.yaml)
For some operations that still require Classic Central:
central_info:
base_url: <classic_central_base_url>
token:
access_token: <classic_central_access_token>
ssl_verify: true
Important Links
New Central
Classic Central
Device Variables
Device Configuration (workflow_variables.yaml)
devices:
- serial_number: <device-serial>
# GLP Variables (Optional - only if GLP onboarding is required)
application_assignment:
name: <central-application-name>
region: <region>
subscription_assignment:
key: <subscription-key>
# Central Variables (Required)
device_type: ACCESS_POINT # or SWITCH, GATEWAY
persona: Campus AP # Device function
device_group: <group-name>
site: <site-name>
# Site details (optional - only if you need to create new sites)
sites:
- name: <site-name>
address: <address>
city: <city>
state: <state>
country: <country>
zipcode: "<zipcode>"
timezone: <timezone>
# Device group details (optional - only if you need to create new groups)
device_groups:
- group: <group-name>
group_attributes:
template_info:
Wired: false
group_properties:
AllowedDevTypes:
- AccessPoints
- Switches
- Gateways
Architecture: AOS10
ApNetworkRole: Standard
GwNetworkRole: BranchGateway
AllowedSwitchTypes:
- AOS_CX
NewCentral: true # Required for New Central compatibility
Configuration Reference
Parameter | Type | Required | Description |
---|---|---|---|
serial_number | string | Yes | Device serial number |
device_type | enum | Yes | ACCESS_POINT , SWITCH , or GATEWAY |
persona | string | Yes | Device role (Campus AP, Access Switch, etc.) |
device_group | string | Yes | Target configuration group |
site | string | Yes | Site assignment |
application_assignment | object | No | GLP application details |
subscription_assignment | object | No | GLP subscription details |
Persona Options by Device Type:
- ACCESS_POINT: Campus AP
- SWITCH: Access Switch, Core Switch, Aggregation Switch
- GATEWAY: Mobility Gateway
Sample Configuration Files
The following example files are available in the sample-input/
directory in the GitHub :
complete_onboarding_variables.yaml
- Full example with GLP and Central onboarding for multiple devicescentral_only_onboarding_variables.yaml
- Central-only onboarding example (no GLP assignment)
Use these as templates for your own configuration files.
Usage
Execute the onboarding workflow:
python3 onboarding.py \
-c new_central_credentials.yaml \
-cc classic_central_credentials.yaml \
-vars workflow_variables.yaml
Command Line Options
Flag | Description | Required |
---|---|---|
-c, --credentials | New Central API credentials | Yes |
-cc, --classic_credentials | Classic Central API credentials | Yes |
-vars, --variables_file | Device workflow configuration | Yes |
How It Works
The script processes each device through these steps:
- Input Validation - Validates configuration file structure
- GLP Onboarding - Application and subscription assignment (if configured)
- Central Onboarding - Site → Device Assignment → Persona → Group Management
- Verification - Confirms provisioning status
If something fails: The script skips remaining steps for that device to avoid problems.
Results
On Screen:
- Shows progress for each device and step
- Color-coded success/failure indicators
- Summary table at the end
CSV File:
Results saved to onboarding_results_<timestamp>.csv
with:
- What happened for each device and step
- When each step completed
- Error details if something failed
Common Issues
Problem | Fix |
---|---|
Bad credentials | Check your API tokens and permissions |
GLP errors | Only include GLP credentials if you need them |
Device not responding | Make sure device can reach Central |
File errors | Check YAML syntax in your configuration files |
Support
- Automation Team: [email protected]
- Workflow Issues: GitHub Issues
- PyCentral Library: PyCentral Issues
Updated 3 days ago