Hi!
Zentyal manages network objects through the Ebox API. You can read the main part of this code here:
https://github.com/zentyal/zentyal/blob/master/main/network/src/EBox/Objects/Members.pmWhy do you want to configure the ip ranges the programming way?
Zentyal loads his user defined configuration from a redis database, so you could study how the network objects configuration is stored on redis and to make an script able to introduce your data on redis.
Could be you'll find useful these commands:
#redis editable information
/usr/share/zentyal/redisvi network
#work with EBox API
/usr/share/zentyal/shell
However I've never tried this.
Please, if you try to do it, tell us about it. If you need some more help, please let me know, I think it's an interesting theme.
Cheers!