-
Notifications
You must be signed in to change notification settings - Fork 15
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
ip address's state definition has been changed since phpipam v1.2 #1
Comments
@IDQDD Hello, and thanks for the heads up. The phpIPAM script here is kind of crude, because it directly scrapes the MySQL database for relevant data. I would gladly change that to use the phpIPAM API, if/when I learn to use it programatically - I'm a sysadmin, not a programmer. :-) Sure, I can update the scripts when I find some time. Do you know if the phpIPAM database has a version field which could be checked? That way the script could support both versions at the same time. |
Maciej IPAM API sounds good I did some greps and found out that the state values had been changed since version 1.1.5 /* Update version */ /* insert default values */ /* update ipaddresses */ p.s. I'm not a programmer either but seems we sysadmins have to become programmers to keep up the good job |
@IDQDD Indeed! Thanks for the research, I'll look into it when I have some time, perhaps on the weekend. |
I have found a workaround to get IP addresses from the database. If you use inet_ntoa(ip_addr) in the query it get the pointed decimal notation ! I'm trying to get the script to work, but we miss almost all hostnames in phpipam... |
Hello Maciej
I found you phpipam scripts very useful
but since version 1.2 phpipam has been completely rewriten
and your hardcoded statements of a state values don't fit it anymore
let me explain what have happened in python style
in previous versions of phpipam there were a dictionary {active:1, reserver:2, offline:0, dhcp:3}
now this dictionary has been trasformed to {active:2, reserver:3, offline:1, dhcp:4}
I would rewrite your code but I'am new to github so I don't know how to use it
can you rewrite you script to match new version?
Thx,
Nikolay
The text was updated successfully, but these errors were encountered: