On 06/01/2012 12:40 PM, Alexey Andriyanov wrote:
You must write an exporter/importer in some language, right? Why don't you choose the least painful option, and then be as language-agnostic as you want while using the resulting export/import API?
Alexey is correct. The "right" way to write a RESTful API for RackTables is write it in PHP using this guide:
http://sourceforge.net/apps/mediawiki/racktables/index.php?title=RackTablesDevelGuide#APII was mostly linking to http://blog.mattynick.com/blog/2012/05/31/getting-racktables-location-info-into-puppet/ just to demonstrate a quick and dirty way to get data out of RackTables and into a language-agnostic format (YAML) with a Ruby script. Yes, it queries the database directly. Yes, the database schema could change. Yes, you're committing to maintaining your own code to provide this API for yourself. It's a proof of concept. . . an example of the kind of data RackTables users are interested in. "Please show me the data center, row, rack, and rack unit(s) for this server."
01.06.2012 20:08, Les Mikesell написал:I'm confused. How is the right solution to being language-agnostic to use PHP? And I need an importer as much as an exporter.
Yes, while one is at it, writing away in PHP, coding up a way to POST data to the API (an "importer") would be great to have as well. It's a simple matter of programming. :)
nVentory has a RESTful API, but in my opinion nVentory is not as good at RackTables at helping you visualize your data centers: http://sourceforge.net/apps/trac/nventory/wiki/RestAPI
There's also this Racks/Bays Management Plugin for GLPI: http://plugins.glpi-project.org/spip.php?article8 . I've barely even looked at GLPI.
Phil