Project

ilorb

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
HP ILO Ruby interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.2
>= 0
~> 2.14
~> 1.13

Runtime

~> 2
 Project Readme

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