bmclib

package module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

bmclib - board management controller library

Status Go Report Card GoDoc Development/Support

A library to interact with BMCs of different vendors

Data collection support

Hardware Supported Partially Supported
Dell M1000e
Dell iDRAC8
Dell iDRAC9
HP c7000
HP iLO3
HP iLO4
HP iLO5
Supermicro X10

Firmware update support

Hardware Supported
Dell M1000e
Dell iDRAC8
Dell iDRAC9
HP c7000
HP iLO3
HP iLO4
HP iLO5
Supermicro X10

Configuration support

Hardware User accounts Syslog NTP Ldap Ldap groups BIOS HTTPS Cert
Dell M1000e -
Dell iDRAC8
Dell iDRAC9
HP c7000 -
HP iLO4
HP iLO5
Supermicro X10

Debugging

export BMCLIB_LOG_LEVEL=debug for bmclib to debug log

export BMCLIB_LOG_LEVEL=trace for bmclib to trace log

export BMCLIB_TEST=1 to run on a dummy bmc (dry run).

bmc-toolbox

All of the tooling that uses bmclib is part of the bmc-toolbox

Inventory collection

dora uses bmclib to identify and inventorize assets.

Configuration

bmcbutler uses bmclib to manage configuration on BMCs.

Web API

actor uses bmclib to abstract away various BMCs and expose a consistent web API to interact with them.

Acknowledgment

bmclib was originally developed for Booking.com. With approval from Booking.com, the code and specification were generalized and published as Open Source on github, for which the authors would like to express their gratitude.

Authors
  • Juliano Martinez
  • Joel Rebello
  • Guilherme M. Schroeder
  • Mariano Guezuraga

Documentation

Overview

Package bmclib abstracts various vendor/models of Baseboard Management controllers.

ENV vars ======== export DEBUG_BMCLIB=1 for bmclib to verbose log export BMCLIB_TEST=1 to run on a dummy bmc (dry run).

Scan and connect ----------------

Connect to a BMC - "discover" its model, vendor, for list of supported BMCs see README.md.

connection, err = discover.ScanAndConnect(ip, user, pass)
if err != nil {
	return connection, errors.New("ScanAndConnect attempt unsuccessful.")
}

Once a connection is setup, the connection needs to be type asserted, to either a 'Bmc' or 'BmcChassis'.

switch connection.(type) {
case devices.Bmc:
	bmc := connection.(devices.Bmc)

	// invoke Bmc interface methods here
	...

	bmc.Close()
case devices.BmcChassis:
	chassis := connection.(devices.BmcChassis)

	// invoke BmcChassis interface methods here
	...

	chassis.Close()
default:
	log.Error("Unknown device")
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL