Invoracle: DevOps Inventory Reporting System
Synopsis
Invoracle (short for Inventory Oracle), provides the basis of a flexible inventory reporting system that can be used to build custom reports for managing large numbers of computer systems. It is designed to provide a foundation of reporting for thousands of systems using a generic, extensible JSON schema.
The Invoracle::System class is a subclass of the JsonDoc Ruby gem and adds a default JSON schema for computer systems to the functionality available in JsonDoc. It can be used as is or it can be further subclassed to add additional custom attributes.
Primary use cases include use as a core document object that various parsers can leverage to populate a strict schema JSON document and to build reporting systems such as CSV/Excel reports.
Installing
To install SalesforceCache, use the following command:
$ gem install invoracle
Examples
require 'invoracle'
system = Invoracle::System.new
schema = generic_system.dSchema
system.setAttr(:sSysFqdn, system_fqdn)
system_fqdn = system.getAttr(:sSysFqdn)
system_hash = system.asHash
system_json = system.asJson
Documentation
This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
$ gem install yard
$ yard server -g
Notes
- Default Schema
To view the default schema, you can use pretty print the default schema using the dSchema accessor. The default schema uses Hungarian CamelCase (HCC) names which are described below. These names are still in development so please provide feedback.
- Schema Property Formats
The default properties, which can be overridden, use a short form of "Hungarian CamelCase" where properties are prefixed with type abbreviations including ['a','d','f','i','j','s','x'] for:
a = array,
d = dictionary / hash,
f = float / number,
h = html / string,
i = integer / number,
j = JSON / string,
s = string,
x = XML / string
- Subclassing
To subclass this module, override the getDefaultSchema() method and add your own schema. To add a schema on to the default schema see the Usage section above.
- Schema Validation
Schema validation is not provided in this version.
Change Log
2014-03-05: 0.0.3
- Retreive Systems from Cluster via SysRoles
- Inflate System SysRoles
2014-02-15: 0.0.2
- Invoracle::Cluster is now a JsonDoc subclass
- Inforacle::Infra::IostatParser added
2014-01-01: 0.0.1
- Initial release
- JsonDoc subclass for Invoracle::System
Please see the CHANGELOG document for additional release information.
Links
- JSON: http://www.json.org/
- JSON Schema: http://json-schema.org/
Copyright and License
Invoracle © 2014 by John Wang.
Invoracle is licensed under the MIT license. Please see the LICENSE document for more information.
Warranty
This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.