ActiveCim is a ActiveRecord/ActiveResource like API to get data from a CIMOM server.
CIM properties are available with Ruby style so APropertyLikeThis would be available as a_property_like_this.
Features, What is implemented?
-
defining classes
-
find(:all)
-
gathering properties
-
method invokation
-
abstracted connector API which allow to use any method to get the data (cim client, api, fake, etc) See ConnectorAdapter class documentation for information on what do you need to implement for a new connector
-
You can use ruby-sfcc (github.com/dmacvicar/ruby-sfcc) connector or the wbemcli based one.
-
nokogiri and activesupport
class Linux_EthernetPort < ActiveCim::Base self.site = "http://localhost/root/cimv2" end ports = Linux_EthernetPort.find(:all) ports.each do |port| puts port.id port.device_id port.system_name end
Plan (in more or less priority order):
-
Implement selective find
-
ws-man connector
-
implement associations
-
implement writing of properties
-
implement calling methods
ActiveCim effort has as a goal to access CIM data from WebYaST.
-
Duncan Mac-Vicar P. <[email protected]>
-
Klaus Kaempf <[email protected]>
-
Uses lot of code from Rails ActiveResource
-
Inspired in good part by en.opensuse.org/PowerCIM from Martin Mrazik but with different goals: Rails usage, hide CIM as much as possible, Ruby semantics, and ActiveRecord/Resource feeling