Coder Social home page Coder Social logo

ruby-sfcc's Introduction

ruby-sfcc

INTRODUCTION

ruby-sfcc provides the SBLIM client API ( sblim.wiki.sourceforge.net/Sfcc ) for ruby.

You can use it to connect to any CIMOM talking CIM-XML, but it can take advantage of sfcb CIMOM by connecting using a native interface.

Requirements

Ruby interpreters

ruby-sfcc has been built and the testsuite ran against:

* ruby 1.8.7
* ruby 1.9.2
* rubinius HEAD (what will be 1.1 soon)

sblim

ruby-sfcc has been built and the testsuite ran against:

  • sblim-sfcc 2.2.4

(Note: Earlier versions of sfcc don’t play well with ruby-sfcc+Rails)

Quick Start

You can create a gem by running rake gem.

See the testsuite for more examples. Or run rake docs.

require 'sfcc'

client = Sfcc::Cim::Client.connect('http://root@localhost:5988')
op = Sfcc::Cim::ObjectPath.new("root/cimv2", "")
result = client.query(op, "select * from CIM_OperatingSystem", "wql")
result.each do |instance|
  puts "query result: #{instance}"
end

FAQ

  • Why not using SWIG?

    sfcc has a complex API based on function tables to simulate an object oriented environment in C which would make wrapping it complicated.

  • Why the API?

    The motivation is to have the plain API available, and use it to access the CIMOM, gaining the footprint of SBLIM plus features like the local interface to talk with the CIMOM without overhead.

    So the API is pretty “raw”, and it is supposed to be consumed by

ActiveCim ( github.com/dmacvicar/activecim ) which is a more ruby-like API to do CIM based management.

  • How to run the testsuite?

    You need a CIMOM with base providers (ie: Linux_OperatingSystem) running on localhost 5988 with no authentication

Known Issues

  • If you call Instance#references without a filter class you may get an error. It seems sfcb can’t load a provider.

  • ObjectPath qualifier methods crash

If you want to contribute:

  • fork github.com/dmacvicar/ruby-sfcc

  • make your changes along with tests (don’t touch version in changelog or lib/sfcc/version.rb)

  • send me a pull request

Documentation

Code Metrics

Authors

Thanks

The following people have contributed patches, fixes and enhancements:

ruby-sfcc's People

Contributors

dmacvicar avatar kkaempf avatar wca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ruby-sfcc's Issues

Install on osx

Hello all, i am trying to get this to install on osx 10.6.6

so far i have run the following commands

gem build sfcc.gemspec

this works ok, then i run, gem install sfcc-0.1.2.gem

this is where I get an error,

In file included from cim_class.h:5,
from cim_class.c:2:
sfcc.h:12:31: error: CimClientLib/cmci.h: No such file or directory
sfcc.h:13:33: error: CimClientLib/cmcidt.h: No such file or directory

I am not to sure where to get these files from ? Has anyone else got this to work on the mac ?
I am using rvm and ruby 1.9.2 and gem 1.3.7

Cheers

Richard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.