Skip to content

jasoncdavis/import2netbox

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

import2netbox

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

import2netbox Screen Shot

(back to top)

Built With

  • Python

  • NetBox

  • Excel CSV

  • Cisco WLC

  • PyPi FuzzyWuzzy

  • PyPi PyNetBox

(back to top)

Getting Started

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.

Prerequisites

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.

Installation

  1. Clone the repo

    git clone https://github.com/jasoncdavis/import2netbox.git
  2. 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
  3. Install Python package dependencies from PyPi

    python -m pip install --upgrade pip
    pip install -r requirements.txt

(back to top)

Usage

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

(back to top)

Roadmap

  • Feature 1 TBD
  • Feature 2 TBD
  • Feature 3 TBD

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the Apache License Version 2.0 License. See LICENSE for more information.

(back to top)

Contact

Jason Davis - @SNMPguy - jadavis@cisco.com

Project Link: https://github.com/jasoncdavis/import2netbox

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages