GithubHelp home page GithubHelp logo

Example about ipam-migrator HOT 4 CLOSED

callum027 avatar callum027 commented on July 17, 2024
Example

from ipam-migrator.

Comments (4)

Callum027 avatar Callum027 commented on July 17, 2024

Hi jozefrebjak,

Sorry for not providing one in the README. I never thought anyone would bother looking at using this tool :)

I haven't used or worked on this in many years but give the following a try and see how you go. Let me know if you have any issues.

Unfortunately the last time I used it, this tool was still kinda buggy so you may have to manually modify the new entries on the NetBox side.

I also recommend setting --log-level to DEBUG and keeping an eye on its output to see if it looks correct.

# API key authentication
$ ipam-migrator "https://phpipam.example.com/api/<app_name>,phpipam,key,<api_key>" "https://netbox.example.com/api,netbox,key,<api_key>"

# Token authentication
$ ipam-migrator "https://phpipam.example.com/api/<app_name>,phpipam,token,<token>" "https://netbox.example.com/api,netbox,token,<token>"

# User/password authentication
$ ipam-migrator "https://phpipam.example.com/api/<app_name>,phpipam,login,<username>,<password>" "https://netbox.example.com/api,netbox,login,<username>,<password>"

# User/password for phpIPAM, API key for NetBox
# (you can mix and match authentication methods depending on your needs)
$ ipam-migrator "https://phpipam.example.com/api/<app_name>,phpipam,login,<username>,<password>" "https://netbox.example.com/api,netbox,key,<api_key>"

from ipam-migrator.

groupwhere avatar groupwhere commented on July 17, 2024

Thanks for this. I am trying to do exactly the same thing. So far it moves as far as finding all the IP addresses, then hangs for a bit after finding the VLANs. Then it crashes:

2019-12-19 15:40:53,030 ipam-migrator: [INFO] Found 18 VLANs.
2019-12-19 15:40:53,030 ipam-migrator: [ERROR]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/ipam_migrator.py", line 172, in main
input_database = input_backend.database_read()
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/backend/phpipam.py", line 311, in database_read
vrfs = self.vrfs_read() if read_vrfs else None
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/backend/phpipam.py", line 453, in vrfs_read
raise NotImplementedError()
NotImplementedError

from ipam-migrator.

Callum027 avatar Callum027 commented on July 17, 2024

Thanks for this. I am trying to do exactly the same thing. So far it moves as far as finding all the IP addresses, then hangs for a bit after finding the VLANs. Then it crashes:

2019-12-19 15:40:53,030 ipam-migrator: [INFO] Found 18 VLANs.
2019-12-19 15:40:53,030 ipam-migrator: [ERROR]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/ipam_migrator.py", line 172, in main
input_database = input_backend.database_read()
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/backend/phpipam.py", line 311, in database_read
vrfs = self.vrfs_read() if read_vrfs else None
File "/usr/local/lib/python3.6/site-packages/ipam_migrator-1.0.0-py3.6.egg/ipam_migrator/backend/phpipam.py", line 453, in vrfs_read
raise NotImplementedError()
NotImplementedError

Can you change this line to False and try again?

Looks like I never got around to adding support for exporting VRFs, likely because we never used it at my company.

from ipam-migrator.

Simperdy avatar Simperdy commented on July 17, 2024

I had the same problem and changing the line to False helps.
After that I had another problem with the logger object. I had to comment out some info/debug logger lines to get it working.

from ipam-migrator.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.