/racktables2netbox

Primary LanguagePythonOtherNOASSERTION

racktables2netbox

A RackTables to NetBox migration utility. This tiny tool should be used to migrate your existing RackTables installations towards NetBox.

Reccomended racktables source version 0.22.X

Tested with NetBox version 4.0.7

Extensions

  • support NetBox 4.0
  • data migration for labels on interfaces
  • data migration for MAC-addresses on interfaces

Known Issues

  1. Racktables allows an object to be "split" across U's, netbox does not. split these up in racktables pre-migration. (eg, a device in U1 and U3, but not in U2)
  2. Netbox needs device templates, you will need to populate hardware_map.yaml with mappings between racktables device types to nb device types

Installation

unzip racktables2netbox.zip
cd racktables2netbox
cp conf.sample.yaml conf.yaml
cp hardware_map.yaml.sample hardware_map.yaml

Usage

  1. Create a NetBox API Token, Create a Tag "Decommissioned_gone", Create a Device-Role "default"
  2. Create a RackTables read-only database user
  3. edit conf.yaml regarding your needs (URLs, credentials, ...)
  4. run python3 racktables2netbox.py
  5. optional: to get back to a clean NetBox installation run python3 clean_netbox.py

Contributing

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Credits

Thanks to Device42 who have already written a RackTables to Device42 migration utility. @goebelmeier was able to use it as a starting point to make this migration script. I (ITJamie) forked it and added more data migrations

License

racktables2netbox is licensed under MIT license. See LICENSE.md for more information.