This directory contains automation workflows for integrating NetBox as the source of truth with Cisco Catalyst Center for network infrastructure provisioning and device onboarding.
Workflows designed for network site provisioning including:
- Site and building hierarchy creation in both NetBox and Catalyst Center
- Floor/location management with GPS coordinate lookup
- Automatic synchronization between NetBox and Catalyst Center
Workflows specifically designed for switch onboarding including:
- Device registration in NetBox with proper attributes
- IP address management and prefix creation
- Plug and Play (PnP) device claiming in Catalyst Center
- Network validation testing with pyATS
Workflows/
├── README.md
├── Atomic_GetDataFromNetBox.json
├── Atomic_GetGPSFromGoogleAPI.json
├── Atomic_PatchDataInNetBox.json
├── Atomic_PostDataToNetBox.json
├── Master_CreateSite.json
├── Master_OnboardSwitch.json
├── Sub_Onboard_AddSwitchesToSite.json
├── Sub_Onboard_CreatePrefixesAndIPs.json
├── Sub_Onboard_RunPyATSTests.json
├── Sub_Onboard_SwitchViaPnP.json
├── Sub_Site_CreateHierarchy.json
├── Sub_Site_CreateInNetBox.json
└── Demo_CreateSiteViaScript.json
The following workflows are available in this repository:
| Workflow Name | Description | Type |
|---|---|---|
| Get Data from NetBox | Generic GET requests to NetBox API with query parameter support | Atomic |
| Post Data to NetBox | Generic POST requests to create objects in NetBox | Atomic |
| Patch Data in NetBox | Generic PATCH requests to update existing objects in NetBox | Atomic |
| Get GPS from Google API | Geocoding via Google Maps API for site address lookup | Atomic |
| Workflow Name | Description | Type |
|---|---|---|
| Create Site | Creates a new site in both NetBox and Catalyst Center with floor locations | Master |
| Onboard Switch | Complete switch onboarding process from NetBox to Catalyst Center | Master |
| Workflow Name | Description | Type |
|---|---|---|
| Create in NetBox | Creates site and floor locations in NetBox with GPS coordinates | Sub |
| Create Hierarchy in CCC | Creates site hierarchy in Catalyst Center from NetBox data | Sub |
| Workflow Name | Description | Type |
|---|---|---|
| Create Site via NetBox Script | Demonstrates calling a NetBox custom script to create sites | Demo |
| Workflow Name | Description | Type |
|---|---|---|
| Add Switches to Site | Adds switch devices to a site in NetBox with auto-naming | Sub |
| Create Prefixes and IPs | Creates IP prefixes and addresses from Catalyst Center PnP data | Sub |
| Claim Device via PnP | Claims devices in Catalyst Center via Plug and Play API | Sub |
| Run pyATS Tests | Runs pyATS network tests to validate device configuration | Sub |
Master_CreateSite
├── Sub_Site_CreateInNetBox
│ ├── Atomic_GetDataFromNetBox
│ ├── Atomic_PostDataToNetBox
│ └── Atomic_GetGPSFromGoogleAPI
└── Sub_Site_CreateHierarchy
├── Atomic_GetDataFromNetBox
└── Atomic_PatchDataInNetBox
Master_OnboardSwitch
├── Sub_Onboard_AddSwitchesToSite
│ ├── Atomic_GetDataFromNetBox
│ ├── Atomic_PostDataToNetBox
│ └── Atomic_PatchDataInNetBox
├── Sub_Onboard_CreatePrefixesAndIPs
│ ├── Atomic_GetDataFromNetBox
│ ├── Atomic_PostDataToNetBox
│ └── Atomic_PatchDataInNetBox
├── Sub_Onboard_SwitchViaPnP
│ ├── Atomic_GetDataFromNetBox
│ └── Atomic_PatchDataInNetBox
└── Sub_Onboard_RunPyATSTests
Workflows use a Target Group with Global Variables for dynamic target selection, making them portable across environments.
Create a target group named BRKOPS-2357 containing:
| Target Type | Description |
|---|---|
netbox.endpoint |
NetBox API endpoint |
catalystcenter.endpoint |
Catalyst Center API endpoint |
terminal.unix_linux_endpoint |
SSH host for pyATS tests |
web-service.endpoint |
Google Maps API |
Create these global variables to control target selection:
| Variable Name | Type | Value | Description |
|---|---|---|---|
Target_NetBox |
String | NetBox |
Display name of NetBox target |
Target_CatC |
String | dCloud Catalyst Center |
Display name of Catalyst Center target |
Target_Docker |
String | dCloud Docker |
Display name of SSH host target for pyATS |
Target_GoogleMapsAPI |
String | Google Maps API |
Display name of Google API target |
Google API Key |
Secure String | ***** |
Google Maps Geocoding API key |
Each workflow activity uses target group criteria to select the appropriate target:
"target": {
"override_workflow_target_group_criteria": true,
"target_group": {
"use_criteria": {
"choose_target_using_algorithm": "choose_first_with_matching_criteria",
"conditions": [{
"left_operand": "$targetgroup.display_name$",
"operator": "eq",
"right_operand": "$global.variable.Target_NetBox$"
}]
}
}
}This allows you to:
- Change targets by updating global variables (no workflow edits needed)
- Use different targets for different environments
- Share workflows without exposing environment-specific details
- NetBox instance with API access enabled
- API token with read/write privileges
- Configured tenants, regions, device types, and device roles
- Catalyst Center platform with appropriate licensing
- API credentials with sufficient privileges
- Network connectivity to Catalyst Center instance
- Pre-configured site hierarchy (tenant and region levels)
Devices require the following custom fields for Catalyst Center integration:
| Field | Description |
|---|---|
ccc_pid |
Catalyst Center Product ID |
ccc_template_name |
Day-0 template name in Catalyst Center |
ccc_location |
Floor/location name for site path construction |
ccc_ip |
Management IP in CIDR notation |
- SSH host with Python 3 and pyATS installed in a virtual environment
- pyATS venv at
{pyATS Scripts Path}/venv - Network connectivity to devices under test
.envfile with credentials (NETBOX_API, NETBOX_TOKEN, DNAC_CLI_USER, DNAC_CLI_PASSWORD)
When importing workflows, follow this order:
- Create Target Group and add your targets
- Create Global Variables for target selection
- Import Atomic Workflows (no dependencies)
- Import Sub-Workflows (depend on Atomic workflows)
- Import Master Workflows (depend on Sub-Workflows)
- Run [Master] Create Site
- Select tenant and region from dropdowns
- Enter site name, address, and floor configuration
- Workflow creates site in NetBox and Catalyst Center automatically
- Ensure switches have contacted Catalyst Center (visible in PnP)
- Run [Master] Onboard Switch
- Select tenant, site, device type, and role from dropdowns
- Enter comma-separated serial numbers
- Workflow handles device creation, IP assignment, PnP claiming, and validation
All credentials are properly masked (*****) in exported workflows:
| Credential Type | Status |
|---|---|
| NetBox API tokens | ✅ Masked |
| Catalyst Center passwords | ✅ Masked |
| SSH passwords | ✅ Masked |
| Google API key | ✅ Masked |
Note: After importing, you must reconfigure:
- Runtime user credentials
- Target endpoint addresses
- Global variable values
For more Catalyst Center workflows, see the CiscoDevNet/CiscoWorkflowsAutomation repository.