Author Topic: Adding IPaddress in object section  (Read 881 times)

mushab.mmm@gmail.com

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Adding IPaddress in object section
« on: July 25, 2019, 07:36:53 am »
Hi,

I want to add the IP Address via command line Instead of GUI.

IP address as in
Network -> Object.

Is there any possible way to do this without GUI.

doncamilo

  • Zen Warrior
  • ***
  • Posts: 236
  • Karma: +55/-0
    • View Profile
Re: Adding IPaddress in object section
« Reply #1 on: July 25, 2019, 02:35:16 pm »
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.pm
Why 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:

Code: [Select]
#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!