HenriWahl / dhcpy6d

MAC address aware DHCPv6 server written in Python
https://dhcpy6d.de
GNU General Public License v2.0
97 stars 27 forks source link

generic database driver #3

Closed grinapo closed 7 years ago

grinapo commented 9 years ago

I'm using postgresql. Need I say more? ;-) You should use a generic db api instead of specific fiddling, so you can support various db engines with much less efforts.

HenriWahl commented 9 years ago

Brona added PostgreSQL support in his fork at https://github.com/brona/dhcpy6d/commit/ac4e51c8e734b63af109d43aa7133bed4c9af359#diff-c947434f1a6282eade971a9ff228dcf7R714 with no much effort as the used SQL syntax is alredy pretty generic. I will look at this when next time doing some development - promised.

grinapo commented 9 years ago

Umm, it's 97% formatting, it's basically a trivial change. Why don't you merge it? Shall I create a plain fork without the formatting fixes?

HenriWahl commented 9 years ago

Time time... if you have some can you integrate the PostgreSQL from Brona, add the config stuff and do a pull request?

HenriWahl commented 9 years ago

OK then it should be enough to have config options like store_db_user and store_db_pass instead of store_mysql_user, store_mysql_pass, store_postgresql_user and the likes.

grinapo commented 9 years ago

Indeed. The patch is trivial.

HenriWahl commented 9 years ago

Can you please check your PostgreSQL with latest commit f1f4a7b0f6166dee5ef00ded72ca8478254a22de? Config parameters are now as stated above - replace all mysql by db. Let me know if it works for you - thanks!

HenriWahl commented 9 years ago

Last commits contained a bug, now 72adb2aa1d980a5a4ebc8120d9ff157fc4351df3 is the real test candidate. Also available at https://dhcpy6d.ifw-dresden.de/download/.

HenriWahl commented 9 years ago

I found the SQL schemes at https://dhcpy6d.ifw-dresden.de/documentation/sql/ not fully working for PostgreSQL. Can you please help to improve them?

grinapo commented 9 years ago

I'll test them, takes a bit of time, doing plenty of stuff in parallel. :-)

HenriWahl commented 9 years ago

Any news or still much parallel stuff? :-)

HenriWahl commented 7 years ago

Any news or still interested?

grinapo commented 7 years ago

Interested: yes; news: no; unfortunately I am right now really busy with restructuring large parts of the network including the machine I was played on. I try to process that part of my todo list... :-( sorry.

HenriWahl commented 7 years ago

OK... I am working on making the SQL scheme MySQL-independent. I will let you know of any news.

HenriWahl commented 7 years ago

Last commit has working PostgreSQL support. There is no binary available yet but could you test it? There is a modified SQL scheme file for PostgreSQL too,

HenriWahl commented 7 years ago

Binaries now avaliable with PostgeSQL support at https://dhcpy6d.ifw-dresden.de/download/