netbox-cisco-sync 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netbox_cisco_sync-1.0.1/LICENSE +21 -0
- netbox_cisco_sync-1.0.1/MANIFEST.in +1 -0
- netbox_cisco_sync-1.0.1/PKG-INFO +417 -0
- netbox_cisco_sync-1.0.1/README.md +399 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/__init__.py +86 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/api/__init__.py +3 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/api/client.py +5 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/api/serializers.py +164 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/api/urls.py +26 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/api/views.py +71 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/catalyst_services.py +107 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/choices.py +40 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/collector.py +21 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/__init__.py +5 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/base.py +39 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/catalyst_center/__init__.py +6 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/catalyst_center/client.py +157 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/catalyst_center/collector.py +440 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/catalyst_center/connector.py +76 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/meraki/__init__.py +4 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/meraki/client.py +91 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/meraki/collector.py +345 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/meraki/connector.py +45 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/vmanage/__init__.py +6 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/vmanage/client.py +76 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/vmanage/collector.py +129 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/connectors/vmanage/connector.py +32 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/device_type_interfaces.py +15 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/dto.py +85 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/engine.py +9 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/filtersets.py +61 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/forms.py +222 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/interface_cache.py +225 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/jobs.py +461 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/matcher.py +128 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/meraki_services.py +96 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0001_initial.py +336 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0002_catalyst_detailed_stacks.py +80 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0003_catalyst_interface_cache_mode.py +16 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0004_discovered_interface_bridge.py +16 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0005_discovered_interface_label.py +16 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0006_remove_catalyst_detailed_stacks.py +26 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0007_catalyst_stack_metadata.py +44 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0008_cisco_sync_custom_fields.py +83 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0009_ignore_rfc1918_wan_ips.py +32 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/0010_discovered_interface_lag.py +13 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/migrations/__init__.py +0 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/models.py +640 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/navigation.py +23 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/plugin_settings.py +43 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/request_limits.py +77 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/services.py +109 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/__init__.py +6 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/addresses.py +175 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/device_custom_fields.py +75 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/fhrp.py +108 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/interfaces.py +335 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/orchestrator.py +238 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/result.py +59 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/sites.py +110 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/tags.py +31 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/vlans.py +31 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/sync/wan.py +53 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/tables.py +142 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/bulk_sync_confirm.html +42 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/buttons/bulk_apply_selected.html +8 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/buttons/bulk_enable_selected.html +8 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/buttons/bulk_refresh_interfaces.html +8 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/device_interface_loading.html +39 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/device_sync_edit.html +199 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/devicecatalystcenterconfig_list.html +52 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/devicemerakiconfig_list.html +29 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/devicevmanageconfig_list.html +29 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/inc/discovered_device_tabs.html +56 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/inc/discovery_overlay.html +23 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/inc/interface_refresh_overlay.html +16 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/inc/preserve_device_selection.html +15 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/inc/settings_source_tabs.html +17 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/settings.html +36 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/syncrun.html +37 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/templates/netbox_cisco_sync/syncrun_revert.html +3 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/urls.py +28 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/__init__.py +1 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/catalyst_center.py +250 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/common.py +574 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/meraki.py +195 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/settings.py +94 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/sync_runs.py +60 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/view_modules/vmanage.py +211 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync/views.py +67 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync.egg-info/PKG-INFO +417 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync.egg-info/SOURCES.txt +95 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync.egg-info/dependency_links.txt +1 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync.egg-info/requires.txt +4 -0
- netbox_cisco_sync-1.0.1/netbox_cisco_sync.egg-info/top_level.txt +1 -0
- netbox_cisco_sync-1.0.1/pyproject.toml +35 -0
- netbox_cisco_sync-1.0.1/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lukasz Luczak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prune tests
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netbox-cisco-sync
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: Synchronize Cisco platform inventory into NetBox.
|
|
5
|
+
Author-email: Lukasz Luczak <bleblas@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bleblas2/netbox-cisco-sync
|
|
8
|
+
Project-URL: Repository, https://github.com/bleblas2/netbox-cisco-sync.git
|
|
9
|
+
Project-URL: Issues, https://github.com/bleblas2/netbox-cisco-sync/issues
|
|
10
|
+
Keywords: netbox,netbox-plugin,Cisco,Catalyst Center,SD-WAN,vManage,Meraki,network-automation,ipam,dcim
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests>=2.31
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# NetBox Cisco Sync
|
|
20
|
+
|
|
21
|
+
NetBox Cisco Sync is a NetBox plugin for discovering and synchronizing network
|
|
22
|
+
inventory from Cisco Catalyst SD-WAN (vManage), Catalyst Center (DNA) and Meraki Dashboard.
|
|
23
|
+
|
|
24
|
+
Connections to Cisco platforms are read-only. Source collection and NetBox
|
|
25
|
+
changes are deliberately separated through a shared workflow:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Discovery → Site mapping → Enable → Refresh interfaces → Preview → Apply → Sync Run → optional Revert
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
> **Current status:** version `1.0.1` supports vManage, Catalyst Center, and
|
|
34
|
+
> Meraki through the complete Discovery/Refresh/Preview/Apply workflow.
|
|
35
|
+
|
|
36
|
+
## Contents
|
|
37
|
+
|
|
38
|
+
- [What It Does](#what-it-does)
|
|
39
|
+
- [Safety Model](#safety-model)
|
|
40
|
+
- [Supported Platforms](#supported-platforms)
|
|
41
|
+
- [Site Matching](#site-matching)
|
|
42
|
+
- [Installation](#installation)
|
|
43
|
+
- [First Run](#first-run)
|
|
44
|
+
- [Interface Cache and Selection](#interface-cache-and-selection)
|
|
45
|
+
- [Screenshots](#screenshots)
|
|
46
|
+
- [API Access](#api-access)
|
|
47
|
+
- [Data Rules](#data-rules)
|
|
48
|
+
- [Development and Testing](#development-and-testing)
|
|
49
|
+
- [Acknowledgements](#acknowledgements)
|
|
50
|
+
- [Disclaimer](#disclaimer)
|
|
51
|
+
|
|
52
|
+
## What It Does
|
|
53
|
+
|
|
54
|
+
- Discovers devices without creating NetBox inventory automatically.
|
|
55
|
+
- Maps discovered devices to existing NetBox Sites.
|
|
56
|
+
- Lets an operator enable individual devices, enable selected devices in bulk,
|
|
57
|
+
and select interfaces. Bulk actions and the per-row Enabled button preserve
|
|
58
|
+
device selection when returning to the inventory list.
|
|
59
|
+
- Builds an exact Preview snapshot before Apply.
|
|
60
|
+
- Creates or updates NetBox Devices, Interfaces, IP addresses, MAC addresses,
|
|
61
|
+
primary IP assignments, and FHRP/VRRP objects when supported by the source.
|
|
62
|
+
- Imports switch port-channels from Catalyst Center as NetBox LAG interfaces
|
|
63
|
+
and assigns their physical member ports.
|
|
64
|
+
- Stores every Preview and Apply as a Sync Run with counters, warnings, source
|
|
65
|
+
data, created objects, and field-level changes.
|
|
66
|
+
- Reverts only objects recorded as created by a selected Apply run.
|
|
67
|
+
- Supports single-device Apply, background bulk Apply, and background interface
|
|
68
|
+
refresh for selected devices through NetBox workers.
|
|
69
|
+
- Supports background Apply for only the devices selected in each platform
|
|
70
|
+
inventory list.
|
|
71
|
+
|
|
72
|
+
## Safety Model
|
|
73
|
+
|
|
74
|
+
- Cisco APIs are used only for authentication and read operations.
|
|
75
|
+
- Newly discovered devices are disabled by default.
|
|
76
|
+
- Preview never writes Device, Interface, IP, MAC, or FHRP objects to NetBox.
|
|
77
|
+
- Apply uses the local interface cache or the explicitly submitted Preview
|
|
78
|
+
snapshot and never silently refreshes source interfaces.
|
|
79
|
+
- Bulk Apply fails an individual device safely when its interface cache is
|
|
80
|
+
missing and continues with the remaining devices.
|
|
81
|
+
- Existing NetBox devices are skipped unless **Update existing** is enabled.
|
|
82
|
+
- Discovery and Apply never remove devices missing from a Cisco platform.
|
|
83
|
+
- Revert removes only objects created and recorded by the selected Sync Run.
|
|
84
|
+
- Passwords, API keys, session cookies, and tokens are not written to plugin
|
|
85
|
+
logs or returned through the plugin API.
|
|
86
|
+
|
|
87
|
+
## Supported Platforms
|
|
88
|
+
|
|
89
|
+
Reported tested versions:
|
|
90
|
+
|
|
91
|
+
| Platform | Versions |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Cisco Catalyst SD-WAN Manager (vManage) | 20.12–20.18.2.1 |
|
|
94
|
+
| Cisco Catalyst Center | 2.3.3–3.6.1 |
|
|
95
|
+
| NetBox | 4.6.1–4.6.9 |
|
|
96
|
+
|
|
97
|
+
### Cisco vManage
|
|
98
|
+
|
|
99
|
+
- Discovers cEdge/vEdge devices and ignores vManage, vSmart, and vBond
|
|
100
|
+
controllers.
|
|
101
|
+
- Imports device identity, interfaces, IPv4/IPv6, MAC addresses, and VRRP/FHRP.
|
|
102
|
+
- Uses the vManage `system-ip` as the primary IPv4 fallback.
|
|
103
|
+
|
|
104
|
+
### Cisco Catalyst Center
|
|
105
|
+
|
|
106
|
+
- Discovers supported network devices and their Building membership.
|
|
107
|
+
- Resolves Building membership primarily by Catalyst `deviceId` through the
|
|
108
|
+
paginated assigned-to-Site API, including devices assigned to a Floor; older
|
|
109
|
+
Catalyst Center versions fall back to membership matching by serial number.
|
|
110
|
+
- Filters discovery/import by exact **Family** or **Role** values.
|
|
111
|
+
- Imports management information and collected interfaces made available by the
|
|
112
|
+
connector.
|
|
113
|
+
- Matches the Catalyst `platformId` to a NetBox Device Type `part_number` and
|
|
114
|
+
creates a Cisco Device Type with that `part_number` only when no match exists.
|
|
115
|
+
- Imports all physical switch interfaces into the single NetBox Device used for
|
|
116
|
+
the logical Catalyst Center device. A reported stack remains one Device with
|
|
117
|
+
the active member serial in `Device.serial`. The complete member serial list,
|
|
118
|
+
including the active member, and the exact Catalyst `stackSwitchInfo` payload are stored in the `SwitchStackSerials` and
|
|
119
|
+
`SwitchStackInfo` Device Custom Fields, visible only when populated.
|
|
120
|
+
Stack member details are read from the Catalyst Center per-device stack API.
|
|
121
|
+
The JSON stores each member's number, priority, role, serial number, and
|
|
122
|
+
platform ID in a stable format.
|
|
123
|
+
|
|
124
|
+
### Cisco Meraki Dashboard
|
|
125
|
+
|
|
126
|
+
- Supports MX appliances, MS switches, and MR access points.
|
|
127
|
+
- Collects MX WAN interfaces and `singleLan` where available.
|
|
128
|
+
- Represents MX `singleLan` as a NetBox bridge named `singlelan`, assigns the
|
|
129
|
+
appliance IP to that bridge, and attaches LAN ports from the matching Device
|
|
130
|
+
Type templates (falling back to `Port 2` through `Port 5`) as bridge
|
|
131
|
+
members. MX uplinks use Device Type Library names `Internet 1`/`Internet 2`
|
|
132
|
+
with labels `WAN1`/`WAN2`.
|
|
133
|
+
- When `singleLan` is not active, imports every MX appliance LAN port with its
|
|
134
|
+
enabled state, access/trunk mode, native/access VLAN, and allowed VLAN list.
|
|
135
|
+
- Reads MX uplink settings per device, including models with WAN3, and merges
|
|
136
|
+
their enabled/VLAN configuration with current WAN addresses.
|
|
137
|
+
- On MX64/MX67, removes `Port 2` from LAN when the shared physical port is
|
|
138
|
+
enabled as `Internet 2`/WAN2.
|
|
139
|
+
- Collects MS port configuration, enabled state, link status, and speed.
|
|
140
|
+
- Maps MS port speed to the corresponding NetBox interface type.
|
|
141
|
+
- Does not import client history, client MAC tables, L2 topology, or firmware.
|
|
142
|
+
|
|
143
|
+
## Site Matching
|
|
144
|
+
|
|
145
|
+
A manual Site override always has priority. Automatic matching then follows the
|
|
146
|
+
platform-specific sequence:
|
|
147
|
+
|
|
148
|
+
| Platform | Matching order |
|
|
149
|
+
|---|---|
|
|
150
|
+
| vManage | `SdwanSiteId` custom field → normalized Site name → nearest unique GPS match → primary IP in a Site-scoped Prefix |
|
|
151
|
+
| Catalyst Center | normalized Building/Site name → nearest unique GPS match → management IP in a Site-scoped Prefix |
|
|
152
|
+
| Meraki Dashboard | `MerakiSiteId` custom field → normalized Network/Site name → nearest unique GPS match → management IP in a Site-scoped Prefix |
|
|
153
|
+
|
|
154
|
+
Name matching replaces `_` and `-` with spaces, collapses whitespace, and
|
|
155
|
+
compares values case-insensitively. GPS matching succeeds only when the nearest
|
|
156
|
+
Site is unique and within the configured distance. Ambiguous devices remain
|
|
157
|
+
unmatched for manual review.
|
|
158
|
+
|
|
159
|
+
As the final fallback, the source primary/management IP is compared with NetBox
|
|
160
|
+
Prefixes scoped directly to a Site. The most specific matching Prefix wins,
|
|
161
|
+
including a broader Site-scoped parent when a more specific child has no Site.
|
|
162
|
+
Equally specific matches pointing to different Sites remain unmatched.
|
|
163
|
+
|
|
164
|
+
Meraki Discovery compares the Dashboard Network ID with `MerakiSiteId`, which
|
|
165
|
+
is also maintained during Apply. vManage uses `SdwanSiteId`. The identifiers
|
|
166
|
+
are platform-specific and must not be interchanged.
|
|
167
|
+
|
|
168
|
+
## Installation
|
|
169
|
+
|
|
170
|
+
### Requirements
|
|
171
|
+
|
|
172
|
+
- NetBox 4.6.x; see [COMPATIBILITY.md](COMPATIBILITY.md).
|
|
173
|
+
- Device Types from the NetBox Device Type Library.
|
|
174
|
+
- Python supported by the selected NetBox release;
|
|
175
|
+
- a NetBox worker for queued and scheduled synchronization;
|
|
176
|
+
- read-only API credentials for each enabled Cisco platform.
|
|
177
|
+
|
|
178
|
+
### Install from PyPI
|
|
179
|
+
|
|
180
|
+
The recommended installation method is the
|
|
181
|
+
[`netbox-cisco-sync`](https://pypi.org/project/netbox-cisco-sync/) package from
|
|
182
|
+
PyPI. Install it into the same Python environment as NetBox:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
source /opt/netbox/venv/bin/activate
|
|
186
|
+
python -m pip install netbox-cisco-sync
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Enable the plugin in the NetBox configuration:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
PLUGINS = [
|
|
193
|
+
"netbox_cisco_sync",
|
|
194
|
+
]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Run migrations and restart both NetBox and its worker:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
cd /opt/netbox/netbox
|
|
201
|
+
python manage.py migrate netbox_cisco_sync
|
|
202
|
+
sudo systemctl restart netbox netbox-rq
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Earlier development builds may have a different migration history. Check that
|
|
206
|
+
history before upgrading; a normal package upgrade may not be sufficient.
|
|
207
|
+
|
|
208
|
+
### Upgrade
|
|
209
|
+
|
|
210
|
+
Install the selected newer version, run migrations, and restart both NetBox and
|
|
211
|
+
its worker:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
source /opt/netbox/venv/bin/activate
|
|
215
|
+
python -m pip install --upgrade "netbox-cisco-sync==NEW_VERSION"
|
|
216
|
+
cd /opt/netbox/netbox
|
|
217
|
+
python manage.py migrate netbox_cisco_sync
|
|
218
|
+
sudo systemctl restart netbox netbox-rq
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Review the release notes before every upgrade and back up the NetBox database.
|
|
222
|
+
|
|
223
|
+
Do not enable the former `netbox_vmanage_sync` plugin at the same time.
|
|
224
|
+
|
|
225
|
+
### Default Configuration
|
|
226
|
+
|
|
227
|
+
Defaults can be overridden through `PLUGINS_CONFIG`:
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
PLUGINS_CONFIG = {
|
|
231
|
+
"netbox_cisco_sync": {
|
|
232
|
+
"preferred_vlan_group_slug": "",
|
|
233
|
+
"sync_session_timeout_seconds": 300,
|
|
234
|
+
"vmanage_ignored_interface_names": [
|
|
235
|
+
"nvi0",
|
|
236
|
+
"vmanage_system",
|
|
237
|
+
"null0",
|
|
238
|
+
"appnav-compress",
|
|
239
|
+
],
|
|
240
|
+
"vmanage_ignored_interface_patterns": [
|
|
241
|
+
r"virtualportgroup\d+",
|
|
242
|
+
r"loopback655\d{2}",
|
|
243
|
+
r"service-engine.*",
|
|
244
|
+
],
|
|
245
|
+
"vmanage_default_platform_name": "Cisco SD-WAN",
|
|
246
|
+
"vmanage_default_platform_slug": "sd-wan-cisco",
|
|
247
|
+
"vmanage_site_id_field": "SdwanSiteId",
|
|
248
|
+
"vmanage_controller_types": ["vmanage", "vsmart", "vbond", "vedge-vbond"],
|
|
249
|
+
"vmanage_edge_types": ["vedge", "cedge"],
|
|
250
|
+
"ccc_ignored_interface_names": [],
|
|
251
|
+
"ccc_ignored_interface_patterns": [],
|
|
252
|
+
"ccc_default_platform_name": "Cisco Catalyst Center",
|
|
253
|
+
"ccc_default_platform_slug": "cisco-catalyst-center",
|
|
254
|
+
"meraki_site_id_field": "MerakiSiteId",
|
|
255
|
+
"meraki_speed_to_interface_type": {
|
|
256
|
+
100: "100base-tx",
|
|
257
|
+
1000: "1000base-t",
|
|
258
|
+
2500: "2.5gbase-t",
|
|
259
|
+
5000: "5gbase-t",
|
|
260
|
+
10000: "10gbase-t",
|
|
261
|
+
25000: "25gbase-x-sfp28",
|
|
262
|
+
40000: "40gbase-x-qsfpp",
|
|
263
|
+
100000: "100gbase-x-qsfp28",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## First Run
|
|
270
|
+
|
|
271
|
+
1. Open **Plugins → Cisco Sync → Settings**.
|
|
272
|
+
2. Select a platform tab, enable the integration, enter its API connection
|
|
273
|
+
details, save, and use **Test connection**.
|
|
274
|
+
3. Open **Discovered Devices** and select the same platform tab.
|
|
275
|
+
4. Run **Discover from ...**.
|
|
276
|
+
5. Review automatic Site matches and set manual overrides where necessary.
|
|
277
|
+
6. Select one or more devices and use **Refresh interfaces for selected
|
|
278
|
+
devices**, or refresh a single device from its Edit/Preview page.
|
|
279
|
+
7. Select one or more devices and choose **Enable selected**, or enable a
|
|
280
|
+
single device with its Enabled/Disabled row button. The selected rows remain
|
|
281
|
+
selected after the action.
|
|
282
|
+
8. Open a device, select interfaces, and save the selection.
|
|
283
|
+
9. Inspect Preview and Apply the stored snapshot.
|
|
284
|
+
10. Verify the resulting NetBox objects and Sync Run.
|
|
285
|
+
11. After validating individual devices, use **Apply all enabled devices**.
|
|
286
|
+
|
|
287
|
+
In any platform inventory, select devices and choose **Enable selected** to
|
|
288
|
+
turn on sync for those records. The action is safe to repeat and preserves the
|
|
289
|
+
selection when the list reloads. The per-row Enabled/Disabled button also keeps
|
|
290
|
+
the current selection.
|
|
291
|
+
|
|
292
|
+
Alternatively, select specific enabled and Site-mapped records and choose
|
|
293
|
+
**Apply selected devices** directly below the interface refresh action. This
|
|
294
|
+
uses only their existing interface cache and does not query the source platform.
|
|
295
|
+
Selections are retained after these bulk actions as well.
|
|
296
|
+
|
|
297
|
+
For every source, Device Types are identified by exact `part_number`, not by
|
|
298
|
+
their display model name. Apply reuses an existing matching type. Only when no
|
|
299
|
+
matching `part_number` exists does the plugin create a Cisco Device Type and
|
|
300
|
+
populate both its model and `part_number`.
|
|
301
|
+
|
|
302
|
+
## Interface Cache and Selection
|
|
303
|
+
|
|
304
|
+
Interface details are collected explicitly and stored in
|
|
305
|
+
`DiscoveredInterface`. Save, Preview, Apply, bulk Apply, and scheduled jobs use
|
|
306
|
+
this local cache.
|
|
307
|
+
|
|
308
|
+
The source API is queried for interface details only when:
|
|
309
|
+
|
|
310
|
+
- the operator explicitly selects **Refresh / ReSync** on one device; or
|
|
311
|
+
- the operator selects devices in a platform list and chooses
|
|
312
|
+
**Refresh interfaces for selected devices**.
|
|
313
|
+
|
|
314
|
+
**Apply all enabled devices** never refreshes interfaces. It applies the
|
|
315
|
+
current cache for enabled devices with a mapped Site. Discovery refreshes only
|
|
316
|
+
the lightweight device inventory and Site mapping inputs; it does not replace
|
|
317
|
+
the interface refresh step.
|
|
318
|
+
|
|
319
|
+
Each interface is displayed with a checkbox. Rules in
|
|
320
|
+
`*_ignored_interface_names` and `*_ignored_interface_patterns` do not hide or
|
|
321
|
+
discard collected data. They only make matching interfaces unchecked by
|
|
322
|
+
default. An explicit operator selection takes priority.
|
|
323
|
+
|
|
324
|
+
Each platform Settings page also provides **Ignore RFC1918 IP on WAN
|
|
325
|
+
interfaces**. When enabled, an IPv4 address from `10.0.0.0/8`,
|
|
326
|
+
`172.16.0.0/12`, or `192.168.0.0/16` is not created as an IPAM `IPAddress` on
|
|
327
|
+
an interface named `WAN`, `WANn`, or `WAN n`. The same rule applies when the
|
|
328
|
+
interface label matches that pattern, including Meraki `Internet N` interfaces
|
|
329
|
+
labelled `WANn`. The Interface is still synchronized and the skipped address
|
|
330
|
+
with its prefix is appended to its description. On vManage, where collected
|
|
331
|
+
interfaces normally have no label, recognition uses the source `ifname`; a
|
|
332
|
+
transport interface such as `GigabitEthernet0/0/0` is not implicitly treated as
|
|
333
|
+
WAN solely because it belongs to VPN 0.
|
|
334
|
+
|
|
335
|
+
## Screenshots
|
|
336
|
+
|
|
337
|
+
The animated overview at the top of this README is generated from the original
|
|
338
|
+
screenshots stored in [`docs/images/`](docs/images/). Static images remain
|
|
339
|
+
available there for detailed inspection and future documentation updates.
|
|
340
|
+
|
|
341
|
+
## Data Rules
|
|
342
|
+
|
|
343
|
+
- Catalyst Center uses the short hostname from an FQDN, without a fixed domain.
|
|
344
|
+
- IPv4 netmasks returned separately are converted to CIDR prefixes.
|
|
345
|
+
- `0.0.0.0` and all-zero MAC addresses are not assigned to NetBox objects.
|
|
346
|
+
- A physical interface wins when vManage reports the same address on `Tunnel0`.
|
|
347
|
+
- IPv6 without an explicit prefix is reported and skipped rather than guessed.
|
|
348
|
+
- **Ignore disabled interfaces** skips administratively disabled interfaces and
|
|
349
|
+
their dependent IP, MAC, and FHRP data.
|
|
350
|
+
- **Ignore RFC1918 IP on WAN interfaces** preserves the WAN Interface but skips
|
|
351
|
+
its RFC1918 `IPAddress`, records the address in the Interface description,
|
|
352
|
+
and excludes it from Preview counters and primary IPv4 selection.
|
|
353
|
+
- Device Types are reused by exact `part_number`; a new Cisco type with a
|
|
354
|
+
populated `part_number` is created only when no match exists.
|
|
355
|
+
- The preferred primary IPv4 interface can override the platform fallback.
|
|
356
|
+
- The first assigned global IPv6 address becomes primary IPv6.
|
|
357
|
+
- VRRP data creates a NetBox FHRP group, interface assignment, priority, and VIP.
|
|
358
|
+
- Tags selected in Settings are added without removing existing tags.
|
|
359
|
+
- Apply without a mapped Site is rejected.
|
|
360
|
+
- Discovery does not overwrite a manual Site override.
|
|
361
|
+
|
|
362
|
+
## Development and Testing
|
|
363
|
+
|
|
364
|
+
The shared synchronization engine lives in `netbox_cisco_sync/sync/`.
|
|
365
|
+
Source-specific API access and normalization live in
|
|
366
|
+
`netbox_cisco_sync/connectors/`.
|
|
367
|
+
|
|
368
|
+
Important modules:
|
|
369
|
+
|
|
370
|
+
- `sync/orchestrator.py` — Preview and Apply coordination;
|
|
371
|
+
- `sync/interfaces.py` — interfaces, selection, status, speed, and MAC handling;
|
|
372
|
+
- `sync/addresses.py` — IP assignment and primary IP selection;
|
|
373
|
+
- `sync/fhrp.py` — VRRP/FHRP objects;
|
|
374
|
+
- `sync/sites.py` — platform-specific Site identifiers;
|
|
375
|
+
- `interface_cache.py` — relational source-interface cache;
|
|
376
|
+
- `jobs.py` — bulk and scheduled work;
|
|
377
|
+
- `models.py` — Settings, discovery inventory, cache, and audit history;
|
|
378
|
+
- `views.py` — stable public exports used by URL configuration;
|
|
379
|
+
- `view_modules/` — shared, platform, Settings, and Sync Run views split by
|
|
380
|
+
responsibility.
|
|
381
|
+
|
|
382
|
+
### Test Environments
|
|
383
|
+
|
|
384
|
+
The plugin was tested in sandbox environments and in production installations.
|
|
385
|
+
The test setup included NetBox 4.6.x, Python 3.14.4, and Docker Desktop with WSL2.
|
|
386
|
+
|
|
387
|
+
Production testing covered the following sources:
|
|
388
|
+
|
|
389
|
+
| Source | Test environments | Production inventory size |
|
|
390
|
+
|---|---|---|
|
|
391
|
+
| vManage | Sandbox and production | More than 200 devices |
|
|
392
|
+
| Catalyst Center | Sandbox and production | More than 1000 devices |
|
|
393
|
+
| Meraki Dashboard API | Production with MX and MS devices | More than 200 devices |
|
|
394
|
+
|
|
395
|
+
These figures describe the inventory in the production installations used for
|
|
396
|
+
testing. They do not mean that all devices were processed in one synchronization
|
|
397
|
+
job. Production testing does not cover every device model or configuration.
|
|
398
|
+
|
|
399
|
+
## Acknowledgements
|
|
400
|
+
|
|
401
|
+
API communication and data-collection code was adapted from:
|
|
402
|
+
|
|
403
|
+
- `netbox-vmanage-sync`;
|
|
404
|
+
- `netbox-meraki-sync`;
|
|
405
|
+
- `ciscodnacnetbox`.
|
|
406
|
+
|
|
407
|
+
These projects are not runtime dependencies. Listing them does not imply
|
|
408
|
+
affiliation or endorsement by their authors.
|
|
409
|
+
|
|
410
|
+
## Disclaimer
|
|
411
|
+
|
|
412
|
+
This is an independent community project and is not an official Cisco product.
|
|
413
|
+
Cisco, Cisco Systems, Catalyst, Meraki, vManage, and related names and marks are
|
|
414
|
+
the property of their respective owners. Their use identifies compatibility and
|
|
415
|
+
does not imply endorsement.
|
|
416
|
+
|
|
417
|
+
Development of this plugin was assisted by OpenAI Codex.
|