Import2NetBox is a project providing several Python scripts that import
devices from various sources, such as Excel CSV file, Cisco Wirless LAN
Controller (WLC) and Cisco Catalyst Center into NetBox for asset
management and source-of-truth inventory. These scripts are used by
the CiscoLive NOC team for tracking device state and intent. The
NetBox APIs allow for cross-product integrations that influence
configuration and network monitoring changes.
·
Report Bug
·
Request Feature
·
Table of Contents
You might not use all parts of this project. The X script is used to import devices from an Excel spreadsheet (as CSV) into NetBox. The template XSLT file is in the project as [File]. The Y script is used to import devices from Cisco Cataylst Center into NetBox. There are more detailed instructions later in the README for handling Site/Location and Device-Type mappings. The Z script is used to import wireless access points from the Cisco Wireless LAN Controller (WLC) into NetBox.
A NetBox server is a prerequisite. The project was developed using the NetBox v3.7.4. It is unknown if the newest v4.0 has fully equivalent API calls yet.
-
Clone the repo
git clone https://github.com/jasoncdavis/import2netbox.git
-
Create a Python virtual environment. The dnacentersdk has issues (as of May 24) with Python 3.12, so development was done using Python 3.11. Track THIS dnacentersdk project issue to follow any fixes.
cd import2netbox python3.11 -m venv .venv source .venv/bin/activate
-
Install Python package dependencies from PyPi
python -m pip install --upgrade pip pip install -r requirements.txt
The cc2netbox.py script runs in 2 modes. The first mode, without command-line arguments will generate device-type and site/location mapping files.
python cc2netbox.py
python import_csv2nb.py -f filename.csv
For more examples, please refer to the Documentation
- Feature 1 TBD
- Feature 2 TBD
- Feature 3 TBD
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache License Version 2.0 License. See LICENSE
for more information.
Jason Davis - @SNMPguy - jadavis@cisco.com
Project Link: https://github.com/jasoncdavis/import2netbox