opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
142 stars 35 forks source link

DCM output in a data format (json or xml) #58

Open leth opened 10 years ago

leth commented 10 years ago

In order to control DCM from other languages it'd be great to have output in a form which is more easily parseable (e.g an XML or JSON) rather than having to parse raw text or perl code.

mattpascoe commented 10 years ago

Agreed. I have not fully determined my approach to doing this but I have a pretty good idea. Then it's the matter of actually making it happen. In the hopes of giving you something to start with now I have the following plugin https://github.com/opennetadmin/host_detail

I wrote this plugin as an attempt to trial just what you are requesting. My needs at the time were to provide Puppet with data from ONA that could be used in the manifests. That system is working but is not ready for release.

Give the host_detail plugin a try. I hope to add json/xml output options to all modules at some point. Right now the modules are so human oriented that it will take a bit to pick through and build up the data in a sensible way for json/xml output. Not at all impossible, just time consuming. :)