Giter VIP home page Giter VIP logo

ilorb's Introduction

ILORb

ILORb is a library created to ease interaction with HP servers baseboard management cards (ILO), using their XML interface.

It is primarily meant to integrate with Chef config management system, but it can of course be used standalone.

It supports RIB, SERVER and USER commands for ILO 2, 3 and 4 (no other hardware to test on).

  • By default, it will try to query the BMC through HTTP POST (available from ILO version 3)
  • It will fall back to raw XML through TCP socket (SSL-wrapped) for earlier ILO versions

Supported commands and parameters are defined using a little DSL, under definitions, sorted by "context".

HP, Integrated Lights Out and iLO are trademarks of HP, with whom the author of this software is not affiliated in any way other than using some of their hardware.

Examples

WARNING: as of 0.0.2, ILORb::ILO content has been moved to ILORb. Just use ILORb#new

require 'json'
require 'ilorb'

ilo = ILORb.new(
  :hostname => "10.200.0.1",
  :login => "Admin",
  :password => "SECRET",
#  :protocol => :raw, # for old ILOs, defaults to :http
)

result = ilo.get_network_settings
puts JSON.pretty_generate(result)

generates and sends :

<?xml version="1.0"?>
<ribcl version="2.0">
  <login password="SECRET" user_login="Admin">
    <rib_info mode="read">
      <get_network_settings/>
    </rib_info>
  </login>
</ribcl>

result:

{
  "status": {
    "code": 0,
    "message": "No error"
  },
  "get_network_settings": {
    "enable_nic": {
      "@value": "Y"
    },
    "shared_network_port": {
      "@value": "N"
    },
    "vlan_enabled": {
      "@value": "N"
    },
    "vlan_id": {
      "@value": "0"
    },
    "speed_autoselect": {
      "@value": "Y"
    },
    "dhcp_enable": {
      "@value": "N"
    },
    { ... }
  }
}

TODO

  • Use a custom parser instead of Nori, to avoid one-element-hashes and cast responses to actual objects (e.g Y/N to true/false)
  • See for mandatory parameters
  • Add a CLI tool

Setup

Only tested with MRI >= 1.9.3

Dependencies:

  • nokogiri
  • nori

Install:

Credits

ilorb is inspired by python-hpilo

ilorb's People

Contributors

josqu4red avatar laurynas avatar vr avatar

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.