= zenoss_client: A Ruby library for REST access to Zenoss

This is a work-in-progress to create an easy to use client REST API for
Zenoss (http://www.zenoss.com) written in Ruby.  I love Zenoss as a
product, but I am much more efficient in Ruby than Python so I decided
to start hacking this library together.  It is very incomplete and I am
just adding functionality as I need it or it is requested.

Cheers,

Dan Wanek

== REQUIREMENTS:
Gems:

* tzinfo: For Python DateTime to Ruby DateTime conversion


Zenoss Event Information:

If you want to access Zenoss event information via REST you may need the
following patch.  The methods Zenoss::Model::EventView#get_status_img_src and
EventView#get_status_css_class depend on the 'status' parameter being an
integer. When the call is unmarshalled on the Zenoss side it is always a
string unless you apply this patch:

http://gist.github.com/328414

This has been reported and is filed as a product defect:

http://dev.zenoss.com/trac/ticket/6282


== TO USE:
A gem is now available.  'gem install zenoss_client'

	require 'zenoss'

	# You must set the URI before doing anything else
	Zenoss.uri 'https://zenhost:port/zport/dmd/'

	# Add the appropriate credentials
	Zenoss.set_auth('user','pass')
	
	# This returns the base DeviceClass '/zport/dmd/Devices'
	# It is the equivilent in zendmd of 'dmd.Devices'
	devices = Zenoss.devices

	# Search for a device
	dev = devices.find_device_path('devname')

	# List all implemented REST methods for this object
	puts dev.zenoss_methods.sort.join(', ')

	# Get the uptime of the device
	dev.sys_uptime


Have fun and let me know what needs to be fixed / added.