Skip to content

Add support for software version ingestion. #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0e2a9f3
initial software version
Jan 7, 2025
12513e7
added software version fixes
Jan 8, 2025
d3e9501
fix create method software version
Jan 15, 2025
061fa28
added eos and junos software version
Jan 15, 2025
6d4203b
fix key error
Jan 15, 2025
a025e29
data updates for testing
Jan 16, 2025
56de53d
tests
Jan 17, 2025
1b8f872
docs update
Jan 17, 2025
eafc911
linting
Jan 17, 2025
21a78bb
fix tests
Jan 17, 2025
06a8bb1
update testing object
Jan 22, 2025
07944fe
fixed tests
susanhooks Jan 24, 2025
9f2c206
fix loading and saving bugs with vlans, lags and vrfs (#310)
Dav-C Feb 4, 2025
7fcf6f1
Ensure that 'connectivity_test' kwargs always passed downstream (#314)
msheiny Feb 10, 2025
97d1d57
Expand tests to cover ssh logic (#315)
msheiny Feb 11, 2025
d873f78
Release 4.2.1
scetron Feb 11, 2025
99d8363
Merge pull request #318 from nautobot/release-4.2.1
scetron Feb 11, 2025
fb4c8b6
Merge pull request #319 from nautobot/develop
scetron Feb 11, 2025
e4cfde7
Fixed app startup crashing nautobot during startup in some cases. (#321)
gsnider2195 Feb 18, 2025
4bec6d4
Release 4.2.2
smk4664 Feb 19, 2025
ee5d077
Update docs/admin/release_notes/version_4.2.md
smk4664 Feb 19, 2025
fc282e2
Merge pull request #323 from nautobot/release-v4.2.2
smk4664 Feb 19, 2025
5afec57
Prepatch version
smk4664 Feb 19, 2025
bd2d13a
Merge pull request #324 from nautobot/main-to-develop-4.2.2
smk4664 Feb 19, 2025
4b51cea
Cookie updated by NetworkToCode Cookie Drift Manager Tool
Feb 27, 2025
6b8a684
Poetry lock and fix the change fragment filename.
smk4664 Mar 1, 2025
99a597a
filter out non device/interface connected cables
scetron Mar 7, 2025
9db7f24
update utils and add test
scetron Mar 10, 2025
166c16f
add a note to the docs
scetron Mar 10, 2025
ad81ef0
linting
scetron Mar 10, 2025
1ea57ea
add fragment
scetron Mar 10, 2025
5a5659e
Merge pull request #327 from nautobot/drift-manager/pr
scetron Mar 10, 2025
b65470d
Merge branch 'develop' into scetron-fix-cables
scetron Mar 10, 2025
b5d4b89
update error message
scetron Mar 10, 2025
00d29df
Merge pull request #330 from nautobot/scetron-fix-cables
smk4664 Mar 10, 2025
5256e72
update version and lock
scetron Mar 11, 2025
44f4c17
Release 4.2.3
scetron Mar 11, 2025
fb575b6
Merge pull request #336 from nautobot/release-4.2.3
scetron Mar 11, 2025
e66fc39
bump version
scetron Mar 12, 2025
54921c1
Merge pull request #339 from nautobot/release-4.2.3-to-develop
scetron Mar 13, 2025
cfe5b03
Merge branch 'develop' into shooks-software-version
susanhooks Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.4.1",
"template_ref": "refs/tags/nautobot-app-v2.4.2",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
Expand All @@ -30,7 +30,7 @@
"poetry"
],
"draft": false,
"baked_commit_ref": "860a6ce04937705d0ccc7d3be6578489b9c58a69"
"baked_commit_ref": "73b37ee9bb127d3c2d0393354bc85335812e9d37"
}
}
}
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ jobs:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.2.3"
# - python-version: "3.12"
# db-backend: "mysql"
# nautobot-version: "stable"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_DEVICE_ONBOARDING_PYTHON_VER: "${{ matrix.python-version }}"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Regardless, the Onboarding App greatly simplifies the onboarding process by allo
| 802.1Q mode | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
| Lag Member | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
| Vrf Membership | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
| Software Version | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@susanhooks What is the reason Software Version is part of "Network data" Sync, and not the "Network Device" sync ?


| VLANS | Cisco IOS | Cisco XE | Cisco NXOS | Cisco WLC | Juniper Junos | Arista EOS | F5 |
| ----------------------- | :----------------: | :--------------: | :--------------: | :--------------: | :--------------: | :--------------: | :-: |
Expand Down
1 change: 1 addition & 0 deletions changes/233.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added support syncing in software versions from devices to nautobot core models.
1 change: 0 additions & 1 deletion changes/306.fixed

This file was deleted.

1 change: 0 additions & 1 deletion changes/307.dependencies

This file was deleted.

2 changes: 1 addition & 1 deletion docs/admin/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here you will find detailed instructions on how to **install** and **configure**

## Prerequisites

- The app is compatible with Nautobot 2.0.3 and higher.
- The app is compatible with Nautobot 2.3.1 and higher.
- Databases supported: PostgreSQL, MySQL

!!! note
Expand Down
39 changes: 37 additions & 2 deletions docs/admin/release_notes/version_4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,43 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## Release Overview

- Major features or milestones
- Changes to compatibility with Nautobot and/or other apps, libraries etc.
- [#200](https://github.com/nautobot/nautobot-app-device-onboarding/issues/200) - Added basic connectivity checker using Netutils tcp_ping method.
- [#274](https://github.com/nautobot/nautobot-app-device-onboarding/issues/274) - Added TTP Parser support.
- [#274](https://github.com/nautobot/nautobot-app-device-onboarding/issues/274) - Added Sync Device from Network support for Palo Alto Panos.

## [v4.2.3 (2025-03-11)](https://github.com/nautobot/nautobot-app-device-onboarding/releases/tag/v4.2.3)

### Fixed

- [#326](https://github.com/nautobot/nautobot-app-device-onboarding/issues/326) - Fixed error from ingesting existing cable attached to a circuit.

### Housekeeping

- Rebaked from the cookie `nautobot-app-v2.4.2`.


## [v4.2.2 (2025-02-19)](https://github.com/nautobot/nautobot-app-device-onboarding/releases/tag/v4.2.2)

### Fixed

- [#320](https://github.com/nautobot/nautobot-app-device-onboarding/issues/320) - Fixed app startup crashing Nautobot during startup in some cases.

## [v4.2.1 (2025-02-11)](https://github.com/nautobot/nautobot-app-device-onboarding/releases/tag/v4.2.1)

### Fixed

- [#306](https://github.com/nautobot/nautobot-app-device-onboarding/issues/306) - Fixed error with logging message in SyncNetworkDataIPAddress.update()
- [#311](https://github.com/nautobot/nautobot-app-device-onboarding/issues/311) - Fixed issue with Lags, VRFs and Untagged Vlans not being removed from interfaces
- [#313](https://github.com/nautobot/nautobot-app-device-onboarding/issues/313) - Fixed issue running a sync job via CSV would raise an exception.

### Dependencies

- [#307](https://github.com/nautobot/nautobot-app-device-onboarding/issues/307) - Updated ntc-templates to 7.x

### Housekeeping

- [#315](https://github.com/nautobot/nautobot-app-device-onboarding/issues/315) - Added fake SSH devices to tests to increase coverage.


## [v4.2.0 (2025-01-17)](https://github.com/nautobot/nautobot-app-device-onboarding/releases/tag/v4.2.0)

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ markdown-version-annotations==1.0.1
griffe==1.1.1
mkdocstrings-python==1.10.8
mkdocstrings==0.25.2
mkdocs-autorefs==1.2.0
2 changes: 2 additions & 0 deletions docs/user/app_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Expose two new SSoT based Nautobot jobs to perform the syncing of data.
- VRF Names
- Route Distinguishers (RD)
- Cabling
- Software Version
- Cabling (**Note** Cables attached to Circuits will be skipped)

!!! info
For more information look at the provided jsonschema definitions for each of the jobs.
Expand Down
5 changes: 5 additions & 0 deletions nautobot_device_onboarding/command_mappers/arista_eos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ sync_network_data:
jpath: '{admin_mode: switchports."{{ current_key }}".switchportInfo.mode, mode: switchports."{{ current_key }}".switchportInfo.mode, access_vlan: switchports."{{ current_key }}".switchportInfo.accessVlanId, trunking_vlans: switchports."{{ current_key }}".switchportInfo.trunkAllowedVlans, native_vlan: switchports."{{ current_key }}".switchportInfo.trunkingNativeVlanId}' # yamllint disable-line rule:quoted-strings
post_processor: "{{ obj | get_vlan_data(vlan_map, 'untagged') | tojson }}"
iterable_type: "dict"
software_version:
commands:
- command: "show version"
parser: "textfsm"
jpath: "[*].image"
5 changes: 5 additions & 0 deletions nautobot_device_onboarding/command_mappers/cisco_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,8 @@ sync_network_data:
parser: "textfsm"
jpath: "[*].{local_interface:local_interface, remote_interface:neighbor_interface, remote_device:neighbor_name}"
post_processor: "{% set result = [] %}{% for cable in obj %}{% set _=result.append({'local_interface': cable['local_interface'], 'remote_interface': cable['remote_interface'], 'remote_device': cable['remote_device'] | remove_fqdn }) %}{% endfor %}{{ result | tojson }}"
software_version:
commands:
- command: "show version"
parser: "textfsm"
jpath: "[*].version"
5 changes: 5 additions & 0 deletions nautobot_device_onboarding/command_mappers/cisco_nxos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,8 @@ sync_network_data:
parser: "textfsm"
jpath: "[*].{local_interface:local_interface, remote_interface:neighbor_interface, remote_device:neighbor_name}"
post_processor: "{% set result = [] %}{% for cable in obj %}{% set _=result.append({'local_interface': cable['local_interface'], 'remote_interface': cable['remote_interface'], 'remote_device': cable['remote_device'] | remove_fqdn }) %}{% endfor %}{{ result | tojson }}"
software_version:
commands:
- command: "show version"
parser: "textfsm"
jpath: "[*].os"
5 changes: 5 additions & 0 deletions nautobot_device_onboarding/command_mappers/cisco_xe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,8 @@ sync_network_data:
parser: "textfsm"
jpath: "[*].{local_interface:local_interface, remote_interface:neighbor_interface, remote_device:neighbor_name}"
post_processor: "{% set result = [] %}{% for cable in obj %}{% set _=result.append({'local_interface': cable['local_interface'], 'remote_interface': cable['remote_interface'], 'remote_device': cable['remote_device'] | remove_fqdn }) %}{% endfor %}{{ result | tojson }}"
software_version:
commands:
- command: "show version"
parser: "textfsm"
jpath: "[*].version"
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ sync_network_data:
jpath: '"lldp-neighbors-information"[]."lldp-neighbor-information"[].{local_interface: "lldp-local-port-id"[0].data, remote_interface: "lldp-remote-port-id"[0].data, remote_device: "lldp-remote-system-name"[0].data}' # yamllint disable-line rule:quoted-strings
post_processor: "{% set result = [] %}{% for cable in obj %}{% set _=result.append({'local_interface': cable['local_interface'], 'remote_interface': cable['remote_interface'], 'remote_device': cable['remote_device'] | remove_fqdn }) %}{% endfor %}{{ result | tojson }}"
iterable_type: "dict"
software_version:
commands:
- command: "show system information | display json"
parser: "none"
jpath: '"system-information"[]."os-version"[].data' # yamllint disable-line rule:quoted-strings
4 changes: 0 additions & 4 deletions nautobot_device_onboarding/constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Constants for nautobot_device_onboarding app."""

from django.conf import settings
from nautobot.dcim.utils import get_all_network_driver_mappings

NETMIKO_EXTRAS = (
settings.PLUGINS_CONFIG.get("nautobot_plugin_nornir", {})
Expand All @@ -23,9 +22,6 @@
}


# This is used in the new SSoT based jobs.
SUPPORTED_NETWORK_DRIVERS = list(get_all_network_driver_mappings().keys())

# This is used in the new SSoT based jobs. Soon PYATS should be supported.
SUPPORTED_COMMAND_PARSERS = ["textfsm", "ttp"]

Expand Down
Loading
Loading